CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2025/09/18 05:37:01
Modified files:
sbin/dhcpleased: dhcpleased.h engine.c frontend.c
Log message:
Reduce if_indextoname(3) usage.
There is no need to constantly ask the kernel for the interface name,
it is not going to change.
We pass the interface name from the frontend to the engine because
it is a fixed length string that is only used to find the
configuration for the interface and debugging output.
We do *not* pass the name to the main process because that would allow
the frontend to create arbitrary files inside of /var/db/dhcpleased/,
send arbitrary data to the SIOCAIFADDR et. al. ioctls, and mess with
the bpf socket.
OK tb