summaryrefslogtreecommitdiff
path: root/sbin/dhclient
AgeCommit message (Collapse)Author
2010-04-04Add some ipv6 hooks the isc code expects for dhcpv6.Jonathan Gray
ok krw@ ramdisks checked by deraadt@
2010-03-25be more strict in check_option().Kevin Steves
ISC dhclient had a buffer overflow: http://www.kb.cert.org/vuls/id/410676 and while our dhclient is not vulnerable to that, it got us looking at how the subnet mask option is handled. this limits specific ip address options to length 4 in conformance with RFC 2132. discussion started by william@ and with input from krw@ ok krw@
2009-11-26Silence dhclient by immediately exiting if the interface doesn't existKenneth R Westerback
or can't return important flags via ioctl. Excess verbiage pointed out by deraadt@. ok henning@
2009-11-12Make sure we have enough space for the trailing \0 on prepend/appendJonathan Gray
of dhcp options. found by parfait. ok krw@
2009-07-19use addr_eq() where we can; ok krw@Kevin Steves
2009-06-12state_panic() tries the active then other valid leases by setting theKevin Steves
interface to each address and trying to ping the gateway. This will trigger an RTM_NEWADDR message. routehandler() only checks for the active and alias address in RTM_NEWADDR messages, so we can exit when state_panic() and the message address is on client->leases. routehandler() needs to also check client->leases. testing krw, 'I say commit' krw
2009-06-06Nuke debug() unless DEBUG is defined. Elminates debug output fromKenneth R Westerback
normal operations. Prodded by deraadt@ a while ago.
2009-06-03Use the new powerful route flush to clean up the mess. With this multipleClaudio Jeker
dhclient can more or less peacefully coexist. OK beck@ krw@
2009-06-03remove unneeded ARGSUSED; ok krw@ henning@Kevin Steves
2009-05-27add missing else; from ISC.Kevin Steves
this fixes an old, old bug that could cause lease entries to be lost when initially loading client leases. found while looking for another issue. ok krw@
2009-05-25log the reason before we die in routehandler(); ok krw@ henning@Kevin Steves
2009-05-20Do not fall back to using nobody if _user is missing, butThordur I. Bjornsson
error out. Add a new user _rwalld for rpc.rwalld, and use that instead of nobody, also unconditionally drop to _rwalld not only if rpc.rwalld was started with euid 0 (as root). ok deraadt@
2009-03-31claudio has spent too much time with the mbuf macros.David Gwynne
switch the rtsocket message filter specification so you can or the macros converting the routing socket message types into the mask used by the filter. ie: - ROUTE_SETFILTER(rtfilter, RTM_NEWADDR); - ROUTE_SETFILTER(rtfilter, RTM_DELADDR); - ROUTE_SETFILTER(rtfilter, RTM_IFINFO); - ROUTE_SETFILTER(rtfilter, RTM_IFANNOUNCE); + rtfilter = ROUTE_FILTER(RTM_NEWADDR) | ROUTE_FILTER(RTM_DELADDR) | + ROUTE_FILTER(RTM_IFINFO) | ROUTE_FILTER(RTM_IFANNOUNCE); there's a manpage change coming. ok claudio@
2009-03-10Add 6-byte MAC address to the log entries for DHCP ACK/NAK/OFFER.Kenneth R Westerback
Log the packets before checking the client state. Makes it easy to find MACs for 'surprise' DHCP servers. Positive comments from mbalmer@, jasper@.
2009-02-19'(ifi->linkstat && ifi && ifi->rfdesc != -1)' is flawed. Swap theKenneth R Westerback
first two terms so ifi is checked first.
2009-02-01Let this compile with gcc2.Miod Vallat
2009-01-28use claudios new rtsocket filters to restrict which messages on the routeDavid Gwynne
socket dhclient will get. ja ja claudio@
2009-01-24improve indentation without wasting space on the install media;Igor Sobrado
make source code fit on 80-column displays; while here, remove superfluous comment sign. ok krw@
2009-01-24Improve comment about resolv.conf creation. Prodded by sobrado@.Kenneth R Westerback
2009-01-10Use the kernel set ifam_hdrlen so that ABI changes won't cause olderClaudio Jeker
binaries to stop working. OK krw@, michele@, henning@, dlg@
2008-10-05- talk about the "client configuration script" consistenlyJason McIntyre
- Xr dhclient-script on first mention, which is section 8 not 5 ok krw
2008-10-05Oops. Missed one typo jmc@ spotted.Kenneth R Westerback
2008-10-05Clarify discussion of option modifiers. They only affect values passedKenneth R Westerback
to dhclient-script. Our default script only uses a few options so others are unaffected by option modifiers. PR#5834 is thus rendered moot. Feedback & suggestions from jmc@, ok deraadt@.
2008-06-07stop spurious "got link" which nooone noticed, but everyone should have; ok krwTheo de Raadt
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@
2008-03-12Code was not passing script exit status; fix with macro.Hugh Graham
deraadt@ OK
2007-11-12dont spew debug output when the SIOCGIFMEDIA ioctl errors with ENOTTY.David Gwynne
ok krw@ henning@
2007-10-16sync the synopsis and usage of commandsIgor Sobrado
ok jmc@
2007-10-16"script" does not belong in the lease declaration section;Jason McIntyre
from Vincent GROSS ok henning
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-08-14make default_lease_time a #define; ok krw@ henning@Kevin Steves
2007-08-11Kill a couple of 'echo' statements that can never produce visibleKenneth R Westerback
output. i.e. not visible on the screen, nor in any log. If nothing else, makes dhclient-script smaller for install media. 'yesh kill' (sic) henning@
2007-07-18eliminate duplicate code to open lease file and just open atKevin Steves
startup; ok krw@ henning@
2007-06-02safer snprintf construct with more paranoid length calculationPeter Valchev
ok millert
2007-05-31fix a funny memory miscalculation bug in options parsingPeter Valchev
ok henning otto theo
2007-05-31convert to new .Dd format;Jason McIntyre
2007-03-02caret missing, From: "Matthew R. Dempsky" <mrd@alkemio.org>Henning Brauer
2007-03-02and the second use of the spaces array might overflow too, in anotherHenning Brauer
way...
2007-03-02If a syntax error is found past 80 columns, parse_warn accessed memoryHenning Brauer
outside of the `spaces' array when trying to print the caret marker found by "Matthew R. Dempsky" <mrd@alkemio.org>, fix inspired by a.velichinsky@gmail.com. discussed with krw
2007-02-25No point in using zero'd fields in the parsed options. Use the optionsKenneth R Westerback
in the lease, whence the parsed info was moved. Fixes "Bogus servername" messages when processing an offer and stops bogus filename info from being stored in the lease. Found while testing a Tucson hotel's dhcp service. ok @stevesk "looks good" henning@.
2007-02-25remove unused/dangling prototypes and comment reference;Kevin Steves
from Mark Lumsden
2007-02-25no need to quote/escape here; ok krw@Kevin Steves
2007-02-15make read connection closed message a debug(); ok henning@Kevin Steves
2007-02-14spacing and a typo that fell out of the readTheo de Raadt
2007-02-14use errwarn functions vs. syslog(); ok henning@ krw@Kevin Steves
2007-02-13move includes only needed in dhclient.c; ok henning@Kevin Steves
2007-02-13error check socket() return; ok henning@Kevin Steves
2007-02-01Don't count ethernet as overhead for UDP packet constuction. GivesKenneth R Westerback
14 more bytes of option space! A change ISC made a long time ago. ok stevesk@ (DHCP) canacar@ (bpf)
2007-01-29Don't malloc memory to store option data in leases, just appropriateKenneth R Westerback
the malloc'd memory from the parsed option buffer since it would be thrown away after the copy anyway. 'looks sane' millert@