summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp/tests/pkt6_unittest.cc
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2014-10-06 19:36:20 +0200
committerTomek Mrugalski <tomasz@isc.org>2014-10-06 19:36:20 +0200
commiteff16335a8366735fb7b5296b8aed0c529a6faff (patch)
tree931d67a9739542e305f599d230a4314dde5ee2c4 /src/lib/dhcp/tests/pkt6_unittest.cc
parent[3546] Corrected a typo. (diff)
downloadkea-eff16335a8366735fb7b5296b8aed0c529a6faff.tar.xz
kea-eff16335a8366735fb7b5296b8aed0c529a6faff.zip
[3546] Another changes after review:
- (offset - 4) explained better - Modified Dhcpv6Srv::unpackOptions() - setHWAddrMember() mac_addr renamed (this time for real) - Commented out unused variables - RelayInfo now uses DEFAULT_ADDRESS6 in ctor - LibDHCP::unpackOptions6 and callback now used uniformly - Clarified that ERO is Echo Request Option (RFC4994) - unpackOptions4 in libdhcp and Dhcp4Srv no longer throw when truncated option is received.
Diffstat (limited to '')
-rw-r--r--src/lib/dhcp/tests/pkt6_unittest.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/dhcp/tests/pkt6_unittest.cc b/src/lib/dhcp/tests/pkt6_unittest.cc
index 3cfaff9237..3fc25d3324 100644
--- a/src/lib/dhcp/tests/pkt6_unittest.cc
+++ b/src/lib/dhcp/tests/pkt6_unittest.cc
@@ -354,7 +354,8 @@ TEST_F(Pkt6Test, unpackMalformed) {
EXPECT_NO_THROW(trailing_garbage->unpack());
// A strict approach would assume the code will reject the whole packet,
- // but we decided to follow Jon Postel's law.
+ // but we decided to follow Jon Postel's law and be silent about
+ // received malformed or truncated options.
// Add an option that is truncated
OptionBuffer malform2 = orig;
@@ -371,9 +372,6 @@ TEST_F(Pkt6Test, unpackMalformed) {
// ... but there should be no option 123 as it was malformed.
EXPECT_FALSE(trunc_option->getOption(123));
-
- // A strict approach would assume the code will reject the whole packet,
- // but we decided to follow Jon Postel's law.
}
// This test verifies that it is possible to specify custom implementation of