From 524705e54ae8879df01602a2f35c2c9b23295dc9 Mon Sep 17 00:00:00 2001 From: David Hankins Date: Tue, 13 Jul 2010 18:43:41 +0000 Subject: [PATCH] - '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} --- RELNOTES | 7 +++++++ server/dhcp.c | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/RELNOTES b/RELNOTES index 03ef3896f..a0001fc9b 100644 --- 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] diff --git a/server/dhcp.c b/server/dhcp.c index 9e8398358..3dd95ae36 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -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; -- 2.39.5