]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5297] Addressed point 1
authorFrancis Dupont <fdupont@isc.org>
Sat, 14 Oct 2017 15:10:28 +0000 (17:10 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sat, 14 Oct 2017 15:10:28 +0000 (17:10 +0200)
src/lib/dhcpsrv/tests/client_class_def_parser_unittest.cc

index e10d5910d18b9ec2f0dfeb544b554f8773ae086c..5083400c506074455cf73db53eb75da8a25abca0 100644 (file)
@@ -768,9 +768,21 @@ TEST_F(ClientClassDefParserTest, nextServerBogus) {
         "        } \n"
         "      ] \n"
         "} \n";
+    std::string bogus_broadcast =
+        "{ \n"
+        "    \"name\": \"MICROSOFT\", \n"
+        "    \"next-server\": \"255.255.255.255\",\n"
+        "    \"option-data\": [ \n"
+        "        { \n"
+        "           \"name\": \"domain-name-servers\", \n"
+        "           \"data\": \"192.0.2.1, 192.0.2.2\" \n"
+        "        } \n"
+        "      ] \n"
+        "} \n";
 
     EXPECT_THROW(parseClientClassDef(bogus_v6, AF_INET), DhcpConfigError);
     EXPECT_THROW(parseClientClassDef(bogus_junk, AF_INET), DhcpConfigError);
+    EXPECT_THROW(parseClientClassDef(bogus_broadcast, AF_INET), DhcpConfigError);
 }
 
 // Test verifies that it is possible to define server-hostname field and it