From 4682e6f350b30dd0beb8cbd09ebf3260f814cbf2 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 22 Jul 2016 12:08:47 +0200 Subject: tests: add ether payload set test ... and fix missing line in ip6 test. Signed-off-by: Florian Westphal --- tests/py/bridge/ether.t | 2 ++ tests/py/bridge/ether.t.payload | 8 ++++++++ tests/py/ip6/ip6.t.payload.ip6 | 1 + 3 files changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/py/bridge/ether.t b/tests/py/bridge/ether.t index 5b39fe0b..4a177ab0 100644 --- a/tests/py/bridge/ether.t +++ b/tests/py/bridge/ether.t @@ -6,3 +6,5 @@ tcp dport 22 iiftype ether ip daddr 1.2.3.4 ether saddr 00:0f:54:0c:11:4 accept; tcp dport 22 ip daddr 1.2.3.4 ether saddr 00:0f:54:0c:11:04;ok;tcp dport 22 ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4 tcp dport 22 ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4;ok ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4 accept;ok + +ether daddr 00:01:02:03:04:05 ether saddr set ff:ff:ff:ff:ff:ff drop;ok diff --git a/tests/py/bridge/ether.t.payload b/tests/py/bridge/ether.t.payload index 8fdb0a95..c545d657 100644 --- a/tests/py/bridge/ether.t.payload +++ b/tests/py/bridge/ether.t.payload @@ -42,3 +42,11 @@ bridge test-bridge input [ cmp eq reg 1 0x04030201 ] [ immediate reg 0 accept ] +# ether daddr 00:01:02:03:04:05 ether saddr set ff:ff:ff:ff:ff:ff drop +bridge test-bridge input + [ payload load 6b @ link header + 0 => reg 1 ] + [ cmp eq reg 1 0x03020100 0x00000504 ] + [ immediate reg 1 0xffffffff 0x0000ffff ] + [ payload write reg 1 => 6b @ link header + 6 csum_type 0 csum_off 0 ] + [ immediate reg 0 drop ] + diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6 index e3549890..7e158a8b 100644 --- a/tests/py/ip6/ip6.t.payload.ip6 +++ b/tests/py/ip6/ip6.t.payload.ip6 @@ -391,3 +391,4 @@ ip6 test-ip6 input [ meta load iif => reg 1 ] [ cmp eq reg 1 0x00000001 ] [ immediate reg 1 0x00000001 ] + [ payload write reg 1 => 1b @ network header + 7 csum_type 0 csum_off 0 ] -- cgit v1.2.3