summaryrefslogtreecommitdiff
path: root/sbin/dhclient/clparse.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2015-05-18 17:51:22 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2015-05-18 17:51:22 +0000
commit848d846c88b6a0e1653fb3114c1901199f239f4b (patch)
tree60789c82de7236bf9a73b09dfa8d4656f7d075c3 /sbin/dhclient/clparse.c
parente6e966973763b899a3fadc00b1952a76b387f2bb (diff)
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/clparse.c')
-rw-r--r--sbin/dhclient/clparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index f0bd69ac23e..ae33a75970f 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.91 2015/02/01 18:43:39 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.92 2015/05/18 17:51:21 krw Exp $ */
/* Parser for dhclient config and lease files. */
@@ -286,7 +286,7 @@ parse_X(FILE *cfile, u_int8_t *buf, int max)
int len;
token = peek_token(&val, cfile);
- if (token == TOK_NUMBER_OR_NAME || token == TOK_NUMBER) {
+ if (token == TOK_NUMBER_OR_NAME) {
len = 0;
for (token = ':'; token == ':';
token = next_token(NULL, cfile)) {