netfilter: nf_tables: disallow binding to already bound chain
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 22 Aug 2022 09:06:39 +0000 (11:06 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Aug 2022 05:43:21 +0000 (07:43 +0200)
commite02f0d3970404bfea385b6edb86f2d936db0ea2b
tree245d5bc7b84bb37e477ad99537efd2081ffb8c98
parent01e4092d53bc4fe122a6e4b6d664adbd57528ca3
netfilter: nf_tables: disallow binding to already bound chain

Update nft_data_init() to report EINVAL if chain is already bound.

Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Reported-by: Gwangun Jung <exsociety@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c