summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/tables.c
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2011-12-04 14:44:31 +0000
committerdumbbell <dumbbell@FreeBSD.org>2011-12-04 14:44:31 +0000
commitff8355fd0adf45a0a0be9afa0e0791db4f1251ff (patch)
tree7f5d2448f6dafab8a79f813bf2da0674512a632a /sbin/dhclient/tables.c
parente2bfeee07672c9a691d9ee0ac15d92150d93d457 (diff)
downloadFreeBSD-src-ff8355fd0adf45a0a0be9afa0e0791db4f1251ff.zip
FreeBSD-src-ff8355fd0adf45a0a0be9afa0e0791db4f1251ff.tar.gz
Support domain-search in dhclient(8)
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)
Diffstat (limited to 'sbin/dhclient/tables.c')
-rw-r--r--sbin/dhclient/tables.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient/tables.c b/sbin/dhclient/tables.c
index 81a9acc..c7bac57 100644
--- a/sbin/dhclient/tables.c
+++ b/sbin/dhclient/tables.c
@@ -184,7 +184,7 @@ struct option dhcp_options[256] = {
{ "option-116", "X", &dhcp_universe, 116 },
{ "option-117", "X", &dhcp_universe, 117 },
{ "option-118", "X", &dhcp_universe, 118 },
- { "option-119", "X", &dhcp_universe, 119 },
+ { "domain-search", "t", &dhcp_universe, 119 },
{ "option-120", "X", &dhcp_universe, 120 },
{ "classless-routes", "BA", &dhcp_universe, 121 },
{ "option-122", "X", &dhcp_universe, 122 },
@@ -400,12 +400,13 @@ unsigned char dhcp_option_default_priority_list[] = {
DHO_IRC_SERVER,
DHO_STREETTALK_SERVER,
DHO_STREETTALK_DA_SERVER,
+ DHO_DOMAIN_SEARCH,
/* Presently-undefined options... */
62, 63, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 118, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130,
131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
OpenPOWER on IntegriCloud