summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2010-07-13 18:44:08 +0000
committerDavid Hankins <dhankins@isc.org>2010-07-13 18:44:08 +0000
commit388ed925d5a7bb9eb63e61e719a945fc52b48906 (patch)
tree0169c6cadff029edfee2b1085b7fa59809e87501 /server
parent079f747eb20d40e80c65e8a984d6c50860560b3c (diff)
downloadisc-dhcp-388ed925d5a7bb9eb63e61e719a945fc52b48906.tar.gz
- '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}
Diffstat (limited to 'server')
-rw-r--r--server/dhcp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/dhcp.c b/server/dhcp.c
index 9e839835..3dd95ae3 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;