Age | Commit message (Collapse) | Author |
|
the dispatch loop again; in the case where two RTM_IFINFO link changes occur
immediately after each other (as in the case with trunk and probably vlan)
dhclient missed the state change of the second interface.
ok krw@, who points out that dhcp packets received between the two
RTM_IFINFO messages would be lost, however the window is small (<0.4ms on
my laptop) and this is better than not noticing the link change.
|
|
interface's routes when the interface is down.
Prevents floods of RTM_MISS messages on 'ifconfig down'. And might
fix the vpn related failures pirofti@ is seeing.
|
|
references into a STANDARDS section;
|
|
it isn't copied again the next time a dhclient goes away.
Do the resolv.conf.saved restore for v6 as well since v6 goes through
the trouble to create resolv.conf.saved.
ok beck@
|
|
on an interface. Crude hammer that may be refined as needed.
Feedback from tedu@, beck@, sthen@ claudio@
|
|
does the resolv.conf dance and removes 'dead' routes, rather than
leaving these droppings behind.
When dhclient is exiting after calling dhclient-script with "FAIL",
give the script a couple of seconds to finish. Also pass the lease
parameters (old_*) to dhclient-script so routes can be cleaned up
in this path too.
ok beck@
|
|
|
|
|
|
Since reinitialize_interface() was simply setting interfaces_invalidated
to 0, nuke it too!
Always update ifi->linkstat in dispatch() loop.
|
|
invocations to send_packet(), and similiar combinations.
|
|
installed anyway;
ok krw henning
|
|
time is checked multiple times. Add a set_timeout_interval() function
to allow setting a timeout based on an interval from current time.
Fixes issues with initial startup where the global cur_time was
always old and caused initial DHCPDISCOVER or DHCPREQUEST packets
to be sent multiple times. And probably other timeout related
oddities.
Tested by naddy@
|
|
from the server without necessarily speciyfing a supersede value
|
|
printing, rather than (int) and %d. Follows idiom used for 64-bit size_t and
off_t.
Suggested by deraadt@
|
|
Part of larger time_t rectification diff from guenther@.
|
|
in case time_t ever changes size. Values in these cases are intervals,
i.e. (time_t - time_t) so int/%d will be fine.
Part of larger time_t rectification diff from guenther@.
|
|
timeout now, not a list.
|
|
state engine for packet processing. Time may have passed! Use cur_time
in routing message processing.
Makes sense to todd@
|
|
is not set. This is what the late interface_link_status() did.
Allows drivers who cannot tell what the link state is to get
dhcp leases.
Prodding by henning@.
ok deraadt@ miod@
|
|
mechanism that was a holdover from when dhclient handled multiple
interfaces at once. There is only one timeout possible at a time.
Also move calculation of current time to just before check to see
if the timeout has expired.
ok beck@ guenther@
|
|
length field for the option is present before using it. Reject lease
if no length field is present.
|
|
a trailing NULL; however, the receiver of such options MUST be
prepared to delete trailing nulls if they exist."
So delete (all) trailing NUL's when parsing NVT ASCII options.
Should fix odd results when 'append'ing info to such options via
dhclient.conf.
FreeBSD commit to fix 'append' logic in a different way pointed out
by brad.
|
|
interface_status() (check IFF_UP|IFF_RUNNING and media status). The
interface is forced up when dhclient starts so the flags should be
correct.
Thanks to guenther@ for pointing out the original raison d'etre of
the difference between the two.
|
|
|
|
inside state_reboot() to S_INIT when calling state_init(). Rather
than the other way around. Makes for more consistant idiom and
might reduce state confusion.
|
|
if a link state change happens. Fixes a problem where we'd continue to send
(corrupted) discover packets after binding.
ok krw@
|
|
just the first one.
from Joel Knight
OK krw@
|
|
carries over when a new file (i.e. leases after config) is parsed.
May help with mysterious "Corrupt lease file" messages.
|
|
value when only the token id is required.
|
|
1) Write out new leases file every time a lease is obtained. i.e. don't
append 20 leases before cleaning it up.
2) Write new leases file after calling dhclient-script to implement
new info. Gets interface configured first, and makes it more likely
the leases file reflects most current configuration.
|
|
always starting DHCP packet options with DHO_DHCP_MESSAGE_TYPE. Now
DHCP-specific options always come after the option identifying the
packet as DHCP rather than BOOTP. Makes at least Nortel NetIP DHCP
server happier. Clean up some code and parameter passing.
Closes PR#6543, as confirmed by original submitter and patch
tester Len Zaifman. Thanks!
ok matthew@ (who hates the ISC-like code)
|
|
warning unless we ask dhclient to reject leases with unknown options
OK krw@
(this was lost in my tree for even longer)
|
|
hints for the proper fix, and OK claudio@
(this was lost in my tree for far too long)
|
|
is as a host route rather than a classful network route. Too
much trouble to fix such an obsolete feature, so ignore option
33 info.
|
|
stuff.
|
|
|
|
|
|
ARPSEND, ARPCHECK. Drop support for 'media', 'medium' and 'alias'
specifications in dhclient.conf. Old leases still parse but these
options now have no effect.
Be more polite and decline all offers we don't accept. Fix a IMSG
length check.
Many expressions of support at various bars.
ok henning@ deraadt@ beck@
|
|
exponentially backed off initial_interval. Don't hallucinate that
we can send ARP packets without waiting. Don't claim to be waiting
for ARP packets when not doing so. Correctly detect expiry of
selecting period. Speeds up negotiations.
Tested on various dhcp servers by Martin Pelika, ian@, and David
Coppa. And works at Starbucks and a mall for me.
|
|
|
|
ten, seconds. Use words not numerals consistently when naming
various timing values. Tweak one clumsy sentence.
|
|
|
|
found by clang
OK claudio@, krw@
|
|
ok krw@ phessler@
|
|
ok jmc@
|
|
rememberingwhich interface dhclient was actually active on.
Requested by deraadt, OK deraadt@, krw@
|
|
and make it possible to bind sockets (including listening sockets!)
to rtables and not just rdomains. This changes the name of the
system calls, socket option, and ioctl. After building with this
you should remove the files /usr/share/man/cat2/[gs]etrdomain.0.
Since this removes the existing [gs]etrdomain() system calls, the
libc major is bumped.
Written by claudio@, criticized^Wcritiqued by me
|
|
|
|
the similar changes to dhcpd.
|
|
|