entry is attached to this entry.
ok phessler@, bluhm@
-/* $OpenBSD: if.c,v 1.391 2015/10/22 15:37:47 bluhm Exp $ */
+/* $OpenBSD: if.c,v 1.392 2015/10/22 16:44:54 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
if (ifa == NULL)
break;
+ KASSERT(ifa == rt->rt_ifa);
+
/*
* XXX Since lo0 is in the default rdomain we should not
* (ab)use it for any route related to an interface of a
break;
rt->rt_flags &= ~RTF_LLINFO;
-
- /*
- * make sure to set rt->rt_ifa to the interface
- * address we are using, otherwise we will have trouble
- * with source address selection.
- */
- if (ifa != rt->rt_ifa) {
- ifafree(rt->rt_ifa);
- ifa->ifa_refcnt++;
- rt->rt_ifa = ifa;
- }
break;
case RTM_DELETE:
case RTM_RESOLVE:
-/* $OpenBSD: if_ether.c,v 1.174 2015/10/22 15:37:47 bluhm Exp $ */
+/* $OpenBSD: if_ether.c,v 1.175 2015/10/22 16:44:54 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
break;
}
if (ifa) {
+ KASSERT(ifa == rt->rt_ifa);
rt->rt_expire = 0;
- /*
- * make sure to set rt->rt_ifa to the interface
- * address we are using, otherwise we will have trouble
- * with source address selection.
- */
- if (ifa != rt->rt_ifa) {
- ifafree(rt->rt_ifa);
- ifa->ifa_refcnt++;
- rt->rt_ifa = ifa;
- }
}
break;
-/* $OpenBSD: nd6.c,v 1.157 2015/10/22 15:37:47 bluhm Exp $ */
+/* $OpenBSD: nd6.c,v 1.158 2015/10/22 16:44:54 mpi Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
nd6_llinfo_settimer(ln, -1);
ln->ln_state = ND6_LLINFO_REACHABLE;
ln->ln_byhint = 0;
-
- /*
- * Make sure rt_ifa be equal to the ifaddr
- * corresponding to the address.
- * We need this because when we refer
- * rt_ifa->ia6_flags in ip6_input, we assume
- * that the rt_ifa points to the address instead
- * of the loopback address.
- */
- if (ifa != rt->rt_ifa) {
- ifafree(rt->rt_ifa);
- ifa->ifa_refcnt++;
- rt->rt_ifa = ifa;
- }
+ KASSERT(ifa == rt->rt_ifa);
} else if (rt->rt_flags & RTF_ANNOUNCE) {
nd6_llinfo_settimer(ln, -1);
ln->ln_state = ND6_LLINFO_REACHABLE;