bridge: add auth-required bridge members with auth_status=0 if vlan is enabled
[project/netifd.git] / proto.c
diff --git a/proto.c b/proto.c
index d80cae0d9c33b25fd375e31ba1ca31d2b5d85684..63f461db255c61c08edcc57bb78fa3e25b35e317 100644 (file)
--- a/proto.c
+++ b/proto.c
@@ -160,7 +160,7 @@ parse_static_address_option(struct interface *iface, struct blob_attr *attr,
        struct device_addr *addr;
        const char *str;
        int n_addr = 0;
-       int rem;
+       size_t rem;
 
        blobmsg_for_each_attr(cur, attr, rem) {
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
@@ -172,8 +172,9 @@ parse_static_address_option(struct interface *iface, struct blob_attr *attr,
                        interface_add_error(iface, "proto", "INVALID_ADDRESS", &str, 1);
                        return -1;
                }
+               addr->index = n_addr;
                n_addr++;
-               vlist_add(&iface->proto_ip.addr, &addr->node, &addr->flags);
+               vlist_add(&iface->proto_ip.addr, &addr->node, addr);
        }
 
        return n_addr;
@@ -265,15 +266,16 @@ parse_address_list(struct interface *iface, struct blob_attr *attr, bool v6,
        struct device_addr *addr;
        struct blob_attr *cur;
        int n_addr = 0;
-       int rem;
+       size_t rem;
 
        blobmsg_for_each_attr(cur, attr, rem) {
                addr = parse_address_item(cur, v6, ext);
                if (!addr)
                        return -1;
 
+               addr->index = n_addr;
                n_addr++;
-               vlist_add(&iface->proto_ip.addr, &addr->node, &addr->flags);
+               vlist_add(&iface->proto_ip.addr, &addr->node, addr);
        }
 
        return n_addr;
@@ -390,7 +392,7 @@ parse_prefix_list(struct interface *iface, struct blob_attr *attr)
 {
        struct blob_attr *cur;
        int n_addr = 0;
-       int rem;
+       size_t rem;
 
        blobmsg_for_each_attr(cur, attr, rem) {
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
@@ -414,7 +416,7 @@ proto_apply_static_ip_settings(struct interface *iface, struct blob_attr *attr)
        unsigned int netmask = 32;
        bool ip6deprecated;
        int n_v4 = 0, n_v6 = 0;
-       struct in_addr bcast = {}, ptp = {};
+       struct in_addr bcast = {0,}, ptp = {0,};
 
        blobmsg_parse(proto_ip_attributes, __OPT_MAX, tb, blob_data(attr), blob_len(attr));