interface: proto_ip: order by address index first
authorYousong Zhou <yszhou4tech@gmail.com>
Tue, 20 Oct 2020 02:49:18 +0000 (10:49 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Thu, 22 Oct 2020 02:22:23 +0000 (10:22 +0800)
commit24ce1eab4910869576406bafd0489daf0d3e6e28
tree83a94e89a0cee2fc44b798edeebf40e904348321
parent3d7bf6043bc92212da7b98af265d1587ff4abe05
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>
interface-ip.c
proto.c