]> git.ipfire.org Git - thirdparty/nftables.git/commit
nft-test: don't zap remainder of rule after handling a set
authorFlorian Westphal <fw@strlen.de>
Mon, 7 Mar 2016 20:05:56 +0000 (21:05 +0100)
committerFlorian Westphal <fw@strlen.de>
Thu, 10 Mar 2016 13:08:35 +0000 (14:08 +0100)
commitf0b32f868a43345c77b3852ed0b3fb0d5856bed4
tree7183780252585a13da1e6212fc90d24ebb0e7276
parentebb0dd15731d2782b6ade1a0904c2c8890e5b5aa
nft-test: don't zap remainder of rule after handling a set

Don't delete the part after the set, i.e. given

 chain input {
     type filter hook input priority 0; policy accept;
     vlan id { 1, 2, 4, 100, 4095} vlan pcp 1-3
 }

don't remove the vlan pcp 1-3 part.

This exposes following bug:

bridge/vlan.t: WARNING: line: 32:
'nft add rule --debug=netlink bridge test-bridge input vlan id { 1, 2, 4, 100, 4095 } vlan pcp 1-3': 'vlan id { 1, 2, 4, 100, 4095 } vlan pcp 1-3' mismatches 'vlan id { 4, 1, 2, 4095, 100} vlan pcp 0-0'

We do not shift the range, so on reverse translation we get a 0-0 output.
The bug will be fixes in a followup commit.

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