Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
32b6b02b
Commit
32b6b02b
authored
Dec 14, 2012
by
Tomek Mrugalski
🛰
Browse files
[2326] Fix in RENEW code (status NoAddrsAvail => NoBinding)
parent
318530ed
Changes
2
Show whitespace changes
Inline
Side-by-side
src/bin/dhcp6/dhcp6_srv.cc
View file @
32b6b02b
...
...
@@ -606,7 +606,7 @@ OptionPtr Dhcpv6Srv::renewIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
boost
::
shared_ptr
<
Option6IA
>
ia_rsp
(
new
Option6IA
(
D6O_IA_NA
,
ia
->
getIAID
()));
// Insert status code NoAddrsAvail.
ia_rsp
->
addOption
(
createStatusCode
(
STATUS_No
AddrsAvail
,
ia_rsp
->
addOption
(
createStatusCode
(
STATUS_No
Binding
,
"Sorry, no known leases for this duid/iaid."
));
LOG_DEBUG
(
dhcp6_logger
,
DBG_DHCP6_DETAIL
,
DHCP6_UNKNOWN_RENEW
)
...
...
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
View file @
32b6b02b
...
...
@@ -936,7 +936,7 @@ TEST_F(Dhcpv6SrvTest, RenewReject) {
// Check that IA_NA was returned and that there's an address included
ia
=
boost
::
dynamic_pointer_cast
<
Option6IA
>
(
tmp
);
ASSERT_TRUE
(
ia
);
check
RejectedIA_NA
(
ia
,
STATUS_No
AddrsAvail
);
check
IA_NAStatusCode
(
ia
,
STATUS_No
Binding
);
// Check that there is no lease added
l
=
LeaseMgrFactory
::
instance
().
getLease6
(
addr
);
...
...
@@ -960,7 +960,7 @@ TEST_F(Dhcpv6SrvTest, RenewReject) {
// Check that IA_NA was returned and that there's an address included
ia
=
boost
::
dynamic_pointer_cast
<
Option6IA
>
(
tmp
);
ASSERT_TRUE
(
ia
);
check
RejectedIA_NA
(
ia
,
STATUS_No
AddrsAvail
);
check
IA_NAStatusCode
(
ia
,
STATUS_No
Binding
);
// There is a iaid mis-match, so server should respond that there is
// no such address to renew.
...
...
@@ -979,7 +979,7 @@ TEST_F(Dhcpv6SrvTest, RenewReject) {
// Check that IA_NA was returned and that there's an address included
ia
=
boost
::
dynamic_pointer_cast
<
Option6IA
>
(
tmp
);
ASSERT_TRUE
(
ia
);
check
RejectedIA_NA
(
ia
,
STATUS_No
AddrsAvail
);
check
IA_NAStatusCode
(
ia
,
STATUS_No
Binding
);
lease
=
LeaseMgrFactory
::
instance
().
getLease6
(
addr
);
ASSERT_TRUE
(
lease
);
...
...
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