Mercurial > hg > dhcpcd
changeset 2961:1ce021acb514 draft
Stop using link_addr(3).
Instead just set the sdl_index to specify which interface the route is for.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 27 Feb 2015 14:21:01 +0000 |
| parents | 26d4bee443de |
| children | bfa69b762904 |
| files | dhcpcd.h if-bsd.c if.c |
| diffstat | 3 files changed, 4 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/dhcpcd.h Thu Feb 26 13:22:41 2015 +0000 +++ b/dhcpcd.h Fri Feb 27 14:21:01 2015 +0000 @@ -66,9 +66,6 @@ unsigned int index; unsigned int flags; sa_family_t family; -#ifdef __FreeBSD__ - struct sockaddr_storage linkaddr; -#endif unsigned char hwaddr[HWADDR_LEN]; uint8_t hwlen; unsigned int metric;
--- a/if-bsd.c Thu Feb 26 13:22:41 2015 +0000 +++ b/if-bsd.c Fri Feb 27 14:21:01 2015 +0000 @@ -153,13 +153,11 @@ if_linkaddr(struct sockaddr_dl *sdl, const struct interface *ifp) { -#ifdef __FreeBSD__ - memcpy(sdl, &ifp->linkaddr, sizeof(*sdl)); + memset(sdl, 0, sizeof(*sdl)); + sdl->sdl_family = AF_LINK; + sdl->sdl_len = sizeof(*sdl); sdl->sdl_nlen = sdl->sdl_alen = sdl->sdl_slen = 0; -#else - sdl->sdl_len = sizeof(*sdl); - link_addr(ifp->name, sdl); -#endif + sdl->sdl_index = (unsigned short)ifp->index; } #endif
