netfilter: use IS_ENABLE to replace if defined in TRACE target
authorGao feng <gaofeng@cn.fujitsu.com>
Thu, 21 Mar 2013 19:48:42 +0000 (19:48 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 Apr 2013 23:03:45 +0000 (01:03 +0200)
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/ip_output.c
net/ipv4/netfilter/ip_tables.c

index 5e12dca7b3dd4914af0f1f0e333c59f6547968f8..147abf5275aa6604df58c3b022eaeceaee10df4f 100644 (file)
@@ -430,8 +430,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
        to->tc_index = from->tc_index;
 #endif
        nf_copy(to, from);
-#if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \
-    defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE)
+#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
        to->nf_trace = from->nf_trace;
 #endif
 #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
index 3efcf87400c3420f7d2d877b7472f2d4aeea00a1..1b433aac26639b5f6b9800516434e48395b2191a 100644 (file)
@@ -182,8 +182,7 @@ ipt_get_target_c(const struct ipt_entry *e)
        return ipt_get_target((struct ipt_entry *)e);
 }
 
-#if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \
-    defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE)
+#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
 static const char *const hooknames[] = {
        [NF_INET_PRE_ROUTING]           = "PREROUTING",
        [NF_INET_LOCAL_IN]              = "INPUT",
@@ -361,8 +360,7 @@ ipt_do_table(struct sk_buff *skb,
                t = ipt_get_target(e);
                IP_NF_ASSERT(t->u.kernel.target);
 
-#if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \
-    defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE)
+#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
                /* The packet is traced: log it */
                if (unlikely(skb->nf_trace))
                        trace_packet(skb, hook, in, out,