From: Liping Zhang Date: Wed, 8 Jun 2016 12:20:10 +0000 (+0800) Subject: netfilter: nft_meta: set skb->nf_trace appropriately X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62131e5d735226074cba53095545d76b491e5003;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nft_meta.c b/net/netfilter/nft_meta.c index 16c50b0dd426..f4bad9dc15c4 100644 --- a/net/netfilter/nft_meta.c +++ b/net/netfilter/nft_meta.c @@ -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);