From: Roy Marples Date: Wed, 19 Jun 2013 16:32:22 +0000 (+0000) Subject: The loopback route should also use the metric. X-Git-Tag: v6.0.0~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f171c0f1dbd8b8a4f58da170aaed178be00997b4;p=thirdparty%2Fdhcpcd.git The loopback route should also use the metric. --- diff --git a/if-linux.c b/if-linux.c index 6ec6d004..fc3da199 100644 --- a/if-linux.c +++ b/if-linux.c @@ -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;