summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-04-17 10:21:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-26 11:24:02 +0200
commit01125379e2dcdd70a64f21c7da273268a9147250 (patch)
tree5a94eb22b64e8a0f4532e243915e2d1f1c43696d /include/linux
parent7c1019391bd6cf4a50151eead04a59fb460ca6d2 (diff)
downloadlinux-01125379e2dcdd70a64f21c7da273268a9147250.tar.gz
linux-01125379e2dcdd70a64f21c7da273268a9147250.tar.bz2
linux-01125379e2dcdd70a64f21c7da273268a9147250.zip
netfilter: nf_tables: fix ifdef to also consider nf_tables=m
[ Upstream commit c55c0e91c813589dc55bea6bf9a9fbfaa10ae41d ] nftables can be built as a module, so fix the preprocessor conditional accordingly. Fixes: 478b360a47b7 ("netfilter: nf_tables: fix nf_trace always-on with XT_TRACE=n") Reported-by: Florian Fainelli <f.fainelli@gmail.com> Reported-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/skbuff.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c951d16a40a7..302a2ad67980 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -4227,7 +4227,7 @@ static inline void nf_reset_ct(struct sk_buff *skb)
static inline void nf_reset_trace(struct sk_buff *skb)
{
-#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES)
+#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES)
skb->nf_trace = 0;
#endif
}
@@ -4247,7 +4247,7 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src,
dst->_nfct = src->_nfct;
nf_conntrack_get(skb_nfct(src));
#endif
-#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES)
+#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES)
if (copy)
dst->nf_trace = src->nf_trace;
#endif