diff options
author | Igor Maravić <igorm@etf.rs> | 2011-12-11 21:58:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-16 15:49:52 -0500 |
commit | c0cd115667bcd23c2a31fe2114beaab3608de68c (patch) | |
tree | 886a94793dcbe9797c593d465aa4f37039231422 /net/netfilter/xt_addrtype.c | |
parent | 29c36262383d37c6149cf26afd39c3389dd23135 (diff) |
net:netfilter: use IS_ENABLED
Use IS_ENABLED(CONFIG_FOO)
instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE)
Signed-off-by: Igor Maravić <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_addrtype.c')
-rw-r--r-- | net/netfilter/xt_addrtype.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/xt_addrtype.c b/net/netfilter/xt_addrtype.c index c047de2046a..49c5ff7f6dd 100644 --- a/net/netfilter/xt_addrtype.c +++ b/net/netfilter/xt_addrtype.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/ip.h> | 16 | #include <linux/ip.h> |
17 | #include <net/route.h> | 17 | #include <net/route.h> |
18 | 18 | ||
19 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 19 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) |
20 | #include <net/ipv6.h> | 20 | #include <net/ipv6.h> |
21 | #include <net/ip6_route.h> | 21 | #include <net/ip6_route.h> |
22 | #include <net/ip6_fib.h> | 22 | #include <net/ip6_fib.h> |
@@ -31,7 +31,7 @@ MODULE_DESCRIPTION("Xtables: address type match"); | |||
31 | MODULE_ALIAS("ipt_addrtype"); | 31 | MODULE_ALIAS("ipt_addrtype"); |
32 | MODULE_ALIAS("ip6t_addrtype"); | 32 | MODULE_ALIAS("ip6t_addrtype"); |
33 | 33 | ||
34 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 34 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) |
35 | static u32 match_lookup_rt6(struct net *net, const struct net_device *dev, | 35 | static u32 match_lookup_rt6(struct net *net, const struct net_device *dev, |
36 | const struct in6_addr *addr) | 36 | const struct in6_addr *addr) |
37 | { | 37 | { |
@@ -149,7 +149,7 @@ addrtype_mt_v1(const struct sk_buff *skb, struct xt_action_param *par) | |||
149 | else if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT) | 149 | else if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT) |
150 | dev = par->out; | 150 | dev = par->out; |
151 | 151 | ||
152 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 152 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) |
153 | if (par->family == NFPROTO_IPV6) | 153 | if (par->family == NFPROTO_IPV6) |
154 | return addrtype_mt6(net, dev, skb, info); | 154 | return addrtype_mt6(net, dev, skb, info); |
155 | #endif | 155 | #endif |
@@ -190,7 +190,7 @@ static int addrtype_mt_checkentry_v1(const struct xt_mtchk_param *par) | |||
190 | return -EINVAL; | 190 | return -EINVAL; |
191 | } | 191 | } |
192 | 192 | ||
193 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 193 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) |
194 | if (par->family == NFPROTO_IPV6) { | 194 | if (par->family == NFPROTO_IPV6) { |
195 | if ((info->source | info->dest) & XT_ADDRTYPE_BLACKHOLE) { | 195 | if ((info->source | info->dest) & XT_ADDRTYPE_BLACKHOLE) { |
196 | pr_err("ipv6 BLACKHOLE matching not supported\n"); | 196 | pr_err("ipv6 BLACKHOLE matching not supported\n"); |