diff options
author | marcel <marcel@FreeBSD.org> | 2012-05-19 02:39:43 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2012-05-19 02:39:43 +0000 |
commit | 434c53cbc31ab5ad90ba5119cb80f658a52345a1 (patch) | |
tree | 07ca34fb7f517054627aaba05428f1a326f84c4c /lib/libc/net/if_nameindex.c | |
parent | 5374cd448cdcfb007709e244eeb204d8d1644807 (diff) | |
download | FreeBSD-src-434c53cbc31ab5ad90ba5119cb80f658a52345a1.zip FreeBSD-src-434c53cbc31ab5ad90ba5119cb80f658a52345a1.tar.gz |
Use the LLINDEX macro to access the link-level I/F index. This makes
it possible to work with a different type for the sdl_index field --
it only requires a recompile.
Obtained from: Juniper Networks, Inc.
Diffstat (limited to 'lib/libc/net/if_nameindex.c')
-rw-r--r-- | lib/libc/net/if_nameindex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/net/if_nameindex.c b/lib/libc/net/if_nameindex.c index 7a12d34..138289c 100644 --- a/lib/libc/net/if_nameindex.c +++ b/lib/libc/net/if_nameindex.c @@ -123,7 +123,7 @@ if_nameindex(void) if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_LINK) { ifni2->if_index = - ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index; + LLINDEX((struct sockaddr_dl*)ifa->ifa_addr); ifni2->if_name = cp; strcpy(cp, ifa->ifa_name); ifni2++; |