summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dispatch.c
AgeCommit message (Collapse)Author
2008-05-26If an interface has no link at startup, try to force it up, and thenTheo de Raadt
give it about 4 seconds of (silent) grace period before doing the verbose search for a link... tested by various developers who got burned a bit
2008-05-09- don't give up when the link is not available on startup: dhclientReyk Floeter
goes to background and listens on the routing socket for link to come up before it retries. - renew the lease whenever the link was lost and becomes active again. - listen for link state changes on non-ethernet devices like wireless, the link state becomes active when the wireless has been associated to the AP and becomes active. this helps to automatically renew the lease when the user is roaming. ok beck@, deraadt@
2007-11-12dont spew debug output when the SIOCGIFMEDIA ioctl errors with ENOTTY.David Gwynne
ok krw@ henning@
2007-02-14use errwarn functions vs. syslog(); ok henning@ krw@Kevin Steves
2007-01-27We only poll on the bpf fd and the routing socket fd. No need forKenneth R Westerback
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@
2007-01-11Since bootp_packet_handler is always set to do_packet before weKenneth R Westerback
process any packets, eliminate that abstraction and just call do_packet directly. No functional change. ok stevesk
2007-01-04Another round of cleanup. There is only one instance of structKenneth R Westerback
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@
2006-12-26Our dhclient only handles one interface. Simplify code by using theKenneth R Westerback
single, global, instance of 'struct interface_info' (ifi) rather than passing around pointers to it. "I agree" henning@ Testing moritz@ stevesk@, ok stevesk@
2006-08-29snuck in a typo, damnitTheo de Raadt
2006-08-29some net if devices do not media negotiate (for link) until brought up.Theo de Raadt
(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
2005-05-24no more 'ifconfig $if 0.0.0.0 up' only 'ifconfig $if up' since dhclientTodd T. Fries
uses bpf exclusively ok deraadt@, henning@, claudio@
2004-09-21spelling fixes; ok jmc@ henning@David Krause
2004-09-15no \n in error() calls and minor KNF, from Moritz Jodeit <moritz@jodeit.org>Henning Brauer
2004-06-22handle interface removals in the poll loop. ok henning@Can Erkin Acar
2004-05-05knfTheo de Raadt
2004-05-04do not overload libc function names causing linker troublesMichael Shalayeff
2004-05-04knfTheo de Raadt
2004-05-04remove things not used, spotted by lint mostly; ok henningTheo de Raadt
2004-05-04more shrink and lint fixes; henning okTheo de Raadt
2004-04-07fix a logic botch in discover_interfaces that prevented dhclient to seeHenning Brauer
any but the first real interface found yesterday evening at RATT when dhclient would not get me a lease on wireless
2004-03-02more pruning; henning okTheo de Raadt
2004-03-02we deal with one interface at a time, so remove the interface list gunk.Henning Brauer
2004-03-02remove dummy_interfaces and fallback_interface gunkHenning Brauer
2004-03-02our interface discovery is so quiet now (nonexistant) that we don't need aHenning Brauer
quiet_interface_discovery flag any more
2004-03-02mixing memcpy and bcopy in the same function is highly confusingHenning Brauer
2004-03-02since we're dealing with one interface and not quite a few ones we can giveHenning Brauer
this one onterface as parameter to discove_interfaces and get rid of quite some of the multiple-interface-discover logic
2004-03-02do not record all these interfaces we don't care aboutHenning Brauer
2004-02-24whack unused token ring code and a few empty functionsHenning Brauer
2004-02-24get rid of tons of structs we never use, a lot of new_someotherjunk functionsHenning Brauer
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...
2004-02-24discover_interfaces doesn't run in multiple modes any more - kill unreachableHenning Brauer
code, partitally server-only
2004-02-24remove ill-advised interface discovery-scan, and require an interface to beHenning Brauer
always given. theo agrees with removal, pb ok
2004-02-23remove time_t related crud; henning okTheo de Raadt
2004-02-23remove allocation/storage/search code for subnets, shared networks, andHenning Brauer
leases - it is server-only code.
2004-02-23scrap dead codeHenning Brauer
2004-02-23dhclient always uses bpf on openbsd no matter what, it works, and we don'tHenning Brauer
need to fallback to their raw socket code suddenly dhclient is so fast... pb tested and sez ok
2004-02-10at startup, before sending several DHCPDISCOVER and waiting ages for answers,Henning Brauer
check the link state of the interface(s) in question and don't try on intrfaces that for sure have no link. interfaces with unknown linkstates are treated as if they had a link, not all drivers are capable of reporting linkstate upstream, and for some media there is no such thing as a link state. saves quite sme time when booting notebooks configured for dhcp without teh cable inserted... note that this is the not yet active copy of dhclient ok grange@ mcbride@ pb@ naddy@
2004-02-07whitespace policeHenning Brauer
2004-02-07more style fixes from Emil Mikulic <emikulic@dmr.ath.cx>Henning Brauer
Thank you very much for this excellent work, it helps a lot. binary unchanged. I am still convinced dhclient can be made readable.
2004-02-04$OpenBSD$, teduHenning Brauer
2004-02-048579 lines of KNF, ANSO and zap-junk diff without the resulting binaryHenning Brauer
changing by a single byte. partly from theo
2004-01-26-we don't use SIOCGIFCONF any more, we use getifaddrs(). update comment.Henning Brauer
-we don't need the socket any more either; remove. ok deraadt@
2004-01-18this is where dhclient will start surgeryTheo de Raadt