From 7f6be657e2dabc185417520de4d0d0de2580c27d Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 13 Sep 2016 14:33:39 +0200 Subject: interface-ip: DNS name server sorting support in resolv.conf.auto Interface name servers when being written to resolv.conf.auto are sorted based on the following parameters: -Primary sorting key is interface dns_metric; name servers having lowest interface dns_metric are listed first -Secondary sorting key is interface metric; in case of equal interface dns_metric name servers having lowest interface metric are listed first -Finally alphabetical order of the interface names in case of equal interface dns_metric and metric In case the resolver queries the multiple servers in the order listed; sorting is usefull in the following scenarios : -Name resolving over a main and backup interface -Assign priority to IPv6 name servers over IPv4 or vice versa Signed-off-by: Hans Dedecker --- ubus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ubus.c') diff --git a/ubus.c b/ubus.c index 2b8bb90..4d43b57 100644 --- a/ubus.c +++ b/ubus.c @@ -687,6 +687,7 @@ netifd_dump_status(struct interface *iface) if (iface->ip6table) blobmsg_add_u32(&b, "ip6table", iface->ip6table); blobmsg_add_u32(&b, "metric", iface->metric); + blobmsg_add_u32(&b, "dns_metric", iface->dns_metric); blobmsg_add_u8(&b, "delegation", !iface->proto_ip.no_delegation); a = blobmsg_open_array(&b, "ipv4-address"); interface_ip_dump_address_list(&iface->config_ip, false, true); -- cgit v1.2.3