]> git.ipfire.org Git - thirdparty/nftables.git/commit
meta: permit meta nfproto ip in ip family
authorFlorian Westphal <fw@strlen.de>
Mon, 29 May 2017 17:25:37 +0000 (19:25 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 6 Jun 2017 18:53:13 +0000 (20:53 +0200)
commitae07c2361472b1852d886bf06ed9f2a1fd8aca38
tree53fed20aaf8de499a875f04213348b4ee5ef6b84
parent8786dc5f30db5a686c25de7cc80da1fd21082683
meta: permit meta nfproto ip in ip family

works:
add rule ip filter input ct original saddr 1.2.3.4
(family ctx init initialises network base to proto_ip).

fails to parse 1.2.3.4 address:
add rule ip filter input meta nfproto ipv4 ct original saddr 1.2.3.4

... because meta_expr_pctx_update() won't find a dependency
from "ip" to "ip" and then overwrites the correct base with proto_unknown.

"meta nfproto ip" is useless in the ip family, as it will always match,
i.e.  a better (but more compliated) fix would be to remove the statement
during evaluation.

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/meta.c