aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlabel/netlabel_unlabeled.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-12-10 04:48:31 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-11 18:25:16 -0500
commitdfd56b8b38fff3586f36232db58e1e9f7885a605 (patch)
tree64c7142ebf4625939f68bd3603f1d37bacb20a73 /net/netlabel/netlabel_unlabeled.c
parent1ded132d4c3442aa3a619c94c245d7b5e0eb9731 (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_unlabeled.c')
-rw-r--r--net/netlabel/netlabel_unlabeled.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index 049ccd2447d7..4b5fa0fe78fd 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -170,7 +170,7 @@ static void netlbl_unlhsh_free_iface(struct rcu_head *entry)
170 struct netlbl_unlhsh_iface *iface; 170 struct netlbl_unlhsh_iface *iface;
171 struct netlbl_af4list *iter4; 171 struct netlbl_af4list *iter4;
172 struct netlbl_af4list *tmp4; 172 struct netlbl_af4list *tmp4;
173#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 173#if IS_ENABLED(CONFIG_IPV6)
174 struct netlbl_af6list *iter6; 174 struct netlbl_af6list *iter6;
175 struct netlbl_af6list *tmp6; 175 struct netlbl_af6list *tmp6;
176#endif /* IPv6 */ 176#endif /* IPv6 */
@@ -184,7 +184,7 @@ static void netlbl_unlhsh_free_iface(struct rcu_head *entry)
184 netlbl_af4list_remove_entry(iter4); 184 netlbl_af4list_remove_entry(iter4);
185 kfree(netlbl_unlhsh_addr4_entry(iter4)); 185 kfree(netlbl_unlhsh_addr4_entry(iter4));
186 } 186 }
187#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 187#if IS_ENABLED(CONFIG_IPV6)
188 netlbl_af6list_foreach_safe(iter6, tmp6, &iface->addr6_list) { 188 netlbl_af6list_foreach_safe(iter6, tmp6, &iface->addr6_list) {
189 netlbl_af6list_remove_entry(iter6); 189 netlbl_af6list_remove_entry(iter6);
190 kfree(netlbl_unlhsh_addr6_entry(iter6)); 190 kfree(netlbl_unlhsh_addr6_entry(iter6));
@@ -274,7 +274,7 @@ static int netlbl_unlhsh_add_addr4(struct netlbl_unlhsh_iface *iface,
274 return ret_val; 274 return ret_val;
275} 275}
276 276
277#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 277#if IS_ENABLED(CONFIG_IPV6)
278/** 278/**
279 * netlbl_unlhsh_add_addr6 - Add a new IPv6 address entry to the hash table 279 * netlbl_unlhsh_add_addr6 - Add a new IPv6 address entry to the hash table
280 * @iface: the associated interface entry 280 * @iface: the associated interface entry
@@ -436,7 +436,7 @@ int netlbl_unlhsh_add(struct net *net,
436 mask4->s_addr); 436 mask4->s_addr);
437 break; 437 break;
438 } 438 }
439#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 439#if IS_ENABLED(CONFIG_IPV6)
440 case sizeof(struct in6_addr): { 440 case sizeof(struct in6_addr): {
441 const struct in6_addr *addr6 = addr; 441 const struct in6_addr *addr6 = addr;
442 const struct in6_addr *mask6 = mask; 442 const struct in6_addr *mask6 = mask;
@@ -531,7 +531,7 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
531 return 0; 531 return 0;
532} 532}
533 533
534#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 534#if IS_ENABLED(CONFIG_IPV6)
535/** 535/**
536 * netlbl_unlhsh_remove_addr6 - Remove an IPv6 address entry 536 * netlbl_unlhsh_remove_addr6 - Remove an IPv6 address entry
537 * @net: network namespace 537 * @net: network namespace
@@ -606,14 +606,14 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
606static void netlbl_unlhsh_condremove_iface(struct netlbl_unlhsh_iface *iface) 606static void netlbl_unlhsh_condremove_iface(struct netlbl_unlhsh_iface *iface)
607{ 607{
608 struct netlbl_af4list *iter4; 608 struct netlbl_af4list *iter4;
609#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 609#if IS_ENABLED(CONFIG_IPV6)
610 struct netlbl_af6list *iter6; 610 struct netlbl_af6list *iter6;
611#endif /* IPv6 */ 611#endif /* IPv6 */
612 612
613 spin_lock(&netlbl_unlhsh_lock); 613 spin_lock(&netlbl_unlhsh_lock);
614 netlbl_af4list_foreach_rcu(iter4, &iface->addr4_list) 614 netlbl_af4list_foreach_rcu(iter4, &iface->addr4_list)
615 goto unlhsh_condremove_failure; 615 goto unlhsh_condremove_failure;
616#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 616#if IS_ENABLED(CONFIG_IPV6)
617 netlbl_af6list_foreach_rcu(iter6, &iface->addr6_list) 617 netlbl_af6list_foreach_rcu(iter6, &iface->addr6_list)
618 goto unlhsh_condremove_failure; 618 goto unlhsh_condremove_failure;
619#endif /* IPv6 */ 619#endif /* IPv6 */
@@ -680,7 +680,7 @@ int netlbl_unlhsh_remove(struct net *net,
680 iface, addr, mask, 680 iface, addr, mask,
681 audit_info); 681 audit_info);
682 break; 682 break;
683#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 683#if IS_ENABLED(CONFIG_IPV6)
684 case sizeof(struct in6_addr): 684 case sizeof(struct in6_addr):
685 ret_val = netlbl_unlhsh_remove_addr6(net, 685 ret_val = netlbl_unlhsh_remove_addr6(net,
686 iface, addr, mask, 686 iface, addr, mask,
@@ -1196,7 +1196,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
1196 struct netlbl_unlhsh_iface *iface; 1196 struct netlbl_unlhsh_iface *iface;
1197 struct list_head *iter_list; 1197 struct list_head *iter_list;
1198 struct netlbl_af4list *addr4; 1198 struct netlbl_af4list *addr4;
1199#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 1199#if IS_ENABLED(CONFIG_IPV6)
1200 struct netlbl_af6list *addr6; 1200 struct netlbl_af6list *addr6;
1201#endif 1201#endif
1202 1202
@@ -1228,7 +1228,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
1228 goto unlabel_staticlist_return; 1228 goto unlabel_staticlist_return;
1229 } 1229 }
1230 } 1230 }
1231#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 1231#if IS_ENABLED(CONFIG_IPV6)
1232 netlbl_af6list_foreach_rcu(addr6, 1232 netlbl_af6list_foreach_rcu(addr6,
1233 &iface->addr6_list) { 1233 &iface->addr6_list) {
1234 if (iter_addr6++ < skip_addr6) 1234 if (iter_addr6++ < skip_addr6)
@@ -1277,7 +1277,7 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb,
1277 u32 skip_addr6 = cb->args[1]; 1277 u32 skip_addr6 = cb->args[1];
1278 u32 iter_addr4 = 0; 1278 u32 iter_addr4 = 0;
1279 struct netlbl_af4list *addr4; 1279 struct netlbl_af4list *addr4;
1280#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 1280#if IS_ENABLED(CONFIG_IPV6)
1281 u32 iter_addr6 = 0; 1281 u32 iter_addr6 = 0;
1282 struct netlbl_af6list *addr6; 1282 struct netlbl_af6list *addr6;
1283#endif 1283#endif
@@ -1303,7 +1303,7 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb,
1303 goto unlabel_staticlistdef_return; 1303 goto unlabel_staticlistdef_return;
1304 } 1304 }
1305 } 1305 }
1306#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 1306#if IS_ENABLED(CONFIG_IPV6)
1307 netlbl_af6list_foreach_rcu(addr6, &iface->addr6_list) { 1307 netlbl_af6list_foreach_rcu(addr6, &iface->addr6_list) {
1308 if (iter_addr6++ < skip_addr6) 1308 if (iter_addr6++ < skip_addr6)
1309 continue; 1309 continue;
@@ -1494,7 +1494,7 @@ int netlbl_unlabel_getattr(const struct sk_buff *skb,
1494 secattr->attr.secid = netlbl_unlhsh_addr4_entry(addr4)->secid; 1494 secattr->attr.secid = netlbl_unlhsh_addr4_entry(addr4)->secid;
1495 break; 1495 break;
1496 } 1496 }
1497#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 1497#if IS_ENABLED(CONFIG_IPV6)
1498 case PF_INET6: { 1498 case PF_INET6: {
1499 struct ipv6hdr *hdr6; 1499 struct ipv6hdr *hdr6;
1500 struct netlbl_af6list *addr6; 1500 struct netlbl_af6list *addr6;