diff options
Diffstat (limited to 'tests/py/any/ct.t.payload')
-rw-r--r-- | tests/py/any/ct.t.payload | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload index 51a82503..64504134 100644 --- a/tests/py/any/ct.t.payload +++ b/tests/py/any/ct.t.payload @@ -172,8 +172,7 @@ ip test-ip4 output ip test-ip4 output [ ct load mark => reg 1 ] [ byteorder reg 1 = hton(reg 1, 4, 4) ] - [ cmp gte reg 1 0x32000000 ] - [ cmp lte reg 1 0x45000000 ] + [ range eq reg 1 0x32000000 0x45000000 ] # ct mark != 0x00000032-0x00000045 ip test-ip4 output @@ -240,8 +239,7 @@ ip test-ip4 output ip test-ip4 output [ ct load expiration => reg 1 ] [ byteorder reg 1 = hton(reg 1, 4, 4) ] - [ cmp gte reg 1 0x60ea0000 ] - [ cmp lte reg 1 0x80ee3600 ] + [ range eq reg 1 0x60ea0000 0x80ee3600 ] # ct expiration > 4d23h59m59s ip test-ip4 output @@ -258,8 +256,7 @@ ip test-ip4 output ip test-ip4 output [ ct load expiration => reg 1 ] [ byteorder reg 1 = hton(reg 1, 4, 4) ] - [ cmp gte reg 1 0xe8800000 ] - [ cmp lte reg 1 0xc8af0000 ] + [ range eq reg 1 0xe8800000 0xc8af0000 ] # ct expiration != 33-45 ip test-ip4 output @@ -306,15 +303,6 @@ ip test-ip4 output [ ct load helper => reg 1 ] [ cmp eq reg 1 0x00707466 0x00000000 0x00000000 0x00000000 ] -# ct state . ct mark { new . 0x12345678} -__set%d test 3 -__set%d test 0 - element 00000008 12345678 : 0 [end] -ip test-ip4 output - [ ct load state => reg 1 ] - [ ct load mark => reg 9 ] - [ lookup reg 1 set __set%d ] - # ct state . ct mark { new . 0x12345678, new . 0x34127856, established . 0x12785634} __set%d test-ip4 3 __set%d test-ip4 0 @@ -345,6 +333,15 @@ ip test-ip4 output [ lookup reg 1 set __map%d dreg 1 ] [ ct set mark with reg 1 ] +# ct mark set ct mark and 0xffff0000 or meta mark and 0xffff +ip + [ ct load mark => reg 1 ] + [ bitwise reg 1 = ( reg 1 & 0xffff0000 ) ^ 0x00000000 ] + [ meta load mark => reg 2 ] + [ bitwise reg 2 = ( reg 2 & 0x0000ffff ) ^ 0x00000000 ] + [ bitwise reg 1 = ( reg 1 | reg 2 ) ] + [ ct set mark with reg 1 ] + # ct original bytes > 100000 ip test-ip4 output [ ct load bytes => reg 1 , dir original ] @@ -494,7 +491,7 @@ ip test-ip4 output # ct state . ct mark vmap { new . 0x12345678 : drop, established . 0x87654321 : accept} __map%d test-ip4 b size 2 __map%d test-ip4 0 - element 00000008 12345678 : 0 [end] element 00000002 87654321 : 0 [end] + element 00000008 12345678 : drop 0 [end] element 00000002 87654321 : accept 0 [end] ip test-ip4 output [ ct load state => reg 1 ] [ ct load mark => reg 9 ] @@ -506,8 +503,28 @@ ip test-ip4 output [ bitwise reg 1 = ( reg 1 & 0xfffffffe ) ^ 0x00000001 ] [ ct set mark with reg 1 ] +# ct mark set 0x00000001 or ct mark +ip test-ip4 output + [ ct load mark => reg 1 ] + [ bitwise reg 1 = ( reg 1 & 0xfffffffe ) ^ 0x00000001 ] + [ ct set mark with reg 1 ] + # ct id 12345 ip test-ip4 output - [ ct load unknown => reg 1 ] + [ ct load id => reg 1 ] [ cmp eq reg 1 0x39300000 ] +# ct status ! dnat +ip6 + [ ct load status => reg 1 ] + [ bitwise reg 1 = ( reg 1 & 0x00000020 ) ^ 0x00000000 ] + [ cmp eq reg 1 0x00000000 ] + +# ct count 3 +ip test-ip4 output + [ connlimit count 3 flags 0 ] + +# ct count over 3 +ip test-ip4 output + [ connlimit count 3 flags 1 ] + |