diff options
| author | Roy Marples <roy@marples.name> | 2015-02-27 14:21:01 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-02-27 14:21:01 +0000 |
| commit | 4d71774dba0459c71db5deae8731bccd1b683a73 (patch) | |
| tree | 147b47939ce776082766ee44538023aed038a95a /if-bsd.c | |
| parent | a19fe492027a50f1bb15f1754a74fcad242c8876 (diff) | |
| download | dhcpcd-4d71774dba0459c71db5deae8731bccd1b683a73.tar.xz | |
Stop using link_addr(3).
Instead just set the sdl_index to specify which interface the route is for.
Diffstat (limited to 'if-bsd.c')
| -rw-r--r-- | if-bsd.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -153,13 +153,11 @@ static void if_linkaddr(struct sockaddr_dl *sdl, const struct interface *ifp) { -#ifdef __FreeBSD__ - memcpy(sdl, &ifp->linkaddr, sizeof(*sdl)); - sdl->sdl_nlen = sdl->sdl_alen = sdl->sdl_slen = 0; -#else + memset(sdl, 0, sizeof(*sdl)); + sdl->sdl_family = AF_LINK; sdl->sdl_len = sizeof(*sdl); - link_addr(ifp->name, sdl); -#endif + sdl->sdl_nlen = sdl->sdl_alen = sdl->sdl_slen = 0; + sdl->sdl_index = (unsigned short)ifp->index; } #endif |
