From f3dd4cf940a23c6a3ecda4a30d4dff3bc7685bc0 Mon Sep 17 00:00:00 2001 From: Jiří Popelka Date: Apr 28 2010 14:05:21 +0000 Subject: - Add domain-search to the list of default requested DHCP options (#586906) --- diff --git a/dhcp-4.1.1-default-requested-options.patch b/dhcp-4.1.1-default-requested-options.patch index 86ae6ae..f05bcdd 100644 --- a/dhcp-4.1.1-default-requested-options.patch +++ b/dhcp-4.1.1-default-requested-options.patch @@ -1,16 +1,16 @@ diff -up dhcp-4.1.1/client/clparse.c.requested dhcp-4.1.1/client/clparse.c ---- dhcp-4.1.1/client/clparse.c.requested 2010-02-22 16:45:15.000000000 +0100 -+++ dhcp-4.1.1/client/clparse.c 2010-02-22 16:45:58.000000000 +0100 +--- dhcp-4.1.1/client/clparse.c.requested 2010-04-28 15:20:43.000000000 +0200 ++++ dhcp-4.1.1/client/clparse.c 2010-04-28 15:21:49.000000000 +0200 @@ -37,7 +37,7 @@ struct client_config top_level_config; -#define NUM_DEFAULT_REQUESTED_OPTS 9 -+#define NUM_DEFAULT_REQUESTED_OPTS 13 ++#define NUM_DEFAULT_REQUESTED_OPTS 14 struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1]; static void parse_client_default_duid(struct parse *cfile); -@@ -111,6 +111,26 @@ isc_result_t read_client_conf () +@@ -111,6 +111,31 @@ isc_result_t read_client_conf () option_code_hash_lookup(&default_requested_options[8], dhcpv6_universe.code_hash, &code, 0, MDL); @@ -34,6 +34,11 @@ diff -up dhcp-4.1.1/client/clparse.c.requested dhcp-4.1.1/client/clparse.c + option_code_hash_lookup(&default_requested_options[12], + dhcp_universe.code_hash, &code, 0, MDL); + ++ /* 14 */ ++ code = DHO_DOMAIN_SEARCH; ++ option_code_hash_lookup(&default_requested_options[13], ++ dhcp_universe.code_hash, &code, 0, MDL); ++ for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) { if (default_requested_options[code] == NULL) log_fatal("Unable to find option definition for " diff --git a/dhcp-4.1.1-invalid-dhclient-conf.patch b/dhcp-4.1.1-invalid-dhclient-conf.patch index a547ec3..579d7f0 100644 --- a/dhcp-4.1.1-invalid-dhclient-conf.patch +++ b/dhcp-4.1.1-invalid-dhclient-conf.patch @@ -6,7 +6,7 @@ diff -up dhcp-4.1.1/client/dhclient.conf.supersede dhcp-4.1.1/client/dhclient.co send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; send dhcp-lease-time 3600; -supersede domain-name "fugue.com home.vix.com"; -+supersede domain-search "fugue.com home.vix.com"; ++supersede domain-search "fugue.com", "home.vix.com"; prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, host-name; diff --git a/dhcp-4.1.1-manpages.patch b/dhcp-4.1.1-manpages.patch index 61cb06c..25a1d09 100644 --- a/dhcp-4.1.1-manpages.patch +++ b/dhcp-4.1.1-manpages.patch @@ -470,14 +470,20 @@ diff -up dhcp-4.1.1/client/dhclient.conf.5.man dhcp-4.1.1/client/dhclient.conf.5 -domain-name, domain-name-servers and host-name options. Note that if -you enter a 'request' statement, you over-ride this default and these -options will not be requested. -+domain-name, domain-name-servers, host-name, nis-domain, nis-servers, ++domain-name, domain-search, domain-name-servers, host-name, nis-domain, nis-servers, +ntp-servers and interface-mtu options. The DHCPv6 client requests by default +name-servers and domain-search. Note that if you enter a 'request' statement, +you over-ride this default and these options will not be requested. .PP In some cases, it may be desirable to send no parameter request list at all. To do this, simply write the request statement but specify -@@ -239,17 +240,6 @@ than the default requested lease time, w +@@ -234,22 +235,11 @@ The send statement causes the client to + the server with the specified values. These are full option + declarations as described in \fBdhcp-options(5)\fR. Options that are + always sent in the DHCP protocol should not be specified here, except +-that the client can specify a \fBrequested-lease-time\fR option other ++that the client can specify a requested \fBdhcp-lease-time\fR option other + than the default requested lease time, which is two hours. The other obvious use for this statement is to send information to the server that will allow it to differentiate between this client and other clients or kinds of clients. @@ -519,7 +525,7 @@ diff -up dhcp-4.1.1/client/dhclient.conf.5.man dhcp-4.1.1/client/dhclient.conf.5 send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; send dhcp-lease-time 3600; - supersede domain-name "fugue.com rc.vix.com home.vix.com"; -+ supersede domain-search "fugue.com rc.vix.com home.vix.com"; ++ supersede domain-search "fugue.com", "rc.vix.com", "home.vix.com"; prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, host-name; diff --git a/dhcp.spec b/dhcp.spec index 7161db6..8969e91 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -13,7 +13,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: %{basever} -Release: 18%{?dist} +Release: 19%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -511,6 +511,9 @@ fi %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz %changelog +* Wed Apr 28 2010 Jiri Popelka - 12:4.1.1-19 +- Add domain-search to the list of default requested DHCP options (#586906) + * Wed Apr 21 2010 Jiri Popelka - 12:4.1.1-18 - If the Reply was received in response to Renew or Rebind message, client adds any new addresses in the IA option to the IA (#578097)