summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-08-30 21:37:50 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-09-03 18:33:14 +0200
commit646c5d02a5db3e8c3677cdf8426a646dd118fd49 (patch)
tree948113da51ae285d7998a430f4c13b8d487da213 /tests
parente2a5f72549cc5c45f16883fc82a799b0f09d66d9 (diff)
rule: remove redundant meta protocol from the evaluation step
567ea4774e13 ("netlink_delinearize: incorrect meta protocol dependency kill") does not document two cases that are handled in this patch: - 'meta protocol ip' is removed if used in the ip family. - 'meta protocol ip6' is removed if used in the ip6 family. This patch removes this redundancy earlier, from the evaluation step before netlink bytecode generation. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/py/ip/meta.t2
-rw-r--r--tests/py/ip/meta.t.payload2
-rw-r--r--tests/py/ip6/meta.t2
-rw-r--r--tests/py/ip6/meta.t.payload2
4 files changed, 2 insertions, 6 deletions
diff --git a/tests/py/ip/meta.t b/tests/py/ip/meta.t
index fecd0caf..5a05923a 100644
--- a/tests/py/ip/meta.t
+++ b/tests/py/ip/meta.t
@@ -8,7 +8,7 @@ meta l4proto ipv6-icmp icmpv6 type nd-router-advert;ok;icmpv6 type nd-router-adv
meta l4proto 58 icmpv6 type nd-router-advert;ok;icmpv6 type nd-router-advert
icmpv6 type nd-router-advert;ok
-meta protocol ip udp dport 67;ok
+meta protocol ip udp dport 67;ok;udp dport 67
meta ibrname "br0";fail
meta obrname "br0";fail
diff --git a/tests/py/ip/meta.t.payload b/tests/py/ip/meta.t.payload
index a1fd0086..afde5cc1 100644
--- a/tests/py/ip/meta.t.payload
+++ b/tests/py/ip/meta.t.payload
@@ -47,8 +47,6 @@ ip6 test-ip4 input
# meta protocol ip udp dport 67
ip test-ip4 input
- [ meta load protocol => reg 1 ]
- [ cmp eq reg 1 0x00000008 ]
[ meta load l4proto => reg 1 ]
[ cmp eq reg 1 0x00000011 ]
[ payload load 2b @ transport header + 2 => reg 1 ]
diff --git a/tests/py/ip6/meta.t b/tests/py/ip6/meta.t
index 2c1aee23..471e1481 100644
--- a/tests/py/ip6/meta.t
+++ b/tests/py/ip6/meta.t
@@ -10,7 +10,7 @@ meta l4proto 1 icmp type echo-request;ok;icmp type echo-request
icmp type echo-request;ok
meta protocol ip udp dport 67;ok
-meta protocol ip6 udp dport 67;ok
+meta protocol ip6 udp dport 67;ok;udp dport 67
meta sdif "lo" accept;ok
meta sdifname != "vrf1" accept;ok
diff --git a/tests/py/ip6/meta.t.payload b/tests/py/ip6/meta.t.payload
index 59c20d99..0e3db6ba 100644
--- a/tests/py/ip6/meta.t.payload
+++ b/tests/py/ip6/meta.t.payload
@@ -56,8 +56,6 @@ ip6 test-ip6 input
# meta protocol ip6 udp dport 67
ip6 test-ip6 input
- [ meta load protocol => reg 1 ]
- [ cmp eq reg 1 0x0000dd86 ]
[ meta load l4proto => reg 1 ]
[ cmp eq reg 1 0x00000011 ]
[ payload load 2b @ transport header + 2 => reg 1 ]