diff options
| author | Roy Marples <roy@marples.name> | 2008-09-09 17:07:48 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-09-09 17:07:48 +0000 |
| commit | 2b60ecb71e76e4a6ac765afac3ce7da87ef4464b (patch) | |
| tree | 968c8817e04c5120bd31ed433f3aed92a0471a1a /net.c | |
| parent | 21164dfb798aedb56d11bcdca897106748094d91 (diff) | |
| download | dhcpcd-2b60ecb71e76e4a6ac765afac3ce7da87ef4464b.tar.xz | |
Sort interfaces according to preference and pass this to dhcpcd-run-hooks so we can prefer configs.
Diffstat (limited to 'net.c')
| -rw-r--r-- | net.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -315,7 +315,7 @@ free_interface(struct interface *iface) int do_interface(const char *ifname, - _unused struct interface **ifaces, + _unused struct interface **ifs, _unused int argc, _unused char * const *argv, struct in_addr *addr, struct in_addr *net, int act) { @@ -385,7 +385,7 @@ do_interface(const char *ifname, #ifdef AF_LINK /* Interface discovery for BSD's */ if (act == 2 && ifr->ifr_addr.sa_family == AF_LINK) { - for (ifp = *ifaces; ifp; ifp = ifp->next) { + for (ifp = *ifs; ifp; ifp = ifp->next) { ifl = ifp; if (strcmp(ifp->name, ifr->ifr_name) == 0) break; @@ -405,7 +405,7 @@ do_interface(const char *ifname, if (ifl) ifp = ifl->next = ifn; else - ifp = *ifaces = ifn; + ifp = *ifs = ifn; sdl = xmalloc(ifr->ifr_addr.sa_len); memcpy(sdl, &ifr->ifr_addr, ifr->ifr_addr.sa_len); ifp->hwlen = sdl->sdl_alen; |
