net: use IS_ENABLED(CONFIG_IPV6)
[pandora-kernel.git] / net / netlabel / netlabel_mgmt.c
index bfa5558..4809e2e 100644 (file)
@@ -184,7 +184,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
 
                entry->type = NETLBL_NLTYPE_ADDRSELECT;
                entry->type_def.addrsel = addrmap;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+#if IS_ENABLED(CONFIG_IPV6)
        } else if (info->attrs[NLBL_MGMT_A_IPV6ADDR]) {
                struct in6_addr *addr;
                struct in6_addr *mask;
@@ -216,12 +216,12 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
                        ret_val = -ENOMEM;
                        goto add_failure;
                }
-               ipv6_addr_copy(&map->list.addr, addr);
+               map->list.addr = *addr;
                map->list.addr.s6_addr32[0] &= mask->s6_addr32[0];
                map->list.addr.s6_addr32[1] &= mask->s6_addr32[1];
                map->list.addr.s6_addr32[2] &= mask->s6_addr32[2];
                map->list.addr.s6_addr32[3] &= mask->s6_addr32[3];
-               ipv6_addr_copy(&map->list.mask, mask);
+               map->list.mask = *mask;
                map->list.valid = 1;
                map->type = entry->type;
 
@@ -270,7 +270,7 @@ static int netlbl_mgmt_listentry(struct sk_buff *skb,
        struct nlattr *nla_a;
        struct nlattr *nla_b;
        struct netlbl_af4list *iter4;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+#if IS_ENABLED(CONFIG_IPV6)
        struct netlbl_af6list *iter6;
 #endif
 
@@ -324,7 +324,7 @@ static int netlbl_mgmt_listentry(struct sk_buff *skb,
 
                        nla_nest_end(skb, nla_b);
                }
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+#if IS_ENABLED(CONFIG_IPV6)
                netlbl_af6list_foreach_rcu(iter6,
                                           &entry->type_def.addrsel->list6) {
                        struct netlbl_domaddr6_map *map6;