diff --git a/server/db.c b/server/db.c index 4882aa41..dac8775c 100644 --- a/server/db.c +++ b/server/db.c @@ -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) {