2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 13:28:14 +00:00

Write out client_hostname and hostname values when writing out a lease

This commit is contained in:
Ted Lemon 1997-05-09 08:22:00 +00:00
parent ccf5778aac
commit 00d6d87c9e

View 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) {