summaryrefslogtreecommitdiffhomepage
path: root/proto.c
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2020-10-20 10:49:18 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2020-10-22 10:22:23 +0800
commit24ce1eab4910869576406bafd0489daf0d3e6e28 (patch)
tree83a94e89a0cee2fc44b798edeebf40e904348321 /proto.c
parent3d7bf6043bc92212da7b98af265d1587ff4abe05 (diff)
interface: proto_ip: order by address index first
At the moment, dnsmasq initscript generates dhcp-range for an interface by inspecting first address of that interface from netifd ubus output. Order by address index as specified in the uci config makes netifd ubus output consistent with linux network interfaces' primary/secondary address settings. More importantly, the ubus output and dnsmasq config generation will be more predictable. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'proto.c')
-rw-r--r--proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto.c b/proto.c
index f7d27aa..01473f2 100644
--- a/proto.c
+++ b/proto.c
@@ -174,7 +174,7 @@ parse_static_address_option(struct interface *iface, struct blob_attr *attr,
}
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;
@@ -275,7 +275,7 @@ parse_address_list(struct interface *iface, struct blob_attr *attr, bool v6,
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;