]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- 'get-host-names true;' now also works even if 'use-host-decl-names true;'
authorDavid Hankins <dhankins@isc.org>
Tue, 13 Jul 2010 18:43:41 +0000 (18:43 +0000)
committerDavid Hankins <dhankins@isc.org>
Tue, 13 Jul 2010 18:43:41 +0000 (18:43 +0000)
  was also configured.  The nature of this repair also fixes another
  error; the host-name supplied by a client is no longer overridden by a
  reverse lookup of the lease address.  Thanks to a patch from Wilco Baan
  Hofman supplied to us by the Debian package maintenance team.
  [ISC-Bugs #21691] {Debian Bug#509445}

RELNOTES
server/dhcp.c

index 03ef3896f2985719020bdd82f5f2ff41db824c1c..a0001fc9bfad661986c0df0df9a3c21b7a9abb2e 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -48,6 +48,13 @@ work on other platforms. Please report any problems and suggested fixes to
   line to nroff, escape them if we actually want a quote.
   [ISC-Bugs #18916] sync the pointer to web pages amongst the different docs
 
+- 'get-host-names true;' now also works even if 'use-host-decl-names true;'
+  was also configured.  The nature of this repair also fixes another
+  error; the host-name supplied by a client is no longer overridden by a
+  reverse lookup of the lease address.  Thanks to a patch from Wilco Baan
+  Hofman supplied to us by the Debian package maintenance team.
+  [ISC-Bugs #21691] {Debian Bug#509445}
+
                        Changes since 4.2.0b2
 
 - Add declaration for variable in debug code in alloc.c.  [ISC-Bugs #21472]
index 9e83983584579b11ce5ca55b4bb236cc00bf0db0..3dd95ae36327cf67bebf8544945d8dfa15e7cea9 100644 (file)
@@ -2677,12 +2677,13 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
 
        /* If we don't have a hostname yet, and we've been asked to do
           a reverse lookup to find the hostname, do it. */
+       i = DHO_HOST_NAME;
        j = SV_GET_LEASE_HOSTNAMES;
-       if (!lookup_option (&server_universe, state -> options, i) &&
-           (evaluate_boolean_option_cache
-            (&ignorep, packet, lease, (struct client_state *)0,
-             packet -> options, state -> options, &lease -> scope,
-             lookup_option (&server_universe, state -> options, j), MDL))) {
+       if (!lookup_option(&dhcp_universe, state->options, i) &&
+           evaluate_boolean_option_cache
+            (&ignorep, packet, lease, NULL,
+             packet->options, state->options, &lease->scope,
+             lookup_option (&server_universe, state->options, j), MDL)) {
                struct in_addr ia;
                struct hostent *h;