netfilter: nft_meta: set skb->nf_trace appropriately

When user add a nft rule to set nftrace to zero, for example:

  # nft add rule ip filter input nftrace set 0

We should set nf_trace to zero also.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Liping Zhang 2016-06-08 20:20:10 +08:00 committed by Pablo Neira Ayuso
parent 6cafaf4764
commit 62131e5d73
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ void nft_meta_set_eval(const struct nft_expr *expr,
skb->pkt_type = value; skb->pkt_type = value;
break; break;
case NFT_META_NFTRACE: case NFT_META_NFTRACE:
skb->nf_trace = 1; skb->nf_trace = !!value;
break; break;
default: default:
WARN_ON(1); WARN_ON(1);