]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Get host-name from packet, not from server configuration.
authorTed Lemon <source@isc.org>
Mon, 12 Jul 1999 22:43:08 +0000 (22:43 +0000)
committerTed Lemon <source@isc.org>
Mon, 12 Jul 1999 22:43:08 +0000 (22:43 +0000)
common/nsupdate.c

index a989ee55086308b4b8d268d752989156ab7ad73b..0e789f71d50ca876e32402e18ff3d109f7a729e1 100644 (file)
@@ -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)) {