Fix ifaddr_byindex().
authorRui Paulo <rpaulo@FreeBSD.org>
Fri, 19 Feb 2010 12:02:44 +0000 (12:02 +0000)
committerRui Paulo <rpaulo@FreeBSD.org>
Fri, 19 Feb 2010 12:02:44 +0000 (12:02 +0000)
sys/net/if.c

index 0db6374..0900142 100644 (file)
@@ -2473,5 +2473,5 @@ ifaddr_byindex(unsigned short idx)
        ifp = ifnet_byindex(idx);
        if (!ifp)
                return NULL;
-       return ifp->if_addr;
+       return TAILQ_FIRST(&ifp->if_addrheads[mycpuid])->ifa;
 }