]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
The loopback route should also use the metric.
authorRoy Marples <roy@marples.name>
Wed, 19 Jun 2013 16:32:22 +0000 (16:32 +0000)
committerRoy Marples <roy@marples.name>
Wed, 19 Jun 2013 16:32:22 +0000 (16:32 +0000)
if-linux.c

index 6ec6d00462ff1c18b33517d3077b347ae26ce6c8..fc3da1999052e0b64cfd917c4663e7e5a34b6b85 100644 (file)
@@ -632,10 +632,9 @@ if_route(const struct rt *rt, int action)
                add_attr_l(&nlm->hdr, sizeof(*nlm), RTA_GATEWAY,
                    &rt->gate.s_addr, sizeof(rt->gate.s_addr));
 
-       if (rt->gate.s_addr != htonl(INADDR_LOOPBACK)) {
+       if (rt->gate.s_addr != htonl(INADDR_LOOPBACK))
                add_attr_32(&nlm->hdr, sizeof(*nlm), RTA_OIF, rt->iface->index);
-               add_attr_32(&nlm->hdr, sizeof(*nlm), RTA_PRIORITY, rt->metric);
-       }
+       add_attr_32(&nlm->hdr, sizeof(*nlm), RTA_PRIORITY, rt->metric);
 
        if (send_netlink(&nlm->hdr) == -1)
                retval = -1;