read interface route metric from config
authorFelix Fietkau <nbd@openwrt.org>
Sat, 19 May 2012 22:39:23 +0000 (00:39 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 19 May 2012 22:39:23 +0000 (00:39 +0200)
interface.c

index edf9b27568bec17758f0ea28aa4ce36161e23216..ef7c01c991eaff488f1b6ce71246c7867f6c5dad 100644 (file)
@@ -410,6 +410,9 @@ interface_init(struct interface *iface, const char *name,
        if ((cur = tb[IFACE_ATTR_DNS_SEARCH]))
                interface_add_dns_search_list(&iface->config_ip, cur);
 
+       if ((cur = tb[IFACE_ATTR_METRIC]))
+               iface->metric = blobmsg_get_u32(cur);
+
        iface->config_autostart = iface->autostart;
 }