summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2023-03-21 10:58:47 +0100
committerFrancis Dupont <fdupont@isc.org>2023-03-24 09:53:35 +0100
commitc17ef3ff99583b1acb39e8b538d02295c8782db8 (patch)
treeb702691844a8d64b7c8b366c89d32cf1ad7dcfa4
parent[#939] Adding issue id to ChangeLog (diff)
downloadkea-c17ef3ff99583b1acb39e8b538d02295c8782db8.tar.xz
kea-c17ef3ff99583b1acb39e8b538d02295c8782db8.zip
[#2785] Extended syntax
-rw-r--r--src/bin/dhcp4/dhcp4_lexer.ll9
-rw-r--r--src/bin/dhcp4/dhcp4_parser.yy12
2 files changed, 19 insertions, 2 deletions
diff --git a/src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll
index edc4f432d1..3ac2354b38 100644
--- a/src/bin/dhcp4/dhcp4_lexer.ll
+++ b/src/bin/dhcp4/dhcp4_lexer.ll
@@ -2075,6 +2075,15 @@ ControlCharacterFill [^"\\]|\\["\\/bfnrtu]
}
}
+\"ignore-dhcp-server-identifier\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::COMPATIBILITY:
+ return isc::dhcp::Dhcp4Parser::make_IGNORE_DHCP_SERVER_ID(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("ignore-dhcp-server-identifier", driver.loc_);
+ }
+}
+
\"ignore-rai-link-selection\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::COMPATIBILITY:
diff --git a/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy
index 3180be0256..4a866bc2b7 100644
--- a/src/bin/dhcp4/dhcp4_parser.yy
+++ b/src/bin/dhcp4/dhcp4_parser.yy
@@ -258,6 +258,7 @@ using namespace std;
COMPATIBILITY "compatibility"
LENIENT_OPTION_PARSING "lenient-option-parsing"
+ IGNORE_DHCP_SERVER_ID "ignore-dhcp-server-identifier"
IGNORE_RAI_LINK_SEL "ignore-rai-link-selection"
EXCLUDE_FIRST_LAST_24 "exclude-first-last-24"
@@ -2937,7 +2938,8 @@ compatibility_params: compatibility_param
;
compatibility_param: lenient_option_parsing
- | ignore-rai-link-selection
+ | ignore_dhcp_server_identifier
+ | ignore_rai_link_selection
| exclude_first_last_24
| unknown_map_entry
;
@@ -2948,7 +2950,13 @@ lenient_option_parsing: LENIENT_OPTION_PARSING COLON BOOLEAN {
ctx.stack_.back()->set("lenient-option-parsing", b);
};
-ignore-rai-link-selection: IGNORE_RAI_LINK_SEL COLON BOOLEAN {
+ignore_dhcp_server_identifier: IGNORE_DHCP_SERVER_ID COLON BOOLEAN {
+ ctx.unique("ignore-dhcp-server-identifier", ctx.loc2pos(@1));
+ ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("ignore-dhcp-server-identifier", b);
+}
+
+ignore_rai_link_selection: IGNORE_RAI_LINK_SEL COLON BOOLEAN {
ctx.unique("ignore-rai-link-selection", ctx.loc2pos(@1));
ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("ignore-rai-link-selection", b);