]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
When parsing a lease database, correctly transfer the client hostname and hostname...
authorTed Lemon <source@isc.org>
Sun, 8 Jun 1997 03:28:01 +0000 (03:28 +0000)
committerTed Lemon <source@isc.org>
Sun, 8 Jun 1997 03:28:01 +0000 (03:28 +0000)
common/memory.c

index 035f7e7fa5e61458019054531abf0370088788d9..38221bb355f49d4b456c6bd85d0bef0fbcd486aa 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: memory.c,v 1.32 1997/05/09 08:06:29 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: memory.c,v 1.33 1997/06/08 03:28:01 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -323,6 +323,9 @@ void new_address_range (low, high, subnet, dynamic)
                                dangling_leases = lp -> next;
                        }
                        lp -> next = (struct lease *)0;
+                       address_range [lhost - i].hostname = lp -> hostname;
+                       address_range [lhost - i].client_hostname =
+                               lp -> client_hostname;
                        supersede_lease (&address_range [lhost - i], lp, 0);
                        free_lease (lp, "new_address_range");
                } else
@@ -423,6 +426,9 @@ void enter_lease (lease)
                lease -> prev = (struct lease *)0;
                dangling_leases = lease;
        } else {
+               /* Record the hostname information in the lease. */
+               comp -> hostname = lease -> hostname;
+               comp -> client_hostname = lease -> client_hostname;
                supersede_lease (comp, lease, 0);
        }
 }