From: Ted Lemon Date: Mon, 12 Jul 1999 22:43:08 +0000 (+0000) Subject: Get host-name from packet, not from server configuration. X-Git-Tag: V3-BETA-1-PATCH-2~5^2~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44e8c8bea2f5859d26726b3f67723013ade428ea;p=thirdparty%2Fdhcp.git Get host-name from packet, not from server configuration. --- diff --git a/common/nsupdate.c b/common/nsupdate.c index a989ee550..0e789f71d 100644 --- a/common/nsupdate.c +++ b/common/nsupdate.c @@ -25,7 +25,7 @@ #ifndef lint 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 */ #include "dhcpd.h" @@ -129,13 +129,13 @@ char *ddns_fwd_name(lease, state, packet) SV_DDNS_HOST_NAME); memset (&d, 0, sizeof d); if (oc && evaluate_option_cache (&d, packet, - packet -> options, lease, oc)) { + state -> options, lease, oc)) { memcpy(hostname, d.data, d.len); hostname[d.len]='\0'; data_string_forget (&d, "nsupdate"); } else { oc = lookup_option (&dhcp_universe, - state -> options, DHO_HOST_NAME); + packet -> options, DHO_HOST_NAME); memset (&d, 0, sizeof d); if (oc && evaluate_option_cache (&d, packet, packet -> options, lease, oc)) {