]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Write out client_hostname and hostname values when writing out a lease
authorTed Lemon <source@isc.org>
Fri, 9 May 1997 08:22:00 +0000 (08:22 +0000)
committerTed Lemon <source@isc.org>
Fri, 9 May 1997 08:22:00 +0000 (08:22 +0000)
server/db.c

index 4882aa41a40ef6ca0f5945e5b2ee3b9fc7994601..dac8775ca69db096ce2e34d6d1988820129f202d 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: db.c,v 1.10 1997/03/06 23:41:27 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: db.c,v 1.11 1997/05/09 08:22:00 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -133,6 +133,22 @@ int write_lease (lease)
                        ++errors;
                }
        }
+       if (lease -> client_hostname) {
+               errno = 0;
+               fprintf (db_file, "\n\tclient-hostname %s;",
+                        lease -> client_hostname);
+               if (errno) {
+                       ++errors;
+               }
+       }
+       if (lease -> hostname) {
+               errno = 0;
+               fprintf (db_file, "\n\thostname %s;",
+                        lease -> client_hostname);
+               if (errno) {
+                       ++errors;
+               }
+       }
        errno = 0;
        fputs ("\n}\n", db_file);
        if (errno) {