summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/parse.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-05-18 17:51:21 +0000
committerkrw <krw@openbsd.org>2015-05-18 17:51:21 +0000
commit11b1f78ac67154562cb30cbdd164ae54e7e66fd6 (patch)
tree0498081d6fe2d220f89528fad255700ea047c510 /sbin/dhclient/parse.c
parentFix a crash reported and analyzed by Bertrand PROVOST. When a HTTP (diff)
downloadwireguard-openbsd-11b1f78ac67154562cb30cbdd164ae54e7e66fd6.tar.xz
wireguard-openbsd-11b1f78ac67154562cb30cbdd164ae54e7e66fd6.zip
Tweak parsing so that hostnames starting with 0-9 are accepted.
Reported long ago by matthieu@. Also Jacob Berkman via the lists. Tests and suggestions from Jacob and Matthieu.
Diffstat (limited to 'sbin/dhclient/parse.c')
-rw-r--r--sbin/dhclient/parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index bd71cccbd1b..f53e62f1e39 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.38 2014/05/05 18:02:49 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.39 2015/05/18 17:51:21 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -351,6 +351,7 @@ parse_date(FILE *cfile)
switch (token) {
case TOK_NAME:
case TOK_NUMBER:
+ case TOK_NUMBER_OR_NAME:
case '/':
case ':':
token = next_token(&val, cfile);