summaryrefslogtreecommitdiff
path: root/sbin/dhclient
AgeCommit message (Collapse)Author
2012-01-15Make dhclient use the correct rdomain for all requests for leases, notPeter Hessler
just the first one. from Joel Knight OK krw@
2011-12-10Try harder to re-initialize parsing state so nothing accidentallyKenneth R Westerback
carries over when a new file (i.e. leases after config) is parsed. May help with mysterious "Corrupt lease file" messages.
2011-12-10Tweak parsing. No need to declare, assign and then ignore the tokenKenneth R Westerback
value when only the token id is required.
2011-12-10Tweak leases file handling.Kenneth R Westerback
1) Write out new leases file every time a lease is obtained. i.e. don't append 20 leases before cleaning it up. 2) Write new leases file after calling dhclient-script to implement new info. Gets interface configured first, and makes it more likely the leases file reflects most current configuration.
2011-05-11Make dhclient more friendly to sequential option processing byKenneth R Westerback
always starting DHCP packet options with DHO_DHCP_MESSAGE_TYPE. Now DHCP-specific options always come after the option identifying the packet as DHCP rather than BOOTP. Makes at least Nortel NetIP DHCP server happier. Clean up some code and parameter passing. Closes PR#6543, as confirmed by original submitter and patch tester Len Zaifman. Thanks! ok matthew@ (who hates the ISC-like code)
2011-04-17by default we ignore unknown dhcp server options, so don't botherPeter Hessler
warning unless we ask dhclient to reject leases with unknown options OK krw@ (this was lost in my tree for even longer)
2011-04-17fix a possible division by zero if a server sends us a broken optionPeter Hessler
hints for the proper fix, and OK claudio@ (this was lost in my tree for far too long)
2011-04-09We are incorrectly processing option 33 (static route), treatingKenneth R Westerback
is as a host route rather than a classful network route. Too much trouble to fix such an obsolete feature, so ignore option 33 info.
2011-04-04route(8) has a -q option. No need for all this >/dev/null 2>&1Kenneth R Westerback
stuff.
2011-04-04Align man page with current reality.Kenneth R Westerback
2011-04-04Stray '$medium' missed in last commit.Kenneth R Westerback
2011-04-04Dump some useless calls to dhclient-script. i.e. MEDIUM, PREINIT,Kenneth R Westerback
ARPSEND, ARPCHECK. Drop support for 'media', 'medium' and 'alias' specifications in dhclient.conf. Old leases still parse but these options now have no effect. Be more polite and decline all offers we don't accept. Fix a IMSG length check. Many expressions of support at various bars. ok henning@ deraadt@ beck@
2011-03-27Fix interval handling. Start at initial_interval instead ofKenneth R Westerback
exponentially backed off initial_interval. Don't hallucinate that we can send ARP packets without waiting. Don't claim to be waiting for ARP packets when not doing so. Correctly detect expiry of selecting period. Speeds up negotiations. Tested on various dhcp servers by Martin Pelika, ian@, and David Coppa. And works at Starbucks and a mall for me.
2011-03-27new sentence, new line;Jason McIntyre
2011-03-26Correct described default for initial-interval. It is three, notKenneth R Westerback
ten, seconds. Use words not numerals consistently when naming various timing values. Tweak one clumsy sentence.
2011-03-02no need for a separate NOTES section; ok henningJason McIntyre
2010-10-23make sure an interface is registered before we start using itPeter Hessler
found by clang OK claudio@, krw@
2010-10-15Add and ignore DHCP option 66/0x42 TFTP server name.Jonathan Gray
ok krw@ phessler@
2010-10-08use the right capitalization in the Nd strings.Igor Sobrado
ok jmc@
2010-09-24Make it possible to use "dhclient egress" to refetch a lease withoutClaudio Jeker
rememberingwhich interface dhclient was actually active on. Requested by deraadt, OK deraadt@, krw@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-07-02garbage collect an unused function; ok claudioTheo de Raadt
2010-06-26malloc/strlcpy -> strdup. Apparently I forgot to commit this one withKenneth R Westerback
the similar changes to dhcpd.
2010-06-26Whitespace.Kenneth R Westerback
2010-06-02Have dhclient obey the interface's rdomain, instead of doing routes onPeter Hessler
rdomain 0. OK krw@, claudio@ sharp stick prodding from claudio@
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