Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
dfac5a62
Commit
dfac5a62
authored
Dec 06, 2016
by
Tomek Mrugalski
🛰
Browse files
[5036] excluded-prefix{-len} implemented in the bison parser
parent
0d97d2c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/examples/kea6/advanced.json
View file @
dfac5a62
...
...
@@ -66,6 +66,16 @@
"subnet6"
:
[
{
"pools"
:
[
{
"pool"
:
"2001:db8:1::/80"
}
],
"pd-pools"
:
[
{
"prefix"
:
"2001:db8:abcd::"
,
"prefix-len"
:
48
,
"delegated-len"
:
64
,
"excluded-prefix"
:
"2001:db8:abcd:1234::"
,
"excluded-prefix-len"
:
62
}
],
"subnet"
:
"2001:db8:1::/64"
,
"interface"
:
"ethX"
}
...
...
doc/examples/kea6/reservations.json
View file @
dfac5a62
...
...
@@ -81,7 +81,8 @@
{
"name"
:
"nis-servers"
,
"data"
:
"3000:1::234"
}]
}],
"client-classes"
:
[
"special_snowflake"
,
"office"
]
},
#
This
is
a
bit
more
advanced
reservation.
The
client
with
the
specified
#
DUID
will
get
a
reserved
address
,
a
reserved
prefix
and
a
hostname.
...
...
src/bin/dhcp6/dhcp6_lexer.ll
View file @
dfac5a62
...
...
@@ -430,6 +430,24 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"
excluded-
prefix
\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
return isc::dhcp::Dhcp6Parser::make_EXCLUDED_PREFIX(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("
excluded-
prefix
", driver.loc_);
}
}
\"
excluded-
prefix
-len\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
return isc::dhcp::Dhcp6Parser::make_EXCLUDED_PREFIX_LEN(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("
excluded-
prefix
-len
", driver.loc_);
}
}
\"
delegated-len\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
...
...
src/bin/dhcp6/dhcp6_parser.yy
View file @
dfac5a62
...
...
@@ -86,6 +86,8 @@ using namespace std;
PD_POOLS "pd-pools"
PREFIX "prefix"
PREFIX_LEN "prefix-len"
EXCLUDED_PREFIX "excluded-prefix"
EXCLUDED_PREFIX_LEN "excluded-prefix-len"
DELEGATED_LEN "delegated-len"
SUBNET "subnet"
...
...
@@ -1070,6 +1072,8 @@ pd_pool_param: pd_prefix
| pd_prefix_len
| pd_delegated_len
| option_data_list
| excluded_prefix
| excluded_prefix_len
| unknown_map_entry
;
...
...
@@ -1086,6 +1090,19 @@ pd_prefix_len: PREFIX_LEN COLON INTEGER {
ctx.stack_.back()->set("prefix-len", prf);
}
excluded_prefix: EXCLUDED_PREFIX {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr prf(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("excluded-prefix", prf);
ctx.leave();
}
excluded_prefix_len: EXCLUDED_PREFIX_LEN COLON INTEGER {
ElementPtr prf(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("excluded-prefix-len", prf);
}
pd_delegated_len: DELEGATED_LEN COLON INTEGER {
ElementPtr deleg(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("delegated-len", deleg);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment