encountering non-retryable errors during writing) lease file should
no longer result in an infinite recursion.
+- Host declaration hardware addresses and client identifiers may only be
+ configured once. dhcpd will now fail to load config files that specify
+ multiple identifiers (previous versions would silently over-ride the
+ value with the later configured value).
+
Changes since 3.0.4rc1
- The dhcp-options.5 manpage was updated to correct indentation errors
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.157 2006/06/16 19:26:44 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.158 2006/07/20 16:04:03 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
case HARDWARE:
next_token (&val, (unsigned *)0, cfile);
memset (&hardware, 0, sizeof hardware);
+ if (host_decl && memcmp(&hardware, &(host_decl->interface),
+ sizeof(hardware)) != 0) {
+ parse_warn(cfile, "Host %s hardware address already "
+ "configured.", host_decl->name);
+ break;
+ }
+
parse_hardware_param (cfile, &hardware);
if (host_decl)
host_decl -> interface = hardware;
token = next_token (&val, (unsigned *)0, cfile);
data_string_forget (&host -> client_identifier, MDL);
+ if (host->client_identifier.len != 0) {
+ parse_warn(cfile, "Host %s already has a "
+ "client identifier.",
+ host->name);
+ break;
+ }
+
/* See if it's a string or a cshl. */
token = peek_token (&val, (unsigned *)0, cfile);
if (token == STRING) {