summaryrefslogtreecommitdiffstats
path: root/tests/py/netdev/reject.t
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-01-26 18:37:12 +0100
committerPhil Sutter <phil@nwl.cc>2021-01-27 17:21:25 +0100
commit7ca3368cd7575e710114fc60e8ecc8ffba95154d (patch)
tree554026eda46d9f43cc58d63152934f765a03061d /tests/py/netdev/reject.t
parenta206f22bdbd03a9c8dcf2f98e3ed7566b198d281 (diff)
reject: Unify inet, netdev and bridge delinearization
Postprocessing for inet family did not attempt to kill any existing payload dependency, although it is perfectly fine to do so. The mere culprit is to not abbreviate default code rejects as that would drop needed protocol info as a side-effect. Since postprocessing is then almost identical to that of bridge and netdev families, merge them. While being at it, extend tests/py/netdev/reject.t by a few more tests taken from inet/reject.t so this covers icmpx rejects as well. Cc: Jose M. Guisado Gomez <guigom@riseup.net> Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/netdev/reject.t')
-rw-r--r--tests/py/netdev/reject.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/py/netdev/reject.t b/tests/py/netdev/reject.t
index 8f8c4e03..af109086 100644
--- a/tests/py/netdev/reject.t
+++ b/tests/py/netdev/reject.t
@@ -17,4 +17,24 @@ reject with icmpv6 type port-unreachable;ok
reject with icmpv6 type policy-fail;ok
reject with icmpv6 type reject-route;ok
+mark 12345 reject with tcp reset;ok;meta l4proto 6 meta mark 0x00003039 reject with tcp reset
+
reject;ok
+meta protocol ip reject;ok;reject with icmp type port-unreachable
+meta protocol ip6 reject;ok;reject with icmpv6 type port-unreachable
+
+reject with icmpx type host-unreachable;ok
+reject with icmpx type no-route;ok
+reject with icmpx type admin-prohibited;ok
+reject with icmpx type port-unreachable;ok;reject
+
+meta protocol ip reject with icmp type host-unreachable;ok;reject with icmp type host-unreachable
+meta protocol ip6 reject with icmpv6 type no-route;ok;reject with icmpv6 type no-route
+
+meta protocol ip6 reject with icmp type host-unreachable;fail
+meta protocol ip ip protocol icmp reject with icmpv6 type no-route;fail
+meta protocol ip6 ip protocol icmp reject with icmp type host-unreachable;fail
+meta l4proto udp reject with tcp reset;fail
+
+meta protocol ip reject with icmpx type admin-prohibited;ok
+meta protocol ip6 reject with icmpx type admin-prohibited;ok