diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-12-10 04:48:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-11 18:25:16 -0500 |
commit | dfd56b8b38fff3586f36232db58e1e9f7885a605 (patch) | |
tree | 64c7142ebf4625939f68bd3603f1d37bacb20a73 /net/xfrm | |
parent | 1ded132d4c3442aa3a619c94c245d7b5e0eb9731 (diff) |
net: use IS_ENABLED(CONFIG_IPV6)
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 6 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 82e803b56952..eb6b0b7781a5 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1340,7 +1340,7 @@ static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family) | |||
1340 | case AF_INET: | 1340 | case AF_INET: |
1341 | dst_ops = &net->xfrm.xfrm4_dst_ops; | 1341 | dst_ops = &net->xfrm.xfrm4_dst_ops; |
1342 | break; | 1342 | break; |
1343 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1343 | #if IS_ENABLED(CONFIG_IPV6) |
1344 | case AF_INET6: | 1344 | case AF_INET6: |
1345 | dst_ops = &net->xfrm.xfrm6_dst_ops; | 1345 | dst_ops = &net->xfrm.xfrm6_dst_ops; |
1346 | break; | 1346 | break; |
@@ -2435,7 +2435,7 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
2435 | case AF_INET: | 2435 | case AF_INET: |
2436 | xfrm_dst_ops = &net->xfrm.xfrm4_dst_ops; | 2436 | xfrm_dst_ops = &net->xfrm.xfrm4_dst_ops; |
2437 | break; | 2437 | break; |
2438 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 2438 | #if IS_ENABLED(CONFIG_IPV6) |
2439 | case AF_INET6: | 2439 | case AF_INET6: |
2440 | xfrm_dst_ops = &net->xfrm.xfrm6_dst_ops; | 2440 | xfrm_dst_ops = &net->xfrm.xfrm6_dst_ops; |
2441 | break; | 2441 | break; |
@@ -2485,7 +2485,7 @@ static void __net_init xfrm_dst_ops_init(struct net *net) | |||
2485 | afinfo = xfrm_policy_afinfo[AF_INET]; | 2485 | afinfo = xfrm_policy_afinfo[AF_INET]; |
2486 | if (afinfo) | 2486 | if (afinfo) |
2487 | net->xfrm.xfrm4_dst_ops = *afinfo->dst_ops; | 2487 | net->xfrm.xfrm4_dst_ops = *afinfo->dst_ops; |
2488 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 2488 | #if IS_ENABLED(CONFIG_IPV6) |
2489 | afinfo = xfrm_policy_afinfo[AF_INET6]; | 2489 | afinfo = xfrm_policy_afinfo[AF_INET6]; |
2490 | if (afinfo) | 2490 | if (afinfo) |
2491 | net->xfrm.xfrm6_dst_ops = *afinfo->dst_ops; | 2491 | net->xfrm.xfrm6_dst_ops = *afinfo->dst_ops; |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index d0a42df5160e..e0d747a2e803 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <net/netlink.h> | 28 | #include <net/netlink.h> |
29 | #include <net/ah.h> | 29 | #include <net/ah.h> |
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
31 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 31 | #if IS_ENABLED(CONFIG_IPV6) |
32 | #include <linux/in6.h> | 32 | #include <linux/in6.h> |
33 | #endif | 33 | #endif |
34 | 34 | ||
@@ -150,7 +150,7 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, | |||
150 | break; | 150 | break; |
151 | 151 | ||
152 | case AF_INET6: | 152 | case AF_INET6: |
153 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 153 | #if IS_ENABLED(CONFIG_IPV6) |
154 | break; | 154 | break; |
155 | #else | 155 | #else |
156 | err = -EAFNOSUPPORT; | 156 | err = -EAFNOSUPPORT; |
@@ -201,7 +201,7 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, | |||
201 | goto out; | 201 | goto out; |
202 | break; | 202 | break; |
203 | 203 | ||
204 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 204 | #if IS_ENABLED(CONFIG_IPV6) |
205 | case IPPROTO_DSTOPTS: | 205 | case IPPROTO_DSTOPTS: |
206 | case IPPROTO_ROUTING: | 206 | case IPPROTO_ROUTING: |
207 | if (attrs[XFRMA_ALG_COMP] || | 207 | if (attrs[XFRMA_ALG_COMP] || |
@@ -1160,7 +1160,7 @@ static int verify_newpolicy_info(struct xfrm_userpolicy_info *p) | |||
1160 | break; | 1160 | break; |
1161 | 1161 | ||
1162 | case AF_INET6: | 1162 | case AF_INET6: |
1163 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1163 | #if IS_ENABLED(CONFIG_IPV6) |
1164 | break; | 1164 | break; |
1165 | #else | 1165 | #else |
1166 | return -EAFNOSUPPORT; | 1166 | return -EAFNOSUPPORT; |
@@ -1231,7 +1231,7 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) | |||
1231 | switch (ut[i].family) { | 1231 | switch (ut[i].family) { |
1232 | case AF_INET: | 1232 | case AF_INET: |
1233 | break; | 1233 | break; |
1234 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1234 | #if IS_ENABLED(CONFIG_IPV6) |
1235 | case AF_INET6: | 1235 | case AF_INET6: |
1236 | break; | 1236 | break; |
1237 | #endif | 1237 | #endif |
@@ -2604,7 +2604,7 @@ static struct xfrm_policy *xfrm_compile_policy(struct sock *sk, int opt, | |||
2604 | return NULL; | 2604 | return NULL; |
2605 | } | 2605 | } |
2606 | break; | 2606 | break; |
2607 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 2607 | #if IS_ENABLED(CONFIG_IPV6) |
2608 | case AF_INET6: | 2608 | case AF_INET6: |
2609 | if (opt != IPV6_XFRM_POLICY) { | 2609 | if (opt != IPV6_XFRM_POLICY) { |
2610 | *dir = -EOPNOTSUPP; | 2610 | *dir = -EOPNOTSUPP; |