2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

Get host-name from packet, not from server configuration.

This commit is contained in:
Ted Lemon
1999-07-12 22:43:08 +00:00
parent 2aa05628df
commit 44e8c8bea2

View File

@@ -25,7 +25,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: nsupdate.c,v 1.3 1999/07/07 15:32:02 mellon Exp $ Copyright (c) 1999 The Internet Software Consortium. All rights reserved.\n"; "$Id: nsupdate.c,v 1.4 1999/07/12 22:43:08 mellon Exp $ Copyright (c) 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@@ -129,13 +129,13 @@ char *ddns_fwd_name(lease, state, packet)
SV_DDNS_HOST_NAME); SV_DDNS_HOST_NAME);
memset (&d, 0, sizeof d); memset (&d, 0, sizeof d);
if (oc && evaluate_option_cache (&d, packet, if (oc && evaluate_option_cache (&d, packet,
packet -> options, lease, oc)) { state -> options, lease, oc)) {
memcpy(hostname, d.data, d.len); memcpy(hostname, d.data, d.len);
hostname[d.len]='\0'; hostname[d.len]='\0';
data_string_forget (&d, "nsupdate"); data_string_forget (&d, "nsupdate");
} else { } else {
oc = lookup_option (&dhcp_universe, oc = lookup_option (&dhcp_universe,
state -> options, DHO_HOST_NAME); packet -> options, DHO_HOST_NAME);
memset (&d, 0, sizeof d); memset (&d, 0, sizeof d);
if (oc && evaluate_option_cache (&d, packet, packet -> options, if (oc && evaluate_option_cache (&d, packet, packet -> options,
lease, oc)) { lease, oc)) {