#ifndef lint
static char copyright[] =
-"$Id: bootp.c,v 1.29 1998/02/06 01:05:39 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bootp.c,v 1.30 1998/03/17 06:18:06 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (host && (!host -> group -> allow_booting)) {
note ("Ignoring excluded BOOTP client %s",
- host -> name);
+ host -> name
+ ? host -> name
+ : print_hw_addr (packet -> raw -> htype,
+ packet -> raw -> hlen,
+ packet -> raw -> chaddr));
return;
}
if (host && (!host -> group -> allow_bootp)) {
note ("Ignoring BOOTP request from client %s",
- host -> name);
+ host -> name
+ ? host -> name
+ : print_hw_addr (packet -> raw -> htype,
+ packet -> raw -> hlen,
+ packet -> raw -> chaddr));
return;
}
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.47 1998/03/16 06:17:37 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.48 1998/03/17 06:18:58 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
char *val;
int token;
struct host_decl *host;
- char *name = parse_host_name (cfile);
+ char *name;
int declaration = 0;
- if (!name)
- return;
+ token = peek_token (&val, cfile);
+ if (token != LBRACE) {
+ name = parse_host_name (cfile);
+ if (!name)
+ return;
+ } else {
+ name = (char *)0;
+ }
host = (struct host_decl *)dmalloc (sizeof (struct host_decl),
"parse_host_declaration");
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.59 1998/03/16 06:18:03 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.60 1998/03/17 06:20:51 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
} else if (lease -> host &&
!lease -> host -> group -> allow_booting) {
note ("Declining to boot client %s",
- lease -> host -> name);
+ lease -> host -> name
+ ? lease -> host -> name
+ : print_hw_addr (packet -> raw -> htype,
+ packet -> raw -> hlen,
+ packet -> raw -> chaddr));
} else
ack_lease (packet, lease, DHCPOFFER, cur_time + 120);
}
ip_lease -> uid_len == packet -> options [i].len &&
!memcmp (packet -> options [i].data,
ip_lease -> uid, ip_lease -> uid_len)) {
- warn ("client %s has duplicate leases on %s",
- print_hw_addr (packet -> raw -> htype,
- packet -> raw -> hlen,
- packet -> raw -> chaddr),
- ip_lease -> shared_network -> name);
+ if (uid_lease -> ends > cur_time)
+ warn ("client %s has duplicate leases on %s",
+ print_hw_addr (packet -> raw -> htype,
+ packet -> raw -> hlen,
+ packet -> raw -> chaddr),
+ ip_lease -> shared_network -> name);
uid_lease = ip_lease;
}
ip_lease = (struct lease *)0;