diff options
| author | Roy Marples <roy@marples.name> | 2019-03-04 11:42:06 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-03-04 11:42:06 +0000 |
| commit | ca92488068abccf032de77f7c88f72fb46e3d3a7 (patch) | |
| tree | 7c48fda1be9c89c2f59aa82d360b09610d2ec655 /src/ipv6nd.c | |
| parent | c5bd1e2e0d93d0e6917b0f7d9d89af8b469301d7 (diff) | |
| download | dhcpcd-ca92488068abccf032de77f7c88f72fb46e3d3a7.tar.xz | |
ipv6nd: Don't sort interfaces when picking best address
Diffstat (limited to 'src/ipv6nd.c')
| -rw-r--r-- | src/ipv6nd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c index bef77b2a..e148f862 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -403,7 +403,6 @@ ipv6nd_advertise(struct ipv6_addr *ia) return; ctx = ia->iface->ctx; - if_sortinterfaces(ctx); /* Find the most preferred address to advertise. */ iaf = NULL; TAILQ_FOREACH(ifp, ctx->ifaces, next) { @@ -424,7 +423,8 @@ ipv6nd_advertise(struct ipv6_addr *ia) iap->addr_flags & IN6_IFF_NOTUSEABLE) continue; - if (iaf == NULL) + if (iaf == NULL || + iaf->iface->metric > iap->iface->metric) iaf = iap; } } |
