]> git.ipfire.org Git - thirdparty/nftables.git/commit
tests: py: add vlan test case for ip/inet family
authorFlorian Westphal <fw@strlen.de>
Tue, 27 Sep 2022 13:41:33 +0000 (15:41 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 29 Sep 2022 12:59:19 +0000 (14:59 +0200)
commit0f1fbeca73b9dfcf19e04eb5ce4718528c01c2f1
tree4a44ce5891afe7c8155894c2e901cc1c46c1cc9c
parent8a0a3dbd208e0559bcce9008accfe38c7143183c
tests: py: add vlan test case for ip/inet family

before fixup, this failed with:

line 4: 'add rule ip test-ip4 input vlan id 1': '[ payload load 2b @ link header + 12 => reg 1 ]' mismatches '[ payload load 2b @ link header + 0 => reg 1 ]'

... because the auto-dependency did not add the preceeding ethernet
header, so vlan was using the wrong offset.

Note than vlan id match in inet input families will only work if header
removal was disabled, i.e.

... add link vethin1 name vethin1.3 type vlan id 3 reorder_hdr off

otherwise, kernel will strip the vlan tag and interface appears as
a normal ethernet interface.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/py/inet/ether.t
tests/py/inet/ether.t.json
tests/py/inet/ether.t.payload
tests/py/inet/ether.t.payload.bridge
tests/py/inet/ether.t.payload.ip