-/* $OpenBSD: route.c,v 1.169 2014/06/11 11:29:01 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.170 2014/06/11 11:30:03 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
if (ifa->ifa_rtrequest)
ifa->ifa_rtrequest(RTM_ADD, rt);
}
- rt_newaddrmsg(RTM_ADD, ifa, error, nrt);
+ if (flags & RTF_LOCAL)
+ rt_newaddrmsg(RTM_ADD, ifa, error, nrt);
}
return (error);
}
error = rtrequest1(RTM_DELETE, &info, prio, &nrt, rtableid);
if (error == 0 && (rt = nrt) != NULL) {
- rt_newaddrmsg(RTM_DELETE, ifa, error, nrt);
+ if (flags & RTF_LOCAL)
+ rt_newaddrmsg(RTM_DELETE, ifa, error, nrt);
if (rt->rt_refcnt <= 0) {
rt->rt_refcnt++;
rtfree(rt);
-/* $OpenBSD: if_ether.c,v 1.127 2014/05/07 08:14:59 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.128 2014/06/11 11:30:03 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
if ((rt->rt_flags & RTF_HOST) == 0 && rt_mask(rt) &&
satosin(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
rt->rt_flags |= RTF_CLONING;
- if (rt->rt_flags & RTF_CLONING) {
+ if (rt->rt_flags & RTF_CLONING ||
+ ((rt->rt_flags & RTF_LLINFO) && !la)) {
/*
* Case 1: This route should come from a route to iface.
*/
* from it do not need their expiration time set.
*/
rt->rt_expire = time_second;
- break;
+ if ((rt->rt_flags & RTF_CLONING) != 0)
+ break;
}
/* Announce a new entry if requested. */
if (rt->rt_flags & RTF_ANNOUNCE)
-/* $OpenBSD: in.c,v 1.96 2014/04/25 09:44:38 mpi Exp $ */
+/* $OpenBSD: in.c,v 1.97 2014/06/11 11:30:03 mpi Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
* carp(4).
*/
ifa_add(ifp, &ia->ia_ifa);
+ rt_ifa_addloop(&ia->ia_ifa);
if (error && newaddr)
in_purgeaddr(&ia->ia_ifa);
in_ifscrub(ifp, ia);
+ rt_ifa_delloop(&ia->ia_ifa);
+
ifa_del(ifp, &ia->ia_ifa);
TAILQ_REMOVE(&in_ifaddr, ia, ia_list);
if (ia->ia_allhosts != NULL) {