diff options
author | Pablo M. Bermudo Garay <pablombg@gmail.com> | 2017-08-28 20:20:49 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-09-04 22:45:24 +0200 |
commit | 4a39d2d43695d954fda7c4a6de534e8b4b56c63c (patch) | |
tree | 461daea100b2ab4919596c6b7306a5764c3bb69b /tests/py/ip/objects.t.payload | |
parent | e787d9852c563bf9ebd53f560da83403f6d35b4c (diff) |
tests: py: add tests for limit stateful object
The patch also reorganizes ip/objects.t file.
Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/objects.t.payload')
-rw-r--r-- | tests/py/ip/objects.t.payload | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/py/ip/objects.t.payload b/tests/py/ip/objects.t.payload index 7f16c5ac..007eaddb 100644 --- a/tests/py/ip/objects.t.payload +++ b/tests/py/ip/objects.t.payload @@ -43,3 +43,19 @@ ip test-ip4 output [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ objref sreg 1 set __objmap%d id 1 ] + +# ip saddr 192.168.1.3 limit name "lim1" +ip test-ip4 output + [ payload load 4b @ network header + 12 => reg 1 ] + [ cmp eq reg 1 0x0301a8c0 ] + [ objref type 4 name lim1 ] + +# limit name tcp dport map {443 : "lim1", 80 : "lim2", 22 : "lim1"} +__objmap%d test-ip4 43 size 3 +__objmap%d test-ip4 0 + element 0000bb01 : 0 [end] element 00005000 : 0 [end] element 00001600 : 0 [end] +ip test-ip4 output + [ meta load l4proto => reg 1 ] + [ cmp eq reg 1 0x00000006 ] + [ payload load 2b @ transport header + 2 => reg 1 ] + [ objref sreg 1 set __objmap%d id 1 ] |