diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-03-21 15:48:42 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-04-01 19:03:45 -0400 |
commit | f0165888610a1701a39670c7eadf63a61fad708d (patch) | |
tree | b1bb334c2d5c2dfe61f51122cfae2b11530b1ea1 /net/ipv4 | |
parent | ac69269a45e84c1772dcb9e77db976a932f4af22 (diff) |
netfilter: use IS_ENABLE to replace if defined in TRACE target
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 3 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 5e12dca7b3dd..147abf5275aa 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -430,8 +430,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
430 | to->tc_index = from->tc_index; | 430 | to->tc_index = from->tc_index; |
431 | #endif | 431 | #endif |
432 | nf_copy(to, from); | 432 | nf_copy(to, from); |
433 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | 433 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) |
434 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | ||
435 | to->nf_trace = from->nf_trace; | 434 | to->nf_trace = from->nf_trace; |
436 | #endif | 435 | #endif |
437 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) | 436 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 3efcf87400c3..1b433aac2663 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -182,8 +182,7 @@ ipt_get_target_c(const struct ipt_entry *e) | |||
182 | return ipt_get_target((struct ipt_entry *)e); | 182 | return ipt_get_target((struct ipt_entry *)e); |
183 | } | 183 | } |
184 | 184 | ||
185 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | 185 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) |
186 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | ||
187 | static const char *const hooknames[] = { | 186 | static const char *const hooknames[] = { |
188 | [NF_INET_PRE_ROUTING] = "PREROUTING", | 187 | [NF_INET_PRE_ROUTING] = "PREROUTING", |
189 | [NF_INET_LOCAL_IN] = "INPUT", | 188 | [NF_INET_LOCAL_IN] = "INPUT", |
@@ -361,8 +360,7 @@ ipt_do_table(struct sk_buff *skb, | |||
361 | t = ipt_get_target(e); | 360 | t = ipt_get_target(e); |
362 | IP_NF_ASSERT(t->u.kernel.target); | 361 | IP_NF_ASSERT(t->u.kernel.target); |
363 | 362 | ||
364 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | 363 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) |
365 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | ||
366 | /* The packet is traced: log it */ | 364 | /* The packet is traced: log it */ |
367 | if (unlikely(skb->nf_trace)) | 365 | if (unlikely(skb->nf_trace)) |
368 | trace_packet(skb, hook, in, out, | 366 | trace_packet(skb, hook, in, out, |