netfilter: nf_tables: disallow updates of implicit chain
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nf_tables: disallow updates of implicit chain
Updates on existing implicit chain make no sense, disallow this.
Fixes d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nf_tables_api.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/nf_tables_api.c +3 -0
@@ -2574,6 +2574,9 @@ static int nf_tables_newchain(struct sk_buff *skb, const struct nfnl_info *info,nft_ctx_init (&ctx, net, skb, info->nlh, family, table, chain, nla);if (chain !=NULL ) { +if (chain->flags &NFT_CHAIN_BINDING ) +return -EINVAL ; +if (info->nlh->nlmsg_flags &NLM_F_EXCL ) {NL_SET_BAD_ATTR (extack, attr);return -EEXIST ;
Signature · 1 line
2.30.2