diff options
Diffstat (limited to 'tests/py/ip6')
-rw-r--r-- | tests/py/ip6/ip6.t | 2 | ||||
-rw-r--r-- | tests/py/ip6/ip6.t.payload.inet | 23 | ||||
-rw-r--r-- | tests/py/ip6/ip6.t.payload.ip6 | 19 |
3 files changed, 44 insertions, 0 deletions
diff --git a/tests/py/ip6/ip6.t b/tests/py/ip6/ip6.t index 438b94db..8210d22b 100644 --- a/tests/py/ip6/ip6.t +++ b/tests/py/ip6/ip6.t @@ -15,6 +15,7 @@ ip6 dscp != cs1;ok ip6 dscp 0x38;ok;ip6 dscp cs7 ip6 dscp != 0x20;ok;ip6 dscp != cs4 ip6 dscp {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, ef};ok +ip6 dscp vmap { 0x04 : accept, 0x3f : continue } counter;ok ip6 flowlabel 22;ok ip6 flowlabel != 233;ok @@ -25,6 +26,7 @@ ip6 flowlabel { 33, 55, 67, 88};ok ip6 flowlabel != { 33, 55, 67, 88};ok ip6 flowlabel { 33-55};ok ip6 flowlabel != { 33-55};ok +ip6 flowlabel vmap { 0 : accept, 2 : continue } ;ok ip6 length 22;ok ip6 length != 233;ok diff --git a/tests/py/ip6/ip6.t.payload.inet b/tests/py/ip6/ip6.t.payload.inet index c9cb999d..d015c8ef 100644 --- a/tests/py/ip6/ip6.t.payload.inet +++ b/tests/py/ip6/ip6.t.payload.inet @@ -41,6 +41,18 @@ inet test-inet input [ bitwise reg 1 = (reg=1 & 0x0000c00f ) ^ 0x00000000 ] [ lookup reg 1 set __set%d ] +# ip6 dscp vmap { 0x04 : accept, 0x3f : continue } counter +__map%d test-inet b size 2 +__map%d test-inet 0 + element 00000001 : 0 [end] element 0000c00f : 0 [end] +ip6 test-ip6 input + [ meta load nfproto => reg 1 ] + [ cmp eq reg 1 0x0000000a ] + [ payload load 2b @ network header + 0 => reg 1 ] + [ bitwise reg 1 = (reg=1 & 0x0000c00f ) ^ 0x00000000 ] + [ lookup reg 1 set __map%d dreg 0 ] + [ counter pkts 0 bytes 0 ] + # ip6 flowlabel 22 inet test-inet input [ meta load nfproto => reg 1 ] @@ -101,6 +113,17 @@ inet test-inet input [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ] [ lookup reg 1 set __set%d 0x1 ] +# ip6 flowlabel vmap { 0 : accept, 2 : continue } +__map%d test-inet b size 2 +__map%d test-inet 0 + element 00000000 : 0 [end] element 00020000 : 0 [end] +inet test-inet input + [ meta load nfproto => reg 1 ] + [ cmp eq reg 1 0x0000000a ] + [ payload load 3b @ network header + 1 => reg 1 ] + [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ] + [ lookup reg 1 set __map%d dreg 0 ] + # ip6 length 22 inet test-inet input [ meta load nfproto => reg 1 ] diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6 index d8afe606..b2e8363c 100644 --- a/tests/py/ip6/ip6.t.payload.ip6 +++ b/tests/py/ip6/ip6.t.payload.ip6 @@ -31,6 +31,16 @@ ip6 test-ip6 input [ bitwise reg 1 = (reg=1 & 0x0000c00f ) ^ 0x00000000 ] [ lookup reg 1 set __set%d ] +# ip6 dscp vmap { 0x04 : accept, 0x3f : continue } counter +__map%d test-ip6 b size 2 +__map%d test-ip6 0 + element 00000001 : 0 [end] element 0000c00f : 0 [end] +ip6 test-ip6 input + [ payload load 2b @ network header + 0 => reg 1 ] + [ bitwise reg 1 = (reg=1 & 0x0000c00f ) ^ 0x00000000 ] + [ lookup reg 1 set __map%d dreg 0 ] + [ counter pkts 0 bytes 0 ] + # ip6 flowlabel 22 ip6 test-ip6 input [ payload load 3b @ network header + 1 => reg 1 ] @@ -79,6 +89,15 @@ ip6 test-ip6 input [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ] [ lookup reg 1 set __set%d 0x1 ] +# ip6 flowlabel vmap { 0 : accept, 2 : continue } +__map%d test-ip6 b size 2 +__map%d test-ip6 0 + element 00000000 : 0 [end] element 00020000 : 0 [end] +ip6 test-ip6 input + [ payload load 3b @ network header + 1 => reg 1 ] + [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ] + [ lookup reg 1 set __map%d dreg 0 ] + # ip6 length 22 ip6 test-ip6 input [ payload load 2b @ network header + 4 => reg 1 ] |