]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: remove two non-sensical rules
authorFlorian Westphal <fw@strlen.de>
Fri, 16 Jun 2017 20:17:05 +0000 (22:17 +0200)
committerFlorian Westphal <fw@strlen.de>
Sun, 18 Jun 2017 21:28:57 +0000 (23:28 +0200)
meta nfproto returns the hook family that the current packet
is being evaluted in, e.g.
NFPROTO_NETDEV in case we're called from the netdev context.

This makes no sense, if we add a rule to netdev, bridge, ip, ...
table then thats where it will be evaluated, no runtime test needed.

Only exception: inet family, in this case, nfproto will be either
ipv4 or ipv6.

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/inet/ether.t
tests/py/inet/ether.t.payload

index 0a88aef1609b557aff762b58669e439028787f53..afdf8b89ca656d1c117f4e793a0342699f25fb25 100644 (file)
@@ -7,9 +7,7 @@
 *bridge;test-bridge;input
 *netdev;test-netdev;ingress
 
-tcp dport 22 iiftype ether ether saddr 00:0f:54:0c:11:4 meta nfproto ipv4 accept;ok;tcp dport 22 ether saddr 00:0f:54:0c:11:04 meta nfproto ipv4 accept
 tcp dport 22 iiftype ether ether saddr 00:0f:54:0c:11:4 accept;ok;tcp dport 22 ether saddr 00:0f:54:0c:11:04 accept
 tcp dport 22 ether saddr 00:0f:54:0c:11:04 accept;ok
 
 ether saddr 00:0f:54:0c:11:04 accept;ok
-ether saddr 00:0f:54:0c:11:04 meta nfproto ipv4;ok
index 86f30c37f6bd4cb3ecbea825bead8f4613f2c50d..53648413d58809f5a61568919a84847e5d43a4b8 100644 (file)
@@ -1,17 +1,3 @@
-# tcp dport 22 iiftype ether ether saddr 00:0f:54:0c:11:4 meta nfproto ipv4 accept
-inet test-inet input
-  [ meta load l4proto => reg 1 ]
-  [ cmp eq reg 1 0x00000006 ]
-  [ payload load 2b @ transport header + 2 => reg 1 ]
-  [ cmp eq reg 1 0x00001600 ]
-  [ meta load iiftype => reg 1 ]
-  [ cmp eq reg 1 0x00000001 ]
-  [ payload load 6b @ link header + 6 => reg 1 ]
-  [ cmp eq reg 1 0x0c540f00 0x00000411 ]
-  [ meta load nfproto => reg 1 ]
-  [ cmp eq reg 1 0x00000002 ]
-  [ immediate reg 0 accept ]
-
 # tcp dport 22 iiftype ether ether saddr 00:0f:54:0c:11:4 accept
 inet test-inet input
   [ meta load l4proto => reg 1 ]
@@ -44,12 +30,3 @@ inet test-inet input
   [ cmp eq reg 1 0x0c540f00 0x00000411 ]
   [ immediate reg 0 accept ]
 
-# ether saddr 00:0f:54:0c:11:04 meta nfproto ipv4
-inet test-inet input
-  [ meta load iiftype => reg 1 ]
-  [ cmp eq reg 1 0x00000001 ]
-  [ payload load 6b @ link header + 6 => reg 1 ]
-  [ cmp eq reg 1 0x0c540f00 0x00000411 ]
-  [ meta load nfproto => reg 1 ]
-  [ cmp eq reg 1 0x00000002 ]
-