Skip to content

Commit

Permalink
netfilter: nft_meta: set skb->nf_trace appropriately
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liping Zhang authored and Pablo Neira Ayuso committed Jun 23, 2016
1 parent 6cafaf4 commit 62131e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nft_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void nft_meta_set_eval(const struct nft_expr *expr,
skb->pkt_type = value;
break;
case NFT_META_NFTRACE:
skb->nf_trace = 1;
skb->nf_trace = !!value;
break;
default:
WARN_ON(1);
Expand Down

0 comments on commit 62131e5

Please sign in to comment.