From: David Hankins Date: Mon, 21 Jan 2008 19:13:45 +0000 (+0000) Subject: - MINUS tokens should be parseable again. [ISC-Bugs #17289] X-Git-Tag: v4_1_0a1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dc9b5fb308aa6628f231989d6caad4fb319d5ee;p=thirdparty%2Fdhcp.git - MINUS tokens should be parseable again. [ISC-Bugs #17289] --- diff --git a/RELNOTES b/RELNOTES index 25d5d1c4e..d959f0469 100644 --- a/RELNOTES +++ b/RELNOTES @@ -139,6 +139,8 @@ suggested fixes to . - The failover server no longer issues a floating point error if it encounters a previously undefined option code. +- MINUS tokens should be parseable again. + Changes since 4.0.0b3 - The reverse dns name for PTR updates on IPv6 addresses has been fixed to diff --git a/common/conflex.c b/common/conflex.c index 9a82fb270..5ac39d8df 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -649,7 +649,14 @@ static enum dhcp_token read_number (c, cfile) cfile -> tlen = i; cfile -> tval = cfile -> tokbuf; - return token; + /* + * If this entire token from start to finish was "-", such as + * the middle parameter in "42 - 7", return just the MINUS token. + */ + if ((i == 1) && (cfile->tokbuf[i] == '-')) + return MINUS; + else + return token; } static enum dhcp_token read_num_or_name (c, cfile)