summaryrefslogtreecommitdiff
path: root/sbin/dhclient/parse.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-10-10 14:01:09 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-10-10 14:01:09 +0000
commita00fa196b7d1e42160ed969d99f8ee3ff75f8d26 (patch)
tree4c2a9233e6425a8beb1f4c81e8327b5e4b06c34a /sbin/dhclient/parse.c
parent8a3ec88570416b3eb058c6ba5f61976b20cfa975 (diff)
Tweak parse_boolean() to be more like its friends.
i.e. handle ';' better, and issue error message ("expecting boolean.") itself.
Diffstat (limited to 'sbin/dhclient/parse.c')
-rw-r--r--sbin/dhclient/parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 563076ebcdb..a3b84682090 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.67 2017/10/10 13:37:00 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.68 2017/10/10 14:01:08 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -280,6 +280,10 @@ parse_boolean(FILE *cfile, unsigned char *buf)
}
}
+ parse_warn("expecting boolean.");
+ if (token != ';')
+ skip_to_semi(cfile);
+
return 0;
}