diff mbox series

[nf] netfilter: nf_tables: add missing netlink attrs to policies

Message ID 20180320142537.17542-1-fw@strlen.de
State Accepted
Delegated to: Pablo Neira
Headers show
Series [nf] netfilter: nf_tables: add missing netlink attrs to policies | expand

Commit Message

Florian Westphal March 20, 2018, 2:25 p.m. UTC
Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements")
Fixes: f25ad2e907f1 ("netfilter: nf_tables: prepare for expressions associated to set elements")
Fixes: 1a94e38d254b ("netfilter: nf_tables: add NFTA_RULE_ID attribute")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
nb: there are a few more missing policies in nf-next as well.

Comments

Pablo Neira Ayuso March 20, 2018, 3:49 p.m. UTC | #1
On Tue, Mar 20, 2018 at 03:25:37PM +0100, Florian Westphal wrote:
> Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements")
> Fixes: f25ad2e907f1 ("netfilter: nf_tables: prepare for expressions associated to set elements")
> Fixes: 1a94e38d254b ("netfilter: nf_tables: add NFTA_RULE_ID attribute")
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied, thanks Florian.

> nb: there are a few more missing policies in nf-next as well.

I guess this must be something missing for the flowtables thing. We
can place a specific patch for this in nf-next.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index c2ad333dce1e..19354019c818 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1973,6 +1973,7 @@  static const struct nla_policy nft_rule_policy[NFTA_RULE_MAX + 1] = {
 	[NFTA_RULE_POSITION]	= { .type = NLA_U64 },
 	[NFTA_RULE_USERDATA]	= { .type = NLA_BINARY,
 				    .len = NFT_USERDATA_MAXLEN },
+	[NFTA_RULE_ID]		= { .type = NLA_U32 },
 };
 
 static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
@@ -3380,6 +3381,8 @@  static const struct nla_policy nft_set_elem_policy[NFTA_SET_ELEM_MAX + 1] = {
 	[NFTA_SET_ELEM_TIMEOUT]		= { .type = NLA_U64 },
 	[NFTA_SET_ELEM_USERDATA]	= { .type = NLA_BINARY,
 					    .len = NFT_USERDATA_MAXLEN },
+	[NFTA_SET_ELEM_EXPR]		= { .type = NLA_NESTED },
+	[NFTA_SET_ELEM_OBJREF]		= { .type = NLA_STRING },
 };
 
 static const struct nla_policy nft_set_elem_list_policy[NFTA_SET_ELEM_LIST_MAX + 1] = {