Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian Schrader
Kea
Commits
158b408b
Commit
158b408b
authored
Jan 16, 2017
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[master] Finished merge of trac5033 (migrate D2client) (tentative fixes)
parent
decb4105
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
51 deletions
+5
-51
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_lexer.ll
+4
-11
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/dhcp4_parser.yy
+1
-2
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
+0
-38
No files found.
src/bin/dhcp4/dhcp4_lexer.ll
View file @
158b408b
...
...
@@ -207,15 +207,6 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"
udp\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_SOCKET_TYPE:
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("
udp
", driver.loc_);
}
}
\"
interfaces\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::INTERFACES_CONFIG:
...
...
@@ -1026,8 +1017,10 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
(?i:\"
UDP\
") {
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) {
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
if ((driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) ||
((driver.ctx_ == isc::dhcp::Parser4Context::DHCP_SOCKET_TYPE) &&
(yytext == "
\
"udp\"")) {
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
}
std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
...
...
src/bin/dhcp4/dhcp4_parser.yy
View file @
158b408b
...
...
@@ -157,8 +157,7 @@ using namespace std;
OVERRIDE_CLIENT_UPDATE "override-client-update"
REPLACE_CLIENT_NAME "replace-client-name"
GENERATED_PREFIX "generated-prefix"
UDP "UDP"
TCP "TCP"
TCP "tcp"
JSON "JSON"
WHEN_PRESENT "when-present"
NEVER "never"
...
...
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
View file @
158b408b
...
...
@@ -380,14 +380,6 @@ public:
hooks_libraries_parser_
->
loadLibraries
();
continue
;
}
// Remaining ones are old style parsers. Need go do
// the build/commit dance with them.
// Create the parser based on element name.
ParserPtr
parser
(
createConfigParser
(
config_pair
.
first
));
parser
->
build
(
config_pair
.
second
);
parser
->
commit
();
}
int
family
=
parser_context_
->
universe_
==
Option
::
V4
...
...
@@ -437,36 +429,6 @@ public:
return
(
answer
);
}
/// @brief Create an element parser based on the element name.
///
/// Creates a parser for the appropriate element and stores a pointer to it
/// in the appropriate class variable.
///
/// Note that the method currently it only supports option-defs, option-data
/// and hooks-libraries.
///
/// @param config_id is the name of the configuration element.
///
/// @return returns a shared pointer to DhcpConfigParser.
///
/// @throw throws NotImplemented if element name isn't supported.
ParserPtr
createConfigParser
(
const
std
::
string
&
config_id
)
{
ParserPtr
parser
;
// option-data and option-def converted to SimpleParser, so they
// are no longer here.
if
(
config_id
.
compare
(
"hooks-libraries"
)
==
0
)
{
parser
.
reset
(
new
HooksLibrariesParser
(
config_id
));
hooks_libraries_parser_
=
boost
::
dynamic_pointer_cast
<
HooksLibrariesParser
>
(
parser
);
}
else
{
isc_throw
(
NotImplemented
,
"Parser error: configuration parameter not supported: "
<<
config_id
);
}
return
(
parser
);
}
/// @brief DHCP-specific method that sets global, and option specific defaults
///
/// This method sets the defaults in the global scope, in option definitions,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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