]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2772] The private DHCPv4 opts (code > 224) are not standard opts.
authorMarcin Siodelski <marcin@isc.org>
Mon, 9 Dec 2013 18:50:00 +0000 (19:50 +0100)
committerMarcin Siodelski <marcin@isc.org>
Mon, 9 Dec 2013 18:50:00 +0000 (19:50 +0100)
src/lib/dhcp/libdhcp++.cc
src/lib/dhcp/tests/libdhcp++_unittest.cc

index 4bc4a92a35990b1898a6148ad0f67cae88a63f9f..4577c642dc20a787958e07e8dbb9ac2438c21d70 100644 (file)
@@ -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);
             }
 
index 92f7baf92059e20a69f930954c71a9e5c3d8da2f..ec9dd9f2919e590e15c594d509e3bf4d9d5c683a 100644 (file)
@@ -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.