path: root/net
diff options
authorPablo Neira Ayuso <pablo@netfilter.org>2019-09-16 18:33:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-09-20 10:20:02 +0200
commitad652f3811d8644d547506154ec9a9c22c8771cd (patch)
treeed7bdff7807b9b09142d899c55581c564801167d /net
parent864668bfc374dfbf4851ec828b9049e08f9057b1 (diff)
netfilter: nf_tables: add NFT_CHAIN_POLICY_UNSET and use it
Default policy is defined as a unsigned 8-bit field, do not use a negative value to leave it unset, use this new NFT_CHAIN_POLICY_UNSET instead. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index e4a68dc42694..4a5d6ef2b706 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1715,7 +1715,7 @@ static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
goto err2;
- nft_trans_chain_policy(trans) = -1;
+ nft_trans_chain_policy(trans) = NFT_CHAIN_POLICY_UNSET;
if (nft_is_base_chain(chain))
nft_trans_chain_policy(trans) = policy;

Privacy Policy