summaryrefslogtreecommitdiffstats
path: root/freebsd/lib/libc/net/if_indextoname.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/lib/libc/net/if_indextoname.c')
-rw-r--r--freebsd/lib/libc/net/if_indextoname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/freebsd/lib/libc/net/if_indextoname.c b/freebsd/lib/libc/net/if_indextoname.c
index b0f10f72..236ccbda 100644
--- a/freebsd/lib/libc/net/if_indextoname.c
+++ b/freebsd/lib/libc/net/if_indextoname.c
@@ -72,7 +72,7 @@ if_indextoname(unsigned int ifindex, char *ifname)
for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
if (ifa->ifa_addr &&
ifa->ifa_addr->sa_family == AF_LINK &&
- ifindex == ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index)
+ ifindex == LLINDEX((struct sockaddr_dl*)ifa->ifa_addr))
break;
}