Convert to rt_ifidx.
authormpi <mpi@openbsd.org>
Sat, 24 Oct 2015 16:24:21 +0000 (16:24 +0000)
committermpi <mpi@openbsd.org>
Sat, 24 Oct 2015 16:24:21 +0000 (16:24 +0000)
ok bluhm@

sys/netinet6/in6_ifattach.c

index ef4ed7a..b81cd95 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: in6_ifattach.c,v 1.97 2015/10/22 15:37:47 bluhm Exp $ */
+/*     $OpenBSD: in6_ifattach.c,v 1.98 2015/10/24 16:24:21 mpi Exp $   */
 /*     $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $  */
 
 /*
@@ -546,7 +546,7 @@ in6_ifdetach(struct ifnet *ifp)
        sin6.sin6_addr = in6addr_intfacelocal_allnodes;
        sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
        rt = rtalloc(sin6tosa(&sin6), 0, ifp->if_rdomain);
-       if (rt && rt->rt_ifp == ifp) {
+       if (rt && rt->rt_ifidx == ifp->if_index) {
                rtdeletemsg(rt, ifp->if_rdomain);
                rtfree(rt);
        }
@@ -558,7 +558,7 @@ in6_ifdetach(struct ifnet *ifp)
        sin6.sin6_addr = in6addr_linklocal_allnodes;
        sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
        rt = rtalloc(sin6tosa(&sin6), 0, ifp->if_rdomain);
-       if (rt && rt->rt_ifp == ifp) {
+       if (rt && rt->rt_ifidx == ifp->if_index) {
                rtdeletemsg(rt, ifp->if_rdomain);
                rtfree(rt);
        }