]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: tproxy: relax family restrictions
authorFlorian Westphal <fw@strlen.de>
Wed, 29 Aug 2018 09:37:40 +0000 (11:37 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 29 Aug 2018 21:53:54 +0000 (23:53 +0200)
commitbb594473acd532aee6a268a6b27fd529ac71d4b5
tree45b2c657c37b7a94baa20a5f3562b94042b7f72f
parent92029c1282958aad13eb8602c67b73caf2a08a09
src: tproxy: relax family restrictions

evaluation step currently prohibits

tproxy ip to 1.2.3.4 in ip family, and
tproxy ip6 to dead::1 in ip6.

This seems an arbitrary limitation, just accept this.
The current restriction would make json output support harder than needed,
as the tproxy expression generated from json path would have to
special-case the table its currently in, rather than just using the
family attribute in the json output.

We obviously still reject the family in case it mismatches
the table family (e.g., can't use ip address in ip6 table).

Signed-off-by: Florian Westphal <fw@strlen.de>
src/evaluate.c
tests/py/ip/tproxy.t
tests/py/ip/tproxy.t.payload
tests/py/ip6/tproxy.t
tests/py/ip6/tproxy.t.payload