Age | Commit message (Collapse) | Author |
|
from Mark Lumsden
|
|
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@
|
|
process any packets, eliminate that abstraction and just call
do_packet directly.
No functional change.
ok stevesk
|
|
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@
|
|
|
|
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@
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
(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
|
|
default remains 10 seconds.
|
|
of them into privsep.h. ok krw@ henning@
|
|
dhclient is responsible for one interface. Simply skip interface
declarations for other interfaces and store all info in the one
interface structure.
tested by dlg@, ok henning@
|
|
dhclient.leases.<if> files. Simplify parse_numeric_aggregate() as
a result, rendering tree.c and tree.h redundant.
ok millert@
|
|
eliminate new_parse_string. alloc.c becomes redundant. Junk a couple of
unused fields (env, envc) in struct client_state.
suggestions by & ok millert@
|
|
dhcp_options const.
ok henning@
|
|
always sent. Fold store_options into cons_options. Eliminate priority
list of options.
ok deraadt@
|
|
|
|
ok millert@
|
|
ok henning@
|
|
code to handle mulitple 'vendor' universes. Don't bother with a
specific error message about 'vendor'. An unsupported option is an
unsupported option, and a '.' in an option name is a syntax error.
ok henning@
|
|
and associated code for store_options().
ok henning@
|
|
ok deraadt@
|
|
ok deraadt@ millert@.
|
|
redundant level of indirection in building and using option_data
arrays while constructing outgoing packets. Make option_data len field
unsigned.
ok henning@. 'cool!' deraadt@.
|
|
|
|
|
|
|
|
|
|
the privileged child's duty is the dhclient-script env setup & exection.
the parent process now chroots to /var/empty and drops privileges to _dhcp
mostly hacked at vancouver airport
with some feedback from krw@ and otto@, tested to not break installs by krw@
|
|
|
|
inspired by diff from Emil Mikulic <emikulic@dmr.ath.cx>
|
|
|
|
|
|
|
|
|
|
|
|
quiet_interface_discovery flag any more
|
|
this one onterface as parameter to discove_interfaces and get rid of quite
some of the multiple-interface-discover logic
|
|
amount of ~ 20 lines of code in their own file...
and another one bites the dust
|
|
|
|
|
|
in alloc.c we never call, and a shitload of genius comments like
char *script_name; /* name of script */
char *server_name; /* name of server */
etc etc etc...
|