adding local route entries.
This hack made sense when we didn't have the RTF_LOCAL flag, but since
some months it is set on every local route.
-/* $OpenBSD: if.c,v 1.297 2014/07/12 18:44:22 tedu Exp $ */
+/* $OpenBSD: if.c,v 1.298 2014/08/11 13:51:07 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
switch (req) {
case RTM_ADD:
- /*
- * XXX Here we abuse RTF_LLINFO to add a route to
- * loopback. We do that to always have a route
- * pointing to our address.
- */
- if ((rt->rt_flags & RTF_LLINFO) == 0)
+ if ((rt->rt_flags & RTF_LOCAL) == 0)
break;
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
-/* $OpenBSD: if_ether.c,v 1.132 2014/08/11 11:50:41 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.133 2014/08/11 13:51:07 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
satosin(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
rt->rt_flags |= RTF_CLONING;
if (rt->rt_flags & RTF_CLONING ||
- ((rt->rt_flags & RTF_LLINFO) && !la)) {
+ ((rt->rt_flags & (RTF_LLINFO | RTF_LOCAL)) && !la)) {
/*
* Case 1: This route should come from a route to iface.
*/
-/* $OpenBSD: nd6.c,v 1.120 2014/07/12 18:44:23 tedu Exp $ */
+/* $OpenBSD: nd6.c,v 1.121 2014/08/11 13:51:07 mpi Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
* rt->rt_flags |= RTF_CLONING;
*/
if ((rt->rt_flags & RTF_CLONING) ||
- ((rt->rt_flags & RTF_LLINFO) && !ln)) {
+ ((rt->rt_flags & (RTF_LLINFO | RTF_LOCAL)) && !ln)) {
/*
* Case 1: This route should come from a route to
* interface (RTF_CLONING case) or the route should be