mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
netfilter: nf_tables_offload: fix always true policy is unset check
New smatch warnings: net/netfilter/nf_tables_offload.c:316 nft_flow_offload_chain() warn: always true condition '(policy != -1) => (0-255 != (-1))' Reported-by: kbuild test robot <lkp@intel.com> Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
ad652f3811
commit
ff175d0b0e
@ -313,7 +313,7 @@ static int nft_flow_offload_chain(struct nft_chain *chain,
|
||||
policy = ppolicy ? *ppolicy : basechain->policy;
|
||||
|
||||
/* Only default policy to accept is supported for now. */
|
||||
if (cmd == FLOW_BLOCK_BIND && policy != -1 && policy != NF_ACCEPT)
|
||||
if (cmd == FLOW_BLOCK_BIND && policy == NF_DROP)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (dev->netdev_ops->ndo_setup_tc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user