diff options
Diffstat (limited to 'tests/py/bridge')
-rw-r--r-- | tests/py/bridge/reject.t | 5 | ||||
-rw-r--r-- | tests/py/bridge/reject.t.json | 44 | ||||
-rw-r--r-- | tests/py/bridge/reject.t.payload | 12 |
3 files changed, 61 insertions, 0 deletions
diff --git a/tests/py/bridge/reject.t b/tests/py/bridge/reject.t index d1c2ecab..ad5280f7 100644 --- a/tests/py/bridge/reject.t +++ b/tests/py/bridge/reject.t @@ -37,3 +37,8 @@ ether type arp reject;fail ether type vlan reject with tcp reset;fail ether type arp reject with tcp reset;fail ip protocol udp reject with tcp reset;fail + +ether type ip reject with icmpx type admin-prohibited;ok +ether type ip6 reject with icmpx type admin-prohibited;ok +ether type vlan reject with icmpx type admin-prohibited;fail +ether type arp reject with icmpx type admin-prohibited;fail diff --git a/tests/py/bridge/reject.t.json b/tests/py/bridge/reject.t.json index aa716f80..c0bed56e 100644 --- a/tests/py/bridge/reject.t.json +++ b/tests/py/bridge/reject.t.json @@ -219,3 +219,47 @@ } ] +# ether type ip reject with icmpx type admin-prohibited +[ + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "ip" + } + }, + { + "reject": { + "expr": "admin-prohibited", + "type": "icmpx" + } + } +] + +# ether type ip6 reject with icmpx type admin-prohibited +[ + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "ip6" + } + }, + { + "reject": { + "expr": "admin-prohibited", + "type": "icmpx" + } + } +] + diff --git a/tests/py/bridge/reject.t.payload b/tests/py/bridge/reject.t.payload index b984f6f8..888179df 100644 --- a/tests/py/bridge/reject.t.payload +++ b/tests/py/bridge/reject.t.payload @@ -106,3 +106,15 @@ bridge test-bridge input bridge test-bridge input [ reject type 2 code 1 ] +# ether type ip reject with icmpx type admin-prohibited +bridge test-bridge input + [ payload load 2b @ link header + 12 => reg 1 ] + [ cmp eq reg 1 0x00000008 ] + [ reject type 2 code 3 ] + +# ether type ip6 reject with icmpx type admin-prohibited +bridge test-bridge input + [ payload load 2b @ link header + 12 => reg 1 ] + [ cmp eq reg 1 0x0000dd86 ] + [ reject type 2 code 3 ] + |