]> git.ipfire.org Git - thirdparty/nftables.git/commit
reject: Fix for missing dependencies in netdev family
authorPhil Sutter <phil@nwl.cc>
Tue, 26 Jan 2021 16:06:33 +0000 (17:06 +0100)
committerPhil Sutter <phil@nwl.cc>
Wed, 27 Jan 2021 16:21:25 +0000 (17:21 +0100)
commita206f22bdbd03a9c8dcf2f98e3ed7566b198d281
treeafc61153b63ccfabf0f07e6c1bc8ebda1e010567
parent990cbbf75c40b92e6d6dc66721dfbedf33cacf8f
reject: Fix for missing dependencies in netdev family

Like with bridge family, rejecting with either icmp or icmpv6 must
create a dependency match on meta protocol. Upon delinearization, treat
netdev reject identical to bridge as well so no family info is lost.

This makes reject statement in netdev family fully symmetric so fix
the tests in tests/py/netdev/reject.t, adjust the related payload dumps
and add JSON equivalents which were missing altogether.

Fixes: 0c42a1f2a0cc5 ("evaluate: add netdev support for reject default")
Fixes: a51a0bec1f698 ("tests: py: add netdev folder and reject.t icmp cases")
Cc: Jose M. Guisado Gomez <guigom@riseup.net>
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/evaluate.c
src/netlink_delinearize.c
tests/py/netdev/reject.t
tests/py/netdev/reject.t.json [new file with mode: 0644]
tests/py/netdev/reject.t.payload