summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/udplite.t.payload.inet
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/inet/udplite.t.payload.inet')
-rw-r--r--tests/py/inet/udplite.t.payload.inet74
1 files changed, 74 insertions, 0 deletions
diff --git a/tests/py/inet/udplite.t.payload.inet b/tests/py/inet/udplite.t.payload.inet
index ad2c9709..eb3dc075 100644
--- a/tests/py/inet/udplite.t.payload.inet
+++ b/tests/py/inet/udplite.t.payload.inet
@@ -42,6 +42,17 @@ inet test-inet input
[ lookup reg 1 set __set%d ]
[ immediate reg 0 drop ]
+# udplite sport != { 49, 50} accept
+__set%d test-ip4 3
+__set%d test-ip4 0
+ element 00003100 : 0 [end] element 00003200 : 0 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 0 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+ [ immediate reg 0 accept ]
+
# udplite sport { 12-40}
__set%d test-ip4 7
__set%d test-ip4 0
@@ -52,6 +63,16 @@ inet test-inet input
[ payload load 2b @ transport header + 0 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# udplite sport != { 12-40}
+__set%d test-ip4 7
+__set%d test-ip4 0
+ element 00000000 : 1 [end] element 00000c00 : 0 [end] element 00002900 : 1 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 0 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# udplite dport 80 accept
inet test-inet input
[ meta load l4proto => reg 1 ]
@@ -96,6 +117,17 @@ inet test-inet input
[ lookup reg 1 set __set%d ]
[ immediate reg 0 drop ]
+# udplite dport != { 49, 50} accept
+__set%d test-ip4 3
+__set%d test-ip4 0
+ element 00003100 : 0 [end] element 00003200 : 0 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 2 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+ [ immediate reg 0 accept ]
+
# udplite dport { 70-75} accept
__set%d test-ip4 7
__set%d test-ip4 0
@@ -107,6 +139,17 @@ inet test-inet input
[ lookup reg 1 set __set%d ]
[ immediate reg 0 accept ]
+# udplite dport != { 70-75} accept
+__set%d test-ip4 7
+__set%d test-ip4 0
+ element 00000000 : 1 [end] element 00004600 : 0 [end] element 00004c00 : 1 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 2 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+ [ immediate reg 0 accept ]
+
# udplite checksum 6666 drop
inet test-inet input
[ meta load l4proto => reg 1 ]
@@ -115,6 +158,17 @@ inet test-inet input
[ cmp eq reg 1 0x00000a1a ]
[ immediate reg 0 drop ]
+# udplite checksum != { 444, 555} accept
+__set%d test-inet 3
+__set%d test-inet 0
+ element 0000bc01 : 0 [end] element 00002b02 : 0 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 6 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+ [ immediate reg 0 accept ]
+
# udplite checksum 22
inet test-inet input
[ meta load l4proto => reg 1 ]
@@ -154,6 +208,16 @@ inet test-inet input
[ payload load 2b @ transport header + 6 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# udplite checksum != { 33, 55, 67, 88}
+__set%d test-ip4 3
+__set%d test-ip4 0
+ element 00002100 : 0 [end] element 00003700 : 0 [end] element 00004300 : 0 [end] element 00005800 : 0 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 6 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# udplite checksum { 33-55}
__set%d test-ip4 7
__set%d test-ip4 0
@@ -164,3 +228,13 @@ inet test-inet input
[ payload load 2b @ transport header + 6 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# udplite checksum != { 33-55}
+__set%d test-ip4 7
+__set%d test-ip4 0
+ element 00000000 : 1 [end] element 00002100 : 0 [end] element 00003800 : 1 [end]
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000088 ]
+ [ payload load 2b @ transport header + 6 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+