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/netlabel/netlabel_kapi.c | |
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/netlabel/netlabel_kapi.c')
-rw-r--r-- | net/netlabel/netlabel_kapi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index 5952237c0c86..2560e7b441c6 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c | |||
@@ -147,7 +147,7 @@ int netlbl_cfg_unlbl_map_add(const char *domain, | |||
147 | goto cfg_unlbl_map_add_failure; | 147 | goto cfg_unlbl_map_add_failure; |
148 | break; | 148 | break; |
149 | } | 149 | } |
150 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 150 | #if IS_ENABLED(CONFIG_IPV6) |
151 | case AF_INET6: { | 151 | case AF_INET6: { |
152 | const struct in6_addr *addr6 = addr; | 152 | const struct in6_addr *addr6 = addr; |
153 | const struct in6_addr *mask6 = mask; | 153 | const struct in6_addr *mask6 = mask; |
@@ -227,7 +227,7 @@ int netlbl_cfg_unlbl_static_add(struct net *net, | |||
227 | case AF_INET: | 227 | case AF_INET: |
228 | addr_len = sizeof(struct in_addr); | 228 | addr_len = sizeof(struct in_addr); |
229 | break; | 229 | break; |
230 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 230 | #if IS_ENABLED(CONFIG_IPV6) |
231 | case AF_INET6: | 231 | case AF_INET6: |
232 | addr_len = sizeof(struct in6_addr); | 232 | addr_len = sizeof(struct in6_addr); |
233 | break; | 233 | break; |
@@ -270,7 +270,7 @@ int netlbl_cfg_unlbl_static_del(struct net *net, | |||
270 | case AF_INET: | 270 | case AF_INET: |
271 | addr_len = sizeof(struct in_addr); | 271 | addr_len = sizeof(struct in_addr); |
272 | break; | 272 | break; |
273 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 273 | #if IS_ENABLED(CONFIG_IPV6) |
274 | case AF_INET6: | 274 | case AF_INET6: |
275 | addr_len = sizeof(struct in6_addr); | 275 | addr_len = sizeof(struct in6_addr); |
276 | break; | 276 | break; |
@@ -673,7 +673,7 @@ int netlbl_sock_setattr(struct sock *sk, | |||
673 | ret_val = -ENOENT; | 673 | ret_val = -ENOENT; |
674 | } | 674 | } |
675 | break; | 675 | break; |
676 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 676 | #if IS_ENABLED(CONFIG_IPV6) |
677 | case AF_INET6: | 677 | case AF_INET6: |
678 | /* since we don't support any IPv6 labeling protocols right | 678 | /* since we don't support any IPv6 labeling protocols right |
679 | * now we can optimize everything away until we do */ | 679 | * now we can optimize everything away until we do */ |
@@ -724,7 +724,7 @@ int netlbl_sock_getattr(struct sock *sk, | |||
724 | case AF_INET: | 724 | case AF_INET: |
725 | ret_val = cipso_v4_sock_getattr(sk, secattr); | 725 | ret_val = cipso_v4_sock_getattr(sk, secattr); |
726 | break; | 726 | break; |
727 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 727 | #if IS_ENABLED(CONFIG_IPV6) |
728 | case AF_INET6: | 728 | case AF_INET6: |
729 | ret_val = -ENOMSG; | 729 | ret_val = -ENOMSG; |
730 | break; | 730 | break; |
@@ -782,7 +782,7 @@ int netlbl_conn_setattr(struct sock *sk, | |||
782 | ret_val = -ENOENT; | 782 | ret_val = -ENOENT; |
783 | } | 783 | } |
784 | break; | 784 | break; |
785 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 785 | #if IS_ENABLED(CONFIG_IPV6) |
786 | case AF_INET6: | 786 | case AF_INET6: |
787 | /* since we don't support any IPv6 labeling protocols right | 787 | /* since we don't support any IPv6 labeling protocols right |
788 | * now we can optimize everything away until we do */ | 788 | * now we can optimize everything away until we do */ |
@@ -853,7 +853,7 @@ int netlbl_req_setattr(struct request_sock *req, | |||
853 | ret_val = -ENOENT; | 853 | ret_val = -ENOENT; |
854 | } | 854 | } |
855 | break; | 855 | break; |
856 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 856 | #if IS_ENABLED(CONFIG_IPV6) |
857 | case AF_INET6: | 857 | case AF_INET6: |
858 | /* since we don't support any IPv6 labeling protocols right | 858 | /* since we don't support any IPv6 labeling protocols right |
859 | * now we can optimize everything away until we do */ | 859 | * now we can optimize everything away until we do */ |
@@ -926,7 +926,7 @@ int netlbl_skbuff_setattr(struct sk_buff *skb, | |||
926 | ret_val = -ENOENT; | 926 | ret_val = -ENOENT; |
927 | } | 927 | } |
928 | break; | 928 | break; |
929 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 929 | #if IS_ENABLED(CONFIG_IPV6) |
930 | case AF_INET6: | 930 | case AF_INET6: |
931 | /* since we don't support any IPv6 labeling protocols right | 931 | /* since we don't support any IPv6 labeling protocols right |
932 | * now we can optimize everything away until we do */ | 932 | * now we can optimize everything away until we do */ |
@@ -965,7 +965,7 @@ int netlbl_skbuff_getattr(const struct sk_buff *skb, | |||
965 | cipso_v4_skbuff_getattr(skb, secattr) == 0) | 965 | cipso_v4_skbuff_getattr(skb, secattr) == 0) |
966 | return 0; | 966 | return 0; |
967 | break; | 967 | break; |
968 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 968 | #if IS_ENABLED(CONFIG_IPV6) |
969 | case AF_INET6: | 969 | case AF_INET6: |
970 | break; | 970 | break; |
971 | #endif /* IPv6 */ | 971 | #endif /* IPv6 */ |