aboutsummaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhclient-script
Commit message (Collapse)AuthorAgeFilesLines
* Set svn:executable on dhclient-scriptJean-Sébastien Pédron2011-12-301-0/+0
| | | | | | | Sponsored by: Yakaz (http://www.yakaz.com) Notes: svn path=/head/; revision=229002
* dhclient-script relied on incorrect behavior of SIOCAIFADDR ioctl,Gleb Smirnoff2011-12-131-1/+1
| | | | | | | | | | | | | | | that changed 0.0.0.0/0.0.0.0 prefix to 0.0.0.0/255.0.0.0. In the r228313 this behavior was fixed, and since dhclient-script got broken. I'm not sure this fix is a perfect one, it just changes dhclient-script to set 0.0.0.0/255.0.0.0 explicitly. PR: kern/163206 Notes: svn path=/head/; revision=228463
* Support domain-search in dhclient(8)Jean-Sébastien Pédron2011-12-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | The "domain-search" option (option 119) allows a DHCP server to publish a list of implicit domain suffixes used during name lookup. This option is described in RFC 3397. For instance, if the domain-search option says: ".example.org .example.com" and one wants to resolve "foobar", the resolver will try: 1. "foobar.example.org" 2. "foobar.example.com" The file /etc/resolv.conf is updated with a "search" directive if the DHCP server provides "domain-search". A regression test suite is included in this patch under tools/regression/sbin/dhclient. PR: bin/151940 Sponsored by Yakaz (http://www.yakaz.com) Notes: svn path=/head/; revision=228259
* Use resolvconf(8) to update /etc/resolv.conf.Hajimu UMEMOTO2011-03-181-23/+44
| | | | | | | | If you don't want to use resolvconf(8) to update /etc/resolv.conf, you can put resolvconf_enable="NO" into /etc/dhclient-enter-hooks. Notes: svn path=/head/; revision=219739
* Use the -n flag to route(8) when calling "route get". Otherwise we hangBrooks Davis2008-06-091-1/+1
| | | | | | | | | for a long time if we get a lease, but DNS isn't working. MFC after: 1 week Notes: svn path=/head/; revision=179689
* Add a new function is_default_interface() which determines if thisBrooks Davis2008-03-301-20/+48
| | | | | | | | | | | | | | interface is one with the default route (or there isn't one). Use it to decide if we should adjust the default route and /etc/resolv.conf. Fix the delete of the default route. The if statement was totally bogus and the delete only worked due to a typo. [1] Reported by: Jordan Coleman <jordan at JordanColeman dot com> [1] MFC after: 1 week Notes: svn path=/head/; revision=177730
* During PREINIT, when giving the interface the address 0.0.0.0, do it as anBrooks Davis2008-01-211-1/+1
| | | | | | | | | | alias to avoid distrubing other addresses. PR: bin/119255 Submitted by: Jaakko Heinonen <jh at saunalahti dot fi> Notes: svn path=/head/; revision=175554
* Use the -n flag on ifconfig so that dhclient does not cause the kernel moduleAndrew Thompson2007-07-031-8/+9
| | | | | | | | | | to be reloaded when the interface is torn down. Reviewed by: brooks Approved by: re (kensmith) Notes: svn path=/head/; revision=171187
* The minimum size of an RFC3442 destination descriptor is five bytes, soEd Maste2007-04-131-1/+1
| | | | | | | | | | correct test to -ge 5. Without this change an RFC3442 encoded default route would be ignored. Reported by: Cedric Jonas <cedric at decemplex dot net> Notes: svn path=/head/; revision=168689
* Implement RFC3442, the Classless Static Route option.Ed Maste2007-02-091-0/+60
| | | | | | | | | | | | | | The original DHCP specification includes a route option but it supports only class-based routes. RFC3442 adds support for specifying the netmask width for each static route. A variable length encoding is used to minimize the size of this option. PR: bin/99534 Submitted by: Andrey V. Elsukov <bu7cher@yandex.ru> Reviewed by: brooks Notes: svn path=/head/; revision=166602
* Fix rev 1.12.Brooks Davis2006-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). Notes: svn path=/head/; revision=154869
* Give the TIMEOUT case a chance to work by using -t # instead of theBrooks Davis2006-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 Notes: svn path=/head/; revision=154760
* Make dhclient-script more agreeable with read-only /etc.Wes Peters2006-01-231-9/+10
| | | | | | | | | PR: 90518 Submitted by: John E. Hein <jhein@timing.com> MFC after: 3 days Notes: svn path=/head/; revision=154702
* When we give up on an interface, use the arp(8) command to remove allBrooks Davis2006-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 Notes: svn path=/head/; revision=154164
* Avoid updating resolv.conf when no changes have actually occured.Brooks Davis2005-09-081-0/+10
| | | | | | | Submitted by: ume Notes: svn path=/head/; revision=149898
* When we fail to aquire a lease, our lease expires without a sucessfulBrooks Davis2005-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. Notes: svn path=/head/; revision=149896
* The $medium string often contains quoted values with spaces in them (ssids,Brooks Davis2005-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 Notes: svn path=/head/; revision=149519
* Use a more robust, grep-free command to get the interface of the currentBrooks Davis2005-08-261-2/+1
| | | | | | | | | default route. Submitted by: Rostislav Krasny <rosti dot bsd at gmail dot com> Notes: svn path=/head/; revision=149480
* Don't and/remove a route to our assigned IP through 127.0.0.1. ItBrooks Davis2005-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> Notes: svn path=/head/; revision=149479
* s/if_defaulroute/if_defaultroute/Brooks Davis2005-07-261-1/+1
| | | | | | | We may now handle route updates better. Notes: svn path=/head/; revision=148420
* Add support for /etc/dhclient-enter-hooks to match /etc/dhclient-exit-hooks.Brooks Davis2005-06-101-0/+11
| | | | Notes: svn path=/head/; revision=147218
* Add support for /etc/dhclient-exit-hooks file.Brooks Davis2005-06-081-3/+13
| | | | | | | Tested by: Max Boyarov <max_b at tut dot by> Notes: svn path=/head/; revision=147138
* FreeBSDize the dhclient-script.Brooks Davis2005-06-071-21/+54
| | | | | | | Submitted by: sam Notes: svn path=/head/; revision=147086
* Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tagBrooks Davis2005-06-071-0/+227
OPENBSD_3_7). Notes: svn path=/vendor/OpenBSD/dist/; revision=147072