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 | |
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')
-rw-r--r-- | net/netlabel/netlabel_addrlist.c | 8 | ||||
-rw-r--r-- | net/netlabel/netlabel_addrlist.h | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_domainhash.c | 20 | ||||
-rw-r--r-- | net/netlabel/netlabel_domainhash.h | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_kapi.c | 18 | ||||
-rw-r--r-- | net/netlabel/netlabel_mgmt.c | 6 | ||||
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 26 |
7 files changed, 41 insertions, 41 deletions
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c index 96b749dacc34..6f1701322fb6 100644 --- a/net/netlabel/netlabel_addrlist.c +++ b/net/netlabel/netlabel_addrlist.c | |||
@@ -96,7 +96,7 @@ struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, | |||
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 99 | #if IS_ENABLED(CONFIG_IPV6) |
100 | /** | 100 | /** |
101 | * netlbl_af6list_search - Search for a matching IPv6 address entry | 101 | * netlbl_af6list_search - Search for a matching IPv6 address entry |
102 | * @addr: IPv6 address | 102 | * @addr: IPv6 address |
@@ -185,7 +185,7 @@ int netlbl_af4list_add(struct netlbl_af4list *entry, struct list_head *head) | |||
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 188 | #if IS_ENABLED(CONFIG_IPV6) |
189 | /** | 189 | /** |
190 | * netlbl_af6list_add - Add a new IPv6 address entry to a list | 190 | * netlbl_af6list_add - Add a new IPv6 address entry to a list |
191 | * @entry: address entry | 191 | * @entry: address entry |
@@ -263,7 +263,7 @@ struct netlbl_af4list *netlbl_af4list_remove(__be32 addr, __be32 mask, | |||
263 | return entry; | 263 | return entry; |
264 | } | 264 | } |
265 | 265 | ||
266 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 266 | #if IS_ENABLED(CONFIG_IPV6) |
267 | /** | 267 | /** |
268 | * netlbl_af6list_remove_entry - Remove an IPv6 address entry | 268 | * netlbl_af6list_remove_entry - Remove an IPv6 address entry |
269 | * @entry: address entry | 269 | * @entry: address entry |
@@ -342,7 +342,7 @@ void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, | |||
342 | } | 342 | } |
343 | } | 343 | } |
344 | 344 | ||
345 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 345 | #if IS_ENABLED(CONFIG_IPV6) |
346 | /** | 346 | /** |
347 | * netlbl_af6list_audit_addr - Audit an IPv6 address | 347 | * netlbl_af6list_audit_addr - Audit an IPv6 address |
348 | * @audit_buf: audit buffer | 348 | * @audit_buf: audit buffer |
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h index fdbc1d2c7352..a1287ce18130 100644 --- a/net/netlabel/netlabel_addrlist.h +++ b/net/netlabel/netlabel_addrlist.h | |||
@@ -133,7 +133,7 @@ static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, | |||
133 | } | 133 | } |
134 | #endif | 134 | #endif |
135 | 135 | ||
136 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 136 | #if IS_ENABLED(CONFIG_IPV6) |
137 | 137 | ||
138 | #define __af6list_entry(ptr) container_of(ptr, struct netlbl_af6list, list) | 138 | #define __af6list_entry(ptr) container_of(ptr, struct netlbl_af6list, list) |
139 | 139 | ||
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index 3f905e5370c2..38204112b9f4 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
@@ -78,7 +78,7 @@ static void netlbl_domhsh_free_entry(struct rcu_head *entry) | |||
78 | struct netlbl_dom_map *ptr; | 78 | struct netlbl_dom_map *ptr; |
79 | struct netlbl_af4list *iter4; | 79 | struct netlbl_af4list *iter4; |
80 | struct netlbl_af4list *tmp4; | 80 | struct netlbl_af4list *tmp4; |
81 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 81 | #if IS_ENABLED(CONFIG_IPV6) |
82 | struct netlbl_af6list *iter6; | 82 | struct netlbl_af6list *iter6; |
83 | struct netlbl_af6list *tmp6; | 83 | struct netlbl_af6list *tmp6; |
84 | #endif /* IPv6 */ | 84 | #endif /* IPv6 */ |
@@ -90,7 +90,7 @@ static void netlbl_domhsh_free_entry(struct rcu_head *entry) | |||
90 | netlbl_af4list_remove_entry(iter4); | 90 | netlbl_af4list_remove_entry(iter4); |
91 | kfree(netlbl_domhsh_addr4_entry(iter4)); | 91 | kfree(netlbl_domhsh_addr4_entry(iter4)); |
92 | } | 92 | } |
93 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 93 | #if IS_ENABLED(CONFIG_IPV6) |
94 | netlbl_af6list_foreach_safe(iter6, tmp6, | 94 | netlbl_af6list_foreach_safe(iter6, tmp6, |
95 | &ptr->type_def.addrsel->list6) { | 95 | &ptr->type_def.addrsel->list6) { |
96 | netlbl_af6list_remove_entry(iter6); | 96 | netlbl_af6list_remove_entry(iter6); |
@@ -217,7 +217,7 @@ static void netlbl_domhsh_audit_add(struct netlbl_dom_map *entry, | |||
217 | cipsov4 = map4->type_def.cipsov4; | 217 | cipsov4 = map4->type_def.cipsov4; |
218 | netlbl_af4list_audit_addr(audit_buf, 0, NULL, | 218 | netlbl_af4list_audit_addr(audit_buf, 0, NULL, |
219 | addr4->addr, addr4->mask); | 219 | addr4->addr, addr4->mask); |
220 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 220 | #if IS_ENABLED(CONFIG_IPV6) |
221 | } else if (addr6 != NULL) { | 221 | } else if (addr6 != NULL) { |
222 | struct netlbl_domaddr6_map *map6; | 222 | struct netlbl_domaddr6_map *map6; |
223 | map6 = netlbl_domhsh_addr6_entry(addr6); | 223 | map6 = netlbl_domhsh_addr6_entry(addr6); |
@@ -306,7 +306,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
306 | struct netlbl_dom_map *entry_old; | 306 | struct netlbl_dom_map *entry_old; |
307 | struct netlbl_af4list *iter4; | 307 | struct netlbl_af4list *iter4; |
308 | struct netlbl_af4list *tmp4; | 308 | struct netlbl_af4list *tmp4; |
309 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 309 | #if IS_ENABLED(CONFIG_IPV6) |
310 | struct netlbl_af6list *iter6; | 310 | struct netlbl_af6list *iter6; |
311 | struct netlbl_af6list *tmp6; | 311 | struct netlbl_af6list *tmp6; |
312 | #endif /* IPv6 */ | 312 | #endif /* IPv6 */ |
@@ -338,7 +338,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
338 | &entry->type_def.addrsel->list4) | 338 | &entry->type_def.addrsel->list4) |
339 | netlbl_domhsh_audit_add(entry, iter4, NULL, | 339 | netlbl_domhsh_audit_add(entry, iter4, NULL, |
340 | ret_val, audit_info); | 340 | ret_val, audit_info); |
341 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 341 | #if IS_ENABLED(CONFIG_IPV6) |
342 | netlbl_af6list_foreach_rcu(iter6, | 342 | netlbl_af6list_foreach_rcu(iter6, |
343 | &entry->type_def.addrsel->list6) | 343 | &entry->type_def.addrsel->list6) |
344 | netlbl_domhsh_audit_add(entry, NULL, iter6, | 344 | netlbl_domhsh_audit_add(entry, NULL, iter6, |
@@ -365,7 +365,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
365 | ret_val = -EEXIST; | 365 | ret_val = -EEXIST; |
366 | goto add_return; | 366 | goto add_return; |
367 | } | 367 | } |
368 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 368 | #if IS_ENABLED(CONFIG_IPV6) |
369 | netlbl_af6list_foreach_rcu(iter6, | 369 | netlbl_af6list_foreach_rcu(iter6, |
370 | &entry->type_def.addrsel->list6) | 370 | &entry->type_def.addrsel->list6) |
371 | if (netlbl_af6list_search_exact(&iter6->addr, | 371 | if (netlbl_af6list_search_exact(&iter6->addr, |
@@ -386,7 +386,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
386 | if (ret_val != 0) | 386 | if (ret_val != 0) |
387 | goto add_return; | 387 | goto add_return; |
388 | } | 388 | } |
389 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 389 | #if IS_ENABLED(CONFIG_IPV6) |
390 | netlbl_af6list_foreach_safe(iter6, tmp6, | 390 | netlbl_af6list_foreach_safe(iter6, tmp6, |
391 | &entry->type_def.addrsel->list6) { | 391 | &entry->type_def.addrsel->list6) { |
392 | netlbl_af6list_remove_entry(iter6); | 392 | netlbl_af6list_remove_entry(iter6); |
@@ -510,7 +510,7 @@ int netlbl_domhsh_remove_af4(const char *domain, | |||
510 | struct netlbl_dom_map *entry_map; | 510 | struct netlbl_dom_map *entry_map; |
511 | struct netlbl_af4list *entry_addr; | 511 | struct netlbl_af4list *entry_addr; |
512 | struct netlbl_af4list *iter4; | 512 | struct netlbl_af4list *iter4; |
513 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 513 | #if IS_ENABLED(CONFIG_IPV6) |
514 | struct netlbl_af6list *iter6; | 514 | struct netlbl_af6list *iter6; |
515 | #endif /* IPv6 */ | 515 | #endif /* IPv6 */ |
516 | struct netlbl_domaddr4_map *entry; | 516 | struct netlbl_domaddr4_map *entry; |
@@ -533,7 +533,7 @@ int netlbl_domhsh_remove_af4(const char *domain, | |||
533 | goto remove_af4_failure; | 533 | goto remove_af4_failure; |
534 | netlbl_af4list_foreach_rcu(iter4, &entry_map->type_def.addrsel->list4) | 534 | netlbl_af4list_foreach_rcu(iter4, &entry_map->type_def.addrsel->list4) |
535 | goto remove_af4_single_addr; | 535 | goto remove_af4_single_addr; |
536 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 536 | #if IS_ENABLED(CONFIG_IPV6) |
537 | netlbl_af6list_foreach_rcu(iter6, &entry_map->type_def.addrsel->list6) | 537 | netlbl_af6list_foreach_rcu(iter6, &entry_map->type_def.addrsel->list6) |
538 | goto remove_af4_single_addr; | 538 | goto remove_af4_single_addr; |
539 | #endif /* IPv6 */ | 539 | #endif /* IPv6 */ |
@@ -644,7 +644,7 @@ struct netlbl_domaddr4_map *netlbl_domhsh_getentry_af4(const char *domain, | |||
644 | return netlbl_domhsh_addr4_entry(addr_iter); | 644 | return netlbl_domhsh_addr4_entry(addr_iter); |
645 | } | 645 | } |
646 | 646 | ||
647 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 647 | #if IS_ENABLED(CONFIG_IPV6) |
648 | /** | 648 | /** |
649 | * netlbl_domhsh_getentry_af6 - Get an entry from the domain hash table | 649 | * netlbl_domhsh_getentry_af6 - Get an entry from the domain hash table |
650 | * @domain: the domain name to search for | 650 | * @domain: the domain name to search for |
diff --git a/net/netlabel/netlabel_domainhash.h b/net/netlabel/netlabel_domainhash.h index bfcc0f7024c5..90872c4ca30f 100644 --- a/net/netlabel/netlabel_domainhash.h +++ b/net/netlabel/netlabel_domainhash.h | |||
@@ -104,7 +104,7 @@ int netlbl_domhsh_walk(u32 *skip_bkt, | |||
104 | int (*callback) (struct netlbl_dom_map *entry, void *arg), | 104 | int (*callback) (struct netlbl_dom_map *entry, void *arg), |
105 | void *cb_arg); | 105 | void *cb_arg); |
106 | 106 | ||
107 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 107 | #if IS_ENABLED(CONFIG_IPV6) |
108 | struct netlbl_domaddr6_map *netlbl_domhsh_getentry_af6(const char *domain, | 108 | struct netlbl_domaddr6_map *netlbl_domhsh_getentry_af6(const char *domain, |
109 | const struct in6_addr *addr); | 109 | const struct in6_addr *addr); |
110 | #endif /* IPv6 */ | 110 | #endif /* IPv6 */ |
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 */ |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 9879300beefd..4809e2e48b02 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -184,7 +184,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info, | |||
184 | 184 | ||
185 | entry->type = NETLBL_NLTYPE_ADDRSELECT; | 185 | entry->type = NETLBL_NLTYPE_ADDRSELECT; |
186 | entry->type_def.addrsel = addrmap; | 186 | entry->type_def.addrsel = addrmap; |
187 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 187 | #if IS_ENABLED(CONFIG_IPV6) |
188 | } else if (info->attrs[NLBL_MGMT_A_IPV6ADDR]) { | 188 | } else if (info->attrs[NLBL_MGMT_A_IPV6ADDR]) { |
189 | struct in6_addr *addr; | 189 | struct in6_addr *addr; |
190 | struct in6_addr *mask; | 190 | struct in6_addr *mask; |
@@ -270,7 +270,7 @@ static int netlbl_mgmt_listentry(struct sk_buff *skb, | |||
270 | struct nlattr *nla_a; | 270 | struct nlattr *nla_a; |
271 | struct nlattr *nla_b; | 271 | struct nlattr *nla_b; |
272 | struct netlbl_af4list *iter4; | 272 | struct netlbl_af4list *iter4; |
273 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 273 | #if IS_ENABLED(CONFIG_IPV6) |
274 | struct netlbl_af6list *iter6; | 274 | struct netlbl_af6list *iter6; |
275 | #endif | 275 | #endif |
276 | 276 | ||
@@ -324,7 +324,7 @@ static int netlbl_mgmt_listentry(struct sk_buff *skb, | |||
324 | 324 | ||
325 | nla_nest_end(skb, nla_b); | 325 | nla_nest_end(skb, nla_b); |
326 | } | 326 | } |
327 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 327 | #if IS_ENABLED(CONFIG_IPV6) |
328 | netlbl_af6list_foreach_rcu(iter6, | 328 | netlbl_af6list_foreach_rcu(iter6, |
329 | &entry->type_def.addrsel->list6) { | 329 | &entry->type_def.addrsel->list6) { |
330 | struct netlbl_domaddr6_map *map6; | 330 | struct netlbl_domaddr6_map *map6; |
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, | |||
606 | static void netlbl_unlhsh_condremove_iface(struct netlbl_unlhsh_iface *iface) | 606 | static 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; |