From: Marcin Siodelski Date: Mon, 9 Dec 2013 18:50:00 +0000 (+0100) Subject: [2772] The private DHCPv4 opts (code > 224) are not standard opts. X-Git-Tag: bind10-1.2.0beta1-release~178^2~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df4334a7eb130bb0322d271253c4ffe15485a2b7;p=thirdparty%2Fkea.git [2772] The private DHCPv4 opts (code > 224) are not standard opts. --- diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc index 4bc4a92a35..4577c642dc 100644 --- a/src/lib/dhcp/libdhcp++.cc +++ b/src/lib/dhcp/libdhcp++.cc @@ -163,9 +163,9 @@ LibDHCP::isStandardOption(const Option::Universe u, const uint16_t code) { code == 126 || code == 127 || (code > 146 && code < 150) || - (code > 177 && code < 208) || + (code > 177 && code < 208) || (code > 213 && code < 220) || - (code > 221 && code < 224))) { + (code > 221 && code < 255))) { return (true); } diff --git a/src/lib/dhcp/tests/libdhcp++_unittest.cc b/src/lib/dhcp/tests/libdhcp++_unittest.cc index 92f7baf920..ec9dd9f291 100644 --- a/src/lib/dhcp/tests/libdhcp++_unittest.cc +++ b/src/lib/dhcp/tests/libdhcp++_unittest.cc @@ -643,7 +643,10 @@ TEST_F(LibDhcpTest, isStandardOption4) { 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 214, 215, 216, 217, 218, 219, - 222, 223 }; + 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254 }; const size_t unassigned_num = sizeof(unassigned_codes) / sizeof(unassigned_codes[0]); // Try all possible option codes.