summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELNOTES7
-rw-r--r--server/confpars.c92
2 files changed, 98 insertions, 1 deletions
diff --git a/RELNOTES b/RELNOTES
index be750c13..6d31feb3 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -47,6 +47,13 @@ The system has only been tested on Linux, FreeBSD, and Solaris, and may not
work on other platforms. Please report any problems and suggested fixes to
<dhcp-users@isc.org>.
+ Changes since 4.1.2b1
+
+- Update the code to parse dhcpv6 lease files to accept a semi-colon at
+ the end of the max-life and preferred-life clauses. In order to be
+ backwards compatible with older lease files not finding a semi-colon
+ is also accepted. [ISC-Bugs #22303].
+
Changes since 4.1.1
- Cleaned up some compiler warnings
diff --git a/server/confpars.c b/server/confpars.c
index 4cd322c7..50d4a662 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -3,7 +3,7 @@
Parser for dhcpd config file... */
/*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -4290,6 +4290,21 @@ parse_ia_na_declaration(struct parse *cfile) {
continue;
}
prefer = atoi (val);
+
+ /*
+ * Currently we peek for the semi-colon to
+ * allow processing of older lease files that
+ * don't have the semi-colon. Eventually we
+ * should remove the peeking code.
+ */
+ token = peek_token(&val, NULL, cfile);
+ if (token == SEMI) {
+ token = next_token(&val, NULL, cfile);
+ } else {
+ parse_warn(cfile,
+ "corrupt lease file; "
+ "expecting semicolon.");
+ }
break;
/* Lease valid lifetime. */
@@ -4303,6 +4318,21 @@ parse_ia_na_declaration(struct parse *cfile) {
continue;
}
valid = atoi (val);
+
+ /*
+ * Currently we peek for the semi-colon to
+ * allow processing of older lease files that
+ * don't have the semi-colon. Eventually we
+ * should remove the peeking code.
+ */
+ token = peek_token(&val, NULL, cfile);
+ if (token == SEMI) {
+ token = next_token(&val, NULL, cfile);
+ } else {
+ parse_warn(cfile,
+ "corrupt lease file; "
+ "expecting semicolon.");
+ }
break;
/* Lease expiration time. */
@@ -4623,6 +4653,21 @@ parse_ia_ta_declaration(struct parse *cfile) {
continue;
}
prefer = atoi (val);
+
+ /*
+ * Currently we peek for the semi-colon to
+ * allow processing of older lease files that
+ * don't have the semi-colon. Eventually we
+ * should remove the peeking code.
+ */
+ token = peek_token(&val, NULL, cfile);
+ if (token == SEMI) {
+ token = next_token(&val, NULL, cfile);
+ } else {
+ parse_warn(cfile,
+ "corrupt lease file; "
+ "expecting semicolon.");
+ }
break;
/* Lease valid lifetime. */
@@ -4636,6 +4681,21 @@ parse_ia_ta_declaration(struct parse *cfile) {
continue;
}
valid = atoi (val);
+
+ /*
+ * Currently we peek for the semi-colon to
+ * allow processing of older lease files that
+ * don't have the semi-colon. Eventually we
+ * should remove the peeking code.
+ */
+ token = peek_token(&val, NULL, cfile);
+ if (token == SEMI) {
+ token = next_token(&val, NULL, cfile);
+ } else {
+ parse_warn(cfile,
+ "corrupt lease file; "
+ "expecting semicolon.");
+ }
break;
/* Lease expiration time. */
@@ -4957,6 +5017,21 @@ parse_ia_pd_declaration(struct parse *cfile) {
continue;
}
prefer = atoi (val);
+
+ /*
+ * Currently we peek for the semi-colon to
+ * allow processing of older lease files that
+ * don't have the semi-colon. Eventually we
+ * should remove the peeking code.
+ */
+ token = peek_token(&val, NULL, cfile);
+ if (token == SEMI) {
+ token = next_token(&val, NULL, cfile);
+ } else {
+ parse_warn(cfile,
+ "corrupt lease file; "
+ "expecting semicolon.");
+ }
break;
/* Lease valid lifetime. */
@@ -4970,6 +5045,21 @@ parse_ia_pd_declaration(struct parse *cfile) {
continue;
}
valid = atoi (val);
+
+ /*
+ * Currently we peek for the semi-colon to
+ * allow processing of older lease files that
+ * don't have the semi-colon. Eventually we
+ * should remove the peeking code.
+ */
+ token = peek_token(&val, NULL, cfile);
+ if (token == SEMI) {
+ token = next_token(&val, NULL, cfile);
+ } else {
+ parse_warn(cfile,
+ "corrupt lease file; "
+ "expecting semicolon.");
+ }
break;
/* Prefix expiration time. */