2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 22:05:23 +00:00

Try to use client-supplied hostname as identifier in DHCPACK messages.

This commit is contained in:
Ted Lemon
1999-10-21 14:56:05 +00:00
parent 3330609cbb
commit 86bbcc1c28

View File

@@ -22,7 +22,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: dhcp.c,v 1.121 1999/10/21 02:42:57 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; "$Id: dhcp.c,v 1.122 1999/10/21 14:56:05 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@@ -1851,16 +1851,22 @@ void dhcp_reply (lease)
/* Say what we're doing... */ /* Say what we're doing... */
log_info ("%s on %s to %s via %s", log_info ("%s on %s to %s via %s",
(state -> offer (state -> offer
? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER") ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
: "BOOTREPLY"), : "BOOTREPLY"),
piaddr (lease -> ip_addr), piaddr (lease -> ip_addr),
print_hw_addr (lease -> hardware_addr.htype, (lease -> client_hostname &&
lease -> hardware_addr.hlen, db_printable (lease -> client_hostname))
lease -> hardware_addr.haddr), ? lease -> client_hostname
state -> giaddr.s_addr : (lease -> hardware_addr.htype
? inet_ntoa (state -> giaddr) ? print_hw_addr (lease -> hardware_addr.htype,
: state -> ip -> name); lease -> hardware_addr.hlen,
lease -> hardware_addr.haddr)
: print_hex_1 (lease -> uid_len, lease -> uid,
lease -> uid_len)),
state -> giaddr.s_addr
? inet_ntoa (state -> giaddr)
: state -> ip -> name);
/* Set up the hardware address... */ /* Set up the hardware address... */
hto.htype = lease -> hardware_addr.htype; hto.htype = lease -> hardware_addr.htype;