1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00
freebsd/sbin/dhclient
Brian Somers 6964abef83 When dhclient obtains a lease, it runs dhclient-script and expects
it to configure the interface.  When the script is complete, dhclient
monitors the routing socket and will terminate if its address is
deleted or if its interface is removed or brought down.

Because the routing socket is already open when dhclient-script is
run, dhclient ignores address deletions for 10 seconds after the
script was run.

If the address that will be obtained is already configured on the
interface before dhclient starts, and if dhclient-script takes more
than 10 seconds (perhaps due to dhclient-*-hooks latencies), on script
completion, dhclient will immediately and silently exit when it sees
the RTM_DELADDR routing message resulting from the script reassigning
the address to the interface.

This change logs dhclient's reason for exiting and also changes the
10 second timeout to be effective from completion of dhclient-script
rather than from when it was started.

We now ignore RTM_DELADDR and RTM_NEWADDR messages when the message
contains no interface address (which should not happen) rather than
exiting.

Not reviewed by:	brooks (timeout)
MFC after:		3 weeks
2010-07-07 06:06:54 +00:00
..
alloc.c
bpf.c Make dhclient use bootpc (68) as the source port for unicast DHCPREQUEST 2009-10-21 23:50:35 +00:00
clparse.c
conflex.c
convert.c
dhclient-script Use the -n flag to route(8) when calling "route get". Otherwise we hang 2008-06-09 20:03:35 +00:00
dhclient-script.8
dhclient.8
dhclient.c When dhclient obtains a lease, it runs dhclient-script and expects 2010-07-07 06:06:54 +00:00
dhclient.conf
dhclient.conf.5
dhclient.leases.5
dhcp-options.5
dhcp.h Support the remaining options listed in dhcp-options(5) and RFC 2132. 2008-10-17 13:28:53 +00:00
dhcpd.h Make dhclient use bootpc (68) as the source port for unicast DHCPREQUEST 2009-10-21 23:50:35 +00:00
dhctoken.h
dispatch.c Fix the logic to count the number of "live interfaces". With this change 2009-07-21 15:06:10 +00:00
errwarn.c
hash.c
inet.c
Makefile Switch the default WARNS level for sbin/ to 6. 2009-10-19 16:00:24 +00:00
options.c
packet.c Make dhclient use bootpc (68) as the source port for unicast DHCPREQUEST 2009-10-21 23:50:35 +00:00
parse.c
privsep.c
privsep.h
tables.c Support the remaining options listed in dhcp-options(5) and RFC 2132. 2008-10-17 13:28:53 +00:00
tree.c
tree.h