Do not accept strings like 0.0.0.0.0 as IP masks.
[ircu2.10.12-pk.git] / ircd / test / ircd_in_addr_t.c
index 1a65aec59eaa20a8f1dca570e8c513d6a1cc608f..7eaf56ee5e78f309cd595570118b9e32c4d7e518 100644 (file)
@@ -29,7 +29,7 @@ static struct address_test test_addrs[] = {
       {{ 0, 0, 0, 0, 0, 0, 0, 1 }},
       "AAAAAA", "_AAB", 1, 0, 1 },
     { "127.0.0.1", "127.0.0.1",
-      {{ 0, 0, 0, 0, 0, 0, 0x7f00, 1 }},
+      {{ 0, 0, 0, 0, 0, 0xffff, 0x7f00, 1 }},
       "B]AAAB", "B]AAAB", 1, 1, 1 },
     { "::ffff:127.0.0.3", "127.0.0.3",
       {{ 0, 0, 0, 0, 0, 0xffff, 0x7f00, 3 }},
@@ -123,6 +123,7 @@ static struct ipmask_test test_masks[] = {
     { "a:*", {{ 0xa, 0, 0, 0, 0, 0, 0, 0 }}, 1, 1, 16 },
     { "a:*:*", {{ 0xa, 0, 0, 0, 0, 0, 0, 0 }}, 1, 1, 16 },
     { "a:/16", {{ 0xa, 0, 0, 0, 0, 0, 0, 0 }}, 1, 1, 16 },
+    { "0.0.0.0.0/1", {{ 0, 0, 0, 0, 0, 0, 0, 0 }}, 0, 0, 0 },
     { 0 }
 };