main: fix hotplug script usage message
[project/netifd.git] / proto.c
diff --git a/proto.c b/proto.c
index d80cae0d9c33b25fd375e31ba1ca31d2b5d85684..01473f2494fc0d586011a6a27fdbf58baa20a04f 100644 (file)
--- a/proto.c
+++ b/proto.c
@@ -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;
@@ -272,8 +273,9 @@ parse_address_list(struct interface *iface, struct blob_attr *attr, bool v6,
                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;