Age | Commit message (Collapse) | Author |
|
|
|
|
|
put local functions prototypes and variables in their .c files, and
cross-file functions into .h files. Prompted by deraadt@.
|
|
|
|
when trying to send broadcast request to server.
|
|
will begin by using unicast communications with the server, and
fall back to using broadcast packets if unicast fails.
We were not failing back, but instead doggedly sticking with unicast
attempts until the lease expired.
Instead, try unicast requests for the reboot timeout interval and
then switch to using broadcast requests.
Problem reported by Marc Peters and Dennis den Brok via misc@.
ok dlg@ millert@
|
|
file name without the server address seems silly.
Tested & ok uwe@
|
|
applying the option directives (ignore, default, supersede) from
dhclient.conf.
This allows the options dhcp-lease-time, dhcp-rebinding-time,
and dhcp-renewal-time to be controlled via dhclient.conf.
Also set BOOTP lease times by faking up these options rather than
crudely jamming in fixed times, allowing them to become configurable
via dhclient.conf.
Imperviousness of the time options pointed out by todd@.
|
|
|
|
should be able to correctly short-circuit packet routing to local
addresses without this. Requested by many over the years, most
recently chrisz@.
Get it in early to see if anything does break.
ok claudio@ henning@
|
|
identical lease when we are in state S_RENEWING. Otherwise we can end
up without an IP address on the interface because dhclient thinks it's
still there and doesn't add it.
Found the hard way during suspend/resume.
OK krw@
|
|
From Jan Stary <hans at stare dot cz>.
ok jmc@
|
|
the interface, skip the address deleting/adding and route deleting/adding
and simply update the timestamps.
Suggested by sthen@. Tweaks from millert@. ok sthen@ millert@
|
|
removing traces of dhcp(8)... i'm about to remove that file, since
it's essentially useless. holding off for a little, in case my commit
is greeted with howls.
help/ok krw
|
|
help/ok krw
|
|
Make packet discarding decisions before parsing the packet's possible
options. No intended functional change.
|
|
option buffer(s) end badly.
|
|
#ifdef DEBUG. They were mostly for, well, debugging.
|
|
|
|
|
|
|
|
one of the strings twice. Spotted by mpi@, who also tweaked the
diff by pointing out INET_ADDRSTRLEN.
Should fix mysterious messages like "1.2.3.4, not 1.2.3.4, deleted
from ...".
|
|
rather than 1 case with a check to see which messages it was. More
code duplication, easier to read. No functional change.
|
|
Latter from dhill.
|
|
used rather than deducing them. Use priv_add_route() to add
the 127.0.0.1 address when adding an address.
|
|
to be used.
|
|
passing the correct destination for the default route, '0.0.0.0', rather
than the new lease address.
Populating egress group works this time.
Problem found the hard way by Chris Smith.
|
|
broke populating the egress group.
|
|
|
|
since the former relies on the latter and the latter breaks 'egress'
group populating.
|
|
routes option (121).
ok sthen@
|
|
Problem noted, fix tested and ok sthen@.
|
|
function that will be reused for future work.
ok claudio@
|
|
interfaces and not against our own.
Problem noted, fix tested and ok mikeb@
|
|
the first expected RTM_NEWADDR arrives, which signals that a lease
has been bound to the interface. Ignore RTM_NEWADDR and RTM_DELADDR
messages until the flag has been set.
Makes it more likely that the last dhclient started will be the
last dhclient standing. Fixes the problem reported by David Higgs,
where restarting an install in a vm consistantly caused the new
dhclient to be the one that dies.
|
|
pointless ones, make multiline comments readable, nuke '...' in
favour of '.', etc.
|
|
client->offered_leases into TAILQs.
|
|
strptime() rather than handrolling parsing. Change date format
in leases to same as dhcpd, fixing 'u' vs 'w' error made in
initial strftime() introduction.
|
|
|
|
128, so people living many hops from their dhcp server can still
get leases.
Pointed out by deraadt@
|
|
type to store the returned value. From dhill.
|
|
|
|
ok krw@
|
|
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@.
|
|
delete_route(). No functional change.
|
|
to be there! Instead, always record the client-identifier used to obtain
the lease. Ignore recorded leases that have a different client-identifier
than the one currently in force. If a client-identifier is not specified
in the dhclient.conf file, construct one from the network type and
MAC, like most other clients out there do these days.
Thus, if one plugs in a different USB network adapter, renewing the
previous lease (which upsets servers due to the MAC being different)
is skipped and DISCOVER is attempted at once.
Issue noted and fix tested by tedu@.
|
|
|
|
which want a "full" dump
ok dlg
|
|
OK krw@
|
|
left behind by dead dhclients. i.e. dhclients that no longer respond
to 'kill(pid, 0)'.
As a result, no need to handle the 127.0.0.1 route separately when
deleting an interface.
Appears to fix in passing a problem with routes vs link addresses
that sthen@ was seeing.
ok sthen@
|