]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- MINUS tokens should be parseable again. [ISC-Bugs #17289]
authorDavid Hankins <dhankins@isc.org>
Mon, 21 Jan 2008 19:13:45 +0000 (19:13 +0000)
committerDavid Hankins <dhankins@isc.org>
Mon, 21 Jan 2008 19:13:45 +0000 (19:13 +0000)
RELNOTES
common/conflex.c

index 25d5d1c4e598c23b721dabab83487f1c51ce0c08..d959f04696cd583d4b195861a90dc2ae19d208ed 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -139,6 +139,8 @@ suggested fixes to <dhcp-users@isc.org>.
 - 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
index 9a82fb270a64670d1f5ea26408aa909992296775..5ac39d8dfa5202992abe32bced0e47e53389f81d 100644 (file)
@@ -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)