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
Adam Osuchowski
Kea
Commits
552657ff
Commit
552657ff
authored
Oct 12, 2012
by
Tomek Mrugalski
🛰
Browse files
[2270] DHCPv4 parser fixes. Tests now pass.
parent
650a6c1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/config_parser.cc
View file @
552657ff
...
...
@@ -399,7 +399,7 @@ public:
pos
=
txt
.
find
(
"-"
);
if
(
pos
!=
string
::
npos
)
{
// using min-max notation
IOAddress
min
(
txt
.
substr
(
0
,
pos
-
1
));
IOAddress
min
(
txt
.
substr
(
0
,
pos
));
IOAddress
max
(
txt
.
substr
(
pos
+
1
));
Pool4Ptr
pool
(
new
Pool4
(
min
,
max
));
...
...
src/bin/dhcp4/tests/config_parser_unittest.cc
View file @
552657ff
...
...
@@ -95,7 +95,6 @@ TEST_F(Dhcp4ParserTest, empty_subnet) {
EXPECT_NO_THROW
(
status
=
configureDhcp4Server
(
*
srv_
,
Element
::
fromJSON
(
"{
\"
interface
\"
: [
\"
all
\"
],"
"
\"
preferred-lifetime
\"
: 3000,"
"
\"
rebind-timer
\"
: 2000, "
"
\"
renew-timer
\"
: 1000, "
"
\"
subnet4
\"
: [ ], "
...
...
@@ -181,7 +180,6 @@ TEST_F(Dhcp4ParserTest, pool_out_of_subnet) {
ConstElementPtr
status
;
string
config
=
"{
\"
interface
\"
: [
\"
all
\"
],"
"
\"
preferred-lifetime
\"
: 3000,"
"
\"
rebind-timer
\"
: 2000, "
"
\"
renew-timer
\"
: 1000, "
"
\"
subnet4
\"
: [ { "
...
...
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