summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient
Commit message (Collapse)AuthorAgeFilesLines
* Fix rev 1.12.brooks2006-01-261-1/+1
| | | | | | | | | | | | | /tmp may not be writeable yet when dhclient is first run via /etc/rc.d/netif so using it may not work. Also, writing to a predictable file in /tmp as root is a really bad idea since a malicious user may be able to win a race and insert a symlink which will allow them to cause any file to be overwritten. To solve these problems, create the tempory file in /var/run which will exist this early and is writable only by root. Security: Local risk if users can cause dhclient to run on demand (such as by unplugging and replugging the network cable).
* Give the TIMEOUT case a chance to work by using -t # instead of thebrooks2006-01-241-1/+1
| | | | | | | | OpenBSD -w # when invoking ping. PR: bin/92187 Submitted by: "Shin'ya Kumabuchi" <kumabu at t3 dot rim dot or dot jp> MFC After: 6 days
* Make dhclient-script more agreeable with read-only /etc.wes2006-01-231-9/+10
| | | | | | PR: 90518 Submitted by: John E. Hein <jhein@timing.com> MFC after: 3 days
* Mention the -b flag in the SYNOPSIS.brooks2006-01-101-1/+1
| | | | MFC after: 1 week
* When we give up on an interface, use the arp(8) command to remove allbrooks2006-01-101-2/+5
| | | | | | | | entries from the interface rather than using ifconfig's delete command. This preserves non-dhclient configured addresses (though they are wiped out when dhclient is restarted). MFC after: 1 week
* Allow users to add aliases to the interface.brooks2006-01-101-13/+13
| | | | | PR: bin/87465 (different solution used) MFC after: 1 week
* When we get a bogus hostname in an option, drop the option rather thanbrooks2005-12-101-1/+4
| | | | | | | refusing the lease. This allow obtaining leases on misadministered networks that use host names with underscores in them. MFC After: 3 days
* Avoid updating resolv.conf when no changes have actually occured.brooks2005-09-081-0/+10
| | | | Submitted by: ume
* When we fail to aquire a lease, our lease expires without a sucessfulbrooks2005-09-081-0/+1
| | | | | | | | | renewal, or we lose link, be more forceful about clearing interface state so another interface that connects to the same network has a chance of working. This doesn't address attemping to connect to both at once, but appears to allow unplugging from a wired interface and then inserting a wireless card that associates with an AP bridged to the same LAN.
* When we supersed the subnet-mask, write the forced value to the leasebrooks2005-09-021-10/+14
| | | | | | file. This is what the ISC client does. Submitted by: Rostislav Krasny <rosti dot bsd at gmail dot com>
* Introduce a new helper function check_search() derived for res_hnok tobrooks2005-08-301-0/+56
| | | | | | | | | | | | | | | check the domain-name parameter according to the rules for "search" strings as documented in resolv.conf(5). Specifically, the string must be no more than 256 bytes long and contain no more than six valid domain names separated by white space. The previous unchecked values could result in a mangled resolv.conf file which could effectively deny access to local sites. This is not a security issue as rogue dhcp servers could already do this without sending invalid strings. Reviewed by: cperciva MFC After: 3 days
* The $medium string often contains quoted values with spaces in them (ssids,brooks2005-08-261-6/+6
| | | | | | | for example). Follow the example of the ISC script and wrap ifconfig calls using $medium in eval "..." so this works. Reported by: iedowse
* In read_string(), when the last character was a backslash, unincrementbrooks2005-08-261-0/+1
| | | | | | the output index instead of keeping what ever trash was in the buffer. Reported by: iedowse
* Use a more robust, grep-free command to get the interface of the currentbrooks2005-08-261-2/+1
| | | | | | default route. Submitted by: Rostislav Krasny <rosti dot bsd at gmail dot com>
* Don't and/remove a route to our assigned IP through 127.0.0.1. Itbrooks2005-08-261-4/+4
| | | | | | | serves no apparent purpose (we commented this out ages ago in the ISC scripts) and cases problems with some ADSL setups. Reported by: Rostislav Krasny <rosti dot bsd at gmail dot com>
* MFOpenBSD rev 1.9: fix a buffer overflow when processing config filebrooks2005-08-241-1/+1
| | | | | | | lines that are exactly 81 characters in length. Obtained from: OpenBSD MFC After: 3 days
* Add __FBSDID to all .c files in dhclient to aid in determining filebrooks2005-08-2316-4/+48
| | | | versions when dealing with user problems.
* FreeBSD unconditionally supports write filters now.csjp2005-08-231-2/+0
|
* Further fix receive_packet() by using BPF_WORDALIGN to insure the offsetbrooks2005-07-281-5/+15
| | | | | | is properly aligned when we move to the next packet. Obtained from: ISC dhclient via krw at OpenBSD
* Don't reject packets with server names containing characters that arebrooks2005-07-281-7/+6
| | | | | | | not allowed in domain names. RFC 2132 does not list valid or invalid characters and the ISC client accepts anything here. Reported by: ps
* Fix a bug in the handling of cases where we got a short (or zero)brooks2005-07-271-4/+4
| | | | | | | | capture. Zero length captures caused an infinte loop and short captures probably caused memory corruption and a crash. Reported by: many MFC After: 3 days
* s/if_defaulroute/if_defaultroute/brooks2005-07-261-1/+1
| | | | We may now handle route updates better.
* Change host-name from type "X" to type "t". This allows the client tobrooks2005-07-251-1/+2
| | | | | | | | | | | | | | | | | accept NUL-terminated strings as required by RFC 2132. This solution is not perfect as it removes the ability to send NUL-terminated host-name options which may be required by some broken servers. Given the current lack of an existance proof of such servers and the fact that servers that send NUL-terminated domain names do exist, this seems like an acceptable compromise. A discussion of these issues can be found at: http://marc.theaimsgroup.com/?l=dhcp-client&m=96837107208382&w=2 PR: bin/83468 Reported by: Sean Winn <sean at gothic dot net dot au> MFC-after: 3 days
* treat REASSOC events just like ASSOCsam2005-07-251-0/+1
| | | | MFC after: 3 days
* Bump document date.marks2005-07-201-1/+1
| | | | Reminded by: ru
* Document -b flag of dhclient.marks2005-07-201-0/+4
| | | | | Reviewed by: ru MFC after: 3 days
* Don't complain when we receive smtp, pop, nntp, www, finger, and ircbrooks2005-06-302-0/+13
| | | | | | | server options. Reported by: Max Boyarov <max_b at tut dot by> Approved by: re (dhclient blanket)
* People like to do RFC violating things with the domain-name option andbrooks2005-06-301-1/+1
| | | | | | | | | | | | include a space seperated list of domains instead of the domain of the host. This is supported on too many platforms to break for now so, remove validation of this option for the moment. The correct solution longer term is to implement RFC 3397 support and then treat domain-name options containing space seperated lists of domains as domain-search options for backwards compatability. Approved by: re (dhclient blanket)
* Install the dhcp-options.5 manpage.ru2005-06-251-1/+2
| | | | | Timeout from: brooks Approved by: re (blanket manpages)
* Line up the markup.ru2005-06-225-137/+200
| | | | Approved by: re (blanket)
* Avoid a null pointer dereference by not expiring our lease if we don'tbrooks2005-06-131-6/+9
| | | | | | | | have an active one. Submitted by: sam Reported by: James Snow <snow at teardrop dot org> Approved by: re (dhclient blanket)
* Add support for /etc/dhclient-enter-hooks to match /etc/dhclient-exit-hooks.brooks2005-06-101-0/+11
|
* Add support for /etc/dhclient-exit-hooks file.brooks2005-06-081-3/+13
| | | | Tested by: Max Boyarov <max_b at tut dot by>
* Fix build on 64-bit platforms where time_t is 64 bit. Since wherebrooks2005-06-071-4/+5
| | | | | | | | talking about time related to leases, it should be OK to cast these to (int)s rather than using intmax_t. Submitted by: ru Pointy hat: brooks
* - Remove OpenBSD'ism (bsd.own.mk).ru2005-06-071-4/+0
| | | | - Remove redundant and harmful -Wall from CFLAGS.
* Use SCRIPTS to install dhclient-script instead of rolling our own.brooks2005-06-071-4/+1
|
* FreeBSDize the dhclient-script.brooks2005-06-071-21/+54
| | | | Submitted by: sam
* Define _PATH_VAREMPTY.brooks2005-06-071-1/+39
| | | | | | | | | Add a -b option to background immediatly. Add support for 802.11 routing messages to "instantly" renegotiate at lease when we associate with a new network. Submitted by: sam
* NULL is not a valid time_t.brooks2005-06-071-12/+13
| | | | Submitted by: sam
* We don't support BPF write filters at this time.brooks2005-06-071-0/+3
| | | | Submitted by: sam
* Take the OpenBSD version of the Makefile to resolve conflicts as the oldbrooks2005-06-071-59/+48
| | | | one is irrelevent. Add $FreeBSD.
* This commit was generated by cvs2svn to compensate for changes in r147072,brooks2005-06-0728-0/+10396
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tagbrooks2005-06-0729-20/+10434
| | | | | | | | OPENBSD_3_7).
* | Remove the bits to build the isc-dhclient.brooks2005-06-079-694/+0
| |
* | Let bsd.prog.mk set SRCS and MAN to their default values.ru2005-01-281-3/+0
| |
* | Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-212-2/+2
| | | | | | | | OK'ed by: core
* | For variables that are only checked with defined(), don't provideru2004-10-245-7/+7
| | | | | | | | any fake value.
* | style.Makefile(5):johan2004-02-231-1/+1
| | | | | | | | Use WARNS?= instead of WARNS=.
* | Update maintainer line. mbr has been maintainer for at least the lastmurray2003-11-301-1/+1
| | | | | | | | | | | | 6 months. Approved by: re (murray)
* | Turn the annoying and long error message off. It was sombr2003-08-091-1/+1
| | | | | | | | | | | | long that it was even hard to find the real error cause. Requested by: rwatson
OpenPOWER on IntegriCloud