diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-06-22 10:49:41 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-06-22 10:49:41 +0200 |
commit | 020936c8c3375e1efe44a3087c891a4b2cbfe044 (patch) | |
tree | a94751e6f1f11bcf118129c343d1942bbf53e808 /tests/ipmap.t | |
parent | 97a12ba3f184a76c406eb5622ec21a4d4d6fc8bf (diff) |
ipset 5: last new feature addedv5.0-pre3
- the hash types can now store protocol together port, not only port
- lots of fixes everywhere: parser, error reporting, manpage
The last bits on the todo list before announcing ipset 5:
- recheck all the error messages
- add possibly more tests
- polish manpage
Diffstat (limited to 'tests/ipmap.t')
-rw-r--r-- | tests/ipmap.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ipmap.t b/tests/ipmap.t index 00c35e8..2373176 100644 --- a/tests/ipmap.t +++ b/tests/ipmap.t @@ -1,3 +1,11 @@ +# Range: Check syntax error: missing range/from-to +2 ipset -N test ipmap +# Range: Check syntax error: missing --from +2 ipset -N test ipmap --to 2.1.0.1 +# Range: Check syntax error: missing --to +2 ipset -N test ipmap --from 2.1.0.1 +# Range: Catch invalid IPv4 address +1 ipset -N test ipmap --from 2.0.0.256 --to 2.1.0.1 # Range: Try to create from an invalid range 1 ipset -N test ipmap --from 2.0.0.1 --to 2.1.0.1 # Range: Create a set from a valid range @@ -28,6 +36,16 @@ 0 ipset -D test 2.0.0.128 # Range: Add a range of elements 0 ipset -A test 2.0.0.128-2.0.0.131 +# Range: Save set +0 ipset -S test > ipmap.t.restore +# Range: Destroy set +0 ipset -X test +# Range: Restore set and catch error +1 sed 's/2.0.0.131/222.0.0.131/' < ipmap.t.restore | ipset -R +# Range: Destroy set +0 ipset -X test +# Range: Restore set +0 ipset -R < ipmap.t.restore && rm ipmap.t.restore # Range: List set 0 ipset -L test > .foo # Range: Check listing |