Age | Commit message (Collapse) | Author |
|
configuration changges.
|
|
domain name servers with variable sized uint8_t chunks.
Allows larger lists of search domains and static routes while making
common situations use much less memory.
Original report of breaching the 128-byte limit for static routes from
James Cook via misc@.
Testing of various versions by Andreas Kusalananda.
|
|
unnecessary wrappers, since they all contained a single field that
could be used as is.
Suggested by claudio@
|
|
ok florian@
|
|
DHCP knowledge and interface manipulation.
Unprivileged process now sends proposal derived from the accepted
lease to the privileged process rather than individual interface
manipulation requests.
The only intended functional change is that /etc/resolv.conf.tail is
not re-read each time a new proposal is implemented, rather than once
at dhclient startup.
|
|
need to start a new copy when LLADDR or SSID changes. Just go back to
S_PREBOOT and get a new lease.
Fewer log messages, faster join'ing new networks, simpler code.
|
|
|
|
instead of overloading SIGHUP.
|
|
|
|
'<ifname> [priv]' as appropriate for the process doing the
setting. Use it as the prefix in all log_*() output. Makes
tracking messages for an interface or a process much easier.
|
|
a routing socket. Fixes at least one cause of resolv.conf
confusion and possibly hanging/looping dhclient if the
RTM_GET gets lost.
Fingered by phessler@ when doing many suspend/resumes
while switching between wifi and wired interfaces.
Testing & ok phessler@
|
|
verbiage.
|
|
added back.
ok mpi@
|
|
checks are done on the imsg socket to detect
closure, etc.
Die immediately if the priv process notices
the interface name can't be turned into an
index.
|
|
by labelling dhclient routes. Just use
the route(8) logic when flushing routes.
ok benno@ claudio@
|
|
are changed or dhclient's interface takes over
the default route.
|
|
in the priv process, so that they do not have to be
continually retransmitted. IMSG_WRITE_RESOLV_CONF
now just triggers a write of the cached info.
Simplifies a bunch of logic.
|
|
reflect what it does.
|
|
which the current default route exits.
If the dhclient instance owns that interface it
owns resolv.conf and will overwrite it no matter
who created the default route.
Feedback & suggestions claudio@
|
|
particular stop providing RFA_IFA, and instead supply the
relevant interface index in the RTM_ADD message.
Various code simplifications as a result.
|
|
lease address replaces all current addresses. Shuffle some
code from bind_lease() into set_mtu()/set_address() to
shrink bind_lease().
|
|
|
|
"<var> == 0", "!(<var> & FLAG)" with
"(<var> & FLAG) == 0", "!<func()>"
with "<func()> == 0" and "!<define>" with
"<define> == 0". And the positive cases
as well.
A few stray == NULL and != NULL as well.
|
|
for resolving 'egress' and adding a route. Move creation
of main()'s ioctlfd up so it can be used for the
'egress' resolution.
|
|
No more struct interface_info knowledge in privsep.[ch]
|
|
correct place and passing the invocation the correct parameters.
Noticed by & initial diff from matthieu@
|
|
fd'd from main loops as required. One socket to do
ioctl's per process (called ioctlfd) and one socket to
do route messages per socket (called routefd).
Clean up local variable declaration lists in passing.
|
|
and friends. i.e. ifi->name, ifi->rdomain, or both.
|
|
whenever dhclient dies. Eliminates differences in handling
and thus need to intercept signals INT, TERM, USR1,
USR2. Eliminates need for 'zapzombies' field and thus
entire struct imsg_flushroutes. Eliminates need for 'imsg'
parameter to and associated logic in priv_flush_routes().
Address, routes and '-L' file are still cleaned out when
binding a lease.
|
|
function. Don't exit dispatch() loop on SIGHUP, wait for privileged
child to execvp() dhclient. Eliminate struct imsg_hup since its
contents were not being used except in priv_cleanup(). And
'active_addr' works just as well there.
Cleaner and eliminates some extraneous log entries.
|
|
the reception of a IMSG_HUP message and trigger the
desired restart.
Nuke the now pointless IFI_HUP.
|
|
priv_write_resolv_conf() code that was moved into the
dispatch loop.
|
|
logical conclusion.
Nuke _PATH_RESOLV_CONF since the value is only meant to be
known inside priv_write_resolv_conf(). Just use a local const char *.
Bring priv_write_resolv_conf() into line with other priv_ functions
invoked from the dispatch loop. i.e. don't pass it the imsg, just pass
a pointer to the data and a size after ensuring there is data to pass.
|
|
i.e. open FILE during program set up and use the FILE created for
the rest of the program lifetime after dropping privilege and
pledge()'ing. No need for passing messages to the priv process.
Tweak lease file handling a bit in passing.
Monitoring the -L file with external programs like sysutils/entr
still works.
Looks good to sthen@.
|
|
|
|
instead of log_warnx() and fatalx(). A few log_info() to log_warn()
for the same reason.
Suggested by millert@.
|
|
No objections heard. Feedback from millert@ guenther@
|
|
ok henning@, krw@
|
|
functions needing it.
This is the first step to support multiple interfaces in one dhclient(8)
instance.
ok krw@
|
|
each *.c file.
Inspired by mention of header silliness by Edgar Pettijohn and mmcc@
on tech@.
|
|
Original request+diff from matthew@
ok dlg@
|
|
theoretically allowed the unprivileged child process to write to
arbitrary files. Restrict it by replacing it with two specific
write_resolv_conf() and write_option_db() privsep interfaces where all
the critical decision has been moved to the parent.
OK krw@
|
|
|
|
not cause privileged process to exit.
|
|
|
|
broke populating the egress group.
|
|
since the former relies on the latter and the latter breaks 'egress'
group populating.
|
|
function that will be reused for future work.
ok claudio@
|
|
relevant entries from the arp cache, don't bother asking for/processing
arp entries in the route dumps. Thus allowing use of NET_RT_FLAGS
with RTF_GATEWAY and AF_INET, to ask for only the routes dhclient
wants to expunge rather than all routes in existance.
Greatly shrinks and simplifies the code. No intentional functional
change. Tested by sthen@.
|
|
IMGS_CLEANUP/imsg_cleanup/cleanup to IMSG_HUP/imsg_hup/sendhup to
more accurately reflect intent of causing the privileged process
to initiate restart.
There should now be one and only one message logged at termination
or restart, logged by the process initiating the termination or
restart.
As part of fixing this, remove duplicate cleanup attempts and exit
after sending IMSG_HUP. These make logged messages more consistant and
fix issues with incorrect cleanups.
More prodding from deraadt@
|