From: Ted Lemon Date: Sun, 8 Jun 1997 03:28:01 +0000 (+0000) Subject: When parsing a lease database, correctly transfer the client hostname and hostname... X-Git-Tag: DHCP-970607~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=756c9895825e3f7c5f696b8b77f07954092430f9;p=thirdparty%2Fdhcp.git When parsing a lease database, correctly transfer the client hostname and hostname to the memory-resident lease structure. --- diff --git a/common/memory.c b/common/memory.c index 035f7e7fa..38221bb35 100644 --- a/common/memory.c +++ b/common/memory.c @@ -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); } }