Add some initial tests to cover dynamic interval sets. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- tests/py/ip/sets.t | 12 ++++++++++++ tests/py/ip6/sets.t | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/tests/py/ip/sets.t b/tests/py/ip/sets.t index 2b4e7e1..0e2b193 100644 --- a/tests/py/ip/sets.t +++ b/tests/py/ip/sets.t @@ -31,3 +31,15 @@ ip saddr @set1 drop;ok ip saddr @set2 drop;ok ip saddr @set33 drop;fail + +!set3 type ipv4_addr flags interval;ok +?set3 192.168.0.0/16;ok +?set3 172.16.0.0/12;ok +?set3 10.0.0.0/8;ok + +!set4 type ipv4_addr flags interval;ok +?set4 192.168.1.0/24;ok +?set4 192.168.0.0/24;ok +?set4 192.168.2.0/24;ok +?set4 192.168.1.1;fail +?set4 192.168.3.0/24;ok diff --git a/tests/py/ip6/sets.t b/tests/py/ip6/sets.t index 765b971..ff38925 100644 --- a/tests/py/ip6/sets.t +++ b/tests/py/ip6/sets.t @@ -23,3 +23,14 @@ ip6 saddr @set2 drop;ok ip6 saddr @set33 drop;fail + +!set3 type ipv6_addr flags interval;ok +?set3 1234:1234:1234:1234::/64;ok +?set3 1324:1234:1234:1235::/64;ok +?set3 1324:1234:1234:1233::/64;ok +?set3 1234:1234:1234:1234:1234:1234:/96;fail +?set3 1324:1234:1234:1236::/64;ok + +!set4 type ipv6_addr flags interval;ok +?set4 1234:1234:1234:1234::/64 4321:1234:1234:1234::/64;ok +?set4 4321:1234:1234:1234:1234:1234::/96;fail -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html