mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-22 18:07:25 +00:00
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].
This commit is contained in:
parent
5484ac9e3a
commit
ad59838e33
5
RELNOTES
5
RELNOTES
@ -124,6 +124,11 @@ work on other platforms. Please report any problems and suggested fixes to
|
|||||||
[ISC-Bugs #20952] Add 64 bit types to configure.ac
|
[ISC-Bugs #20952] Add 64 bit types to configure.ac
|
||||||
[ISC-Bugs #21308] Add "PATH=" to CLIENT_PATH envrionment variable
|
[ISC-Bugs #21308] Add "PATH=" to CLIENT_PATH envrionment variable
|
||||||
|
|
||||||
|
- 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.2.0b2
|
Changes since 4.2.0b2
|
||||||
|
|
||||||
- Add declaration for variable in debug code in alloc.c. [ISC-Bugs #21472]
|
- Add declaration for variable in debug code in alloc.c. [ISC-Bugs #21472]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Parser for dhcpd config file... */
|
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
|
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
@ -4299,6 +4299,21 @@ parse_ia_na_declaration(struct parse *cfile) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
prefer = atoi (val);
|
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;
|
break;
|
||||||
|
|
||||||
/* Lease valid lifetime. */
|
/* Lease valid lifetime. */
|
||||||
@ -4312,6 +4327,21 @@ parse_ia_na_declaration(struct parse *cfile) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
valid = atoi (val);
|
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;
|
break;
|
||||||
|
|
||||||
/* Lease expiration time. */
|
/* Lease expiration time. */
|
||||||
@ -4632,6 +4662,21 @@ parse_ia_ta_declaration(struct parse *cfile) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
prefer = atoi (val);
|
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;
|
break;
|
||||||
|
|
||||||
/* Lease valid lifetime. */
|
/* Lease valid lifetime. */
|
||||||
@ -4645,6 +4690,21 @@ parse_ia_ta_declaration(struct parse *cfile) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
valid = atoi (val);
|
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;
|
break;
|
||||||
|
|
||||||
/* Lease expiration time. */
|
/* Lease expiration time. */
|
||||||
@ -4966,6 +5026,21 @@ parse_ia_pd_declaration(struct parse *cfile) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
prefer = atoi (val);
|
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;
|
break;
|
||||||
|
|
||||||
/* Lease valid lifetime. */
|
/* Lease valid lifetime. */
|
||||||
@ -4979,6 +5054,21 @@ parse_ia_pd_declaration(struct parse *cfile) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
valid = atoi (val);
|
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;
|
break;
|
||||||
|
|
||||||
/* Prefix expiration time. */
|
/* Prefix expiration time. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user