summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/confpars.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-04-24 14:58:37 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-04-24 14:58:37 +0000
commitc480b6a37e485143c4aae637c6f4dc9dbe9d6eab (patch)
tree84bbd12b1d83ffe8b7226a80dfb38f55494afa82 /usr.sbin/dhcpd/confpars.c
parente1b1ee19f56a02f73d5060b9c8bbfdbbe7975909 (diff)
Add 'echo-client-id' statment, so that RFC 6842 behaviour can be
turned off for those clients and networks that find it impossible to move past RFC 2131. Modelled on the same statement in recent ISC versions, though we default to 'on' (a.k.a. RFC 6842) rather that 'off' (a.k.a. RFC 2131). Problems reported by Bastien Durel (Xerox Phaser 6022 printer) and Bryan Vyhmeister (Hon Hai Precision router) via misc@. Thanks!
Diffstat (limited to 'usr.sbin/dhcpd/confpars.c')
-rw-r--r--usr.sbin/dhcpd/confpars.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/confpars.c b/usr.sbin/dhcpd/confpars.c
index 820556eb7d1..1dd4a55d2a2 100644
--- a/usr.sbin/dhcpd/confpars.c
+++ b/usr.sbin/dhcpd/confpars.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: confpars.c,v 1.32 2017/04/12 19:12:01 krw Exp $ */
+/* $OpenBSD: confpars.c,v 1.33 2017/04/24 14:58:36 krw Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
@@ -82,6 +82,7 @@ readconf(void)
root_group.allow_bootp = 1;
root_group.allow_booting = 1;
root_group.authoritative = 1;
+ root_group.echo_client_id = 1;
if ((cfile = fopen(path_dhcpd_conf, "r")) == NULL)
fatal("Can't open %s", path_dhcpd_conf);
@@ -319,6 +320,10 @@ parse_statement(FILE *cfile, struct group *group, int type,
group->always_reply_rfc1048 = parse_boolean(cfile);
break;
+ case TOK_ECHO_CLIENT_ID:
+ group->echo_client_id = parse_boolean(cfile);
+ break;
+
case TOK_USE_HOST_DECL_NAMES:
if (type == HOST_DECL)
parse_warn("use-host-decl-names not allowed here.");