Age | Commit message (Collapse) | Author |
|
complex list code to keep track. So nuke it.
Also eliminate unnecessary variable ('dead') that means 'rfdesc is
closed'. Just set rfdesc to -1 when it is closed and use that.
As suggested by millert@ and claudio@, don't bother setting revents
members to zero since poll() does that.
Np functional change, just less code.
'looks good' claudio@ 'I like where this is going' henning@
|
|
moving the minimal code into do_packet(). Eliminate repeated code for
checking the client hardware address and the reject list by putting
those checks into do_packet as well.
No functional change, just much easier to read.
ok stevesk@
|
|
parameters just those things actually needed and using existing
structs and information. No functional change.
ok stevesk@
|
|
message type option of 0 as a BOOTP offer. Don't process any option
buffer after one is found to be corrupt. Don't process overflow
buffers in a BOOTP packet. At least try to accept DHCP offers even if
a bad options buffer is encountered.
Brings code more into line with current ISC dhclient.
ok stevesk@
|
|
process any packets, eliminate that abstraction and just call
do_packet directly.
No functional change.
ok stevesk
|
|
|
|
an option buffer. No longer accept the 6th such packet. From ISC.
ok ckuethe@ stevesk@
|
|
ok miod@
|
|
DHO_PAD (0x00) so that option scanning will terminate on hitting
initialized data rather than scanning and ignoring trailing
DHO_PAD characters.
Suggested by & ok stevesk
|
|
incoming packet. But since we bzero() the packet buffer before
copying the incoming data into it, and the options are at the end, and
we use a fixed sized buffer, and 0's are ignored as pad options, and
proper option lists end with 0xff, it's simplier to always try to scan
the whole buffer.
Problem found by, and patch tested by kettenis@.
|
|
contains the global value client->packet_length. Use
client->packet_length. No functional change.
Suggested by stevesk@.
|
|
dhcp_packet and it is contained in the global *client. So don't pass
around pointers to a struct that contains a pointer to the dhcp_packet
instance. Just use the global client->packet. Eliminate unused struct
packet members and parameter lists accordingly.
No functional change.
Suggestions by stevesk@. ok stevesk@
|
|
|
|
|
|
no binary change.
|
|
|
|
|
|
obviously have single global struct client_state and struct
client_config nested inside interface_info and client_state
respectively.
Pull them out to their own global variables and eliminate a bunch
(i.e. hundreds) of multi-level dereferences. Make it much nicer to
read.
No functional change.
"makes sense" henning@
Testing stevesk@, ok stevesk@
|
|
single, global, instance of 'struct interface_info' (ifi) rather than
passing around pointers to it.
"I agree" henning@
Testing moritz@ stevesk@, ok stevesk@
|
|
for NULL before dereferencing it. OK henning@ krw@ deraadt@
|
|
|
|
specify a dhcp-lease-time option other than the default requested
lease time, which is two hours".
we don't by default send a dhcp-lease-time option in request/discover.
ok jmc@, henning@ 'if you are sure'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
instead of using BPF, which currently will always set the destination
MAC to broadcast, send using a SOCK_RAW socket and sendmsg() so the
frame has a unicast destination MAC.
Fixes an issue when using a bootp forwarder where unicast DHCPREQUESTs
are dropped at the router/gateway until we reach T2/REBINDING and
change the destination IP to broadcast.
ok henning@ (but doesn't like using a raw socket for this)
|
|
|
|
mainly formatting, whitespace; ok henning@
|
|
|
|
|
|
|
|
|
|
set once in main() and used everywhere without further checks.
From Matthew R. Dempsky via tech@
|
|
for link for 10 seconds. otherwise, if there was link, no problem!
ok henning, claudio, tested by others
|
|
|
|
(for some drivers, this is a bug. for others, it is part of how they work)
therefore before doing the 10-second link test, we must bring the if up.
ok krw, tested marco ckuethe
|
|
directory ("/"). this fixes a problem when dhclient was called in a
working directory like "/mnt" and the user tried to unmount this
directory while dhclient was still running. umount failed because the
device for "/mnt" was still busy and blocked by the running priv child
of dhclient.
ok henning@
|
|
OK krw@
|
|
|
|
ok beck@
|
|
external modification when the RTM_NEWADDR message arrives from the
routing socket. Now dhclient will not exit if 'alias{}' is specified
in dhclient.conf.
Mentioned many times, most recently by Matthias Bertschy on misc@.
ok henning@ beck@
|
|
|
|
change before timing out' behaviour of the man page for link-timeout;
ok deraadt@ henning@
|
|
ok claudio@, mbalmer@
|
|
|
|
|