From: mpi Date: Fri, 16 Oct 2015 12:36:02 +0000 (+0000) Subject: If a DOWN route entry is passed to a L2 output function, be dumb and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e490913c7af54be632fbddd48d2021089c87a5d1;p=openbsd If a DOWN route entry is passed to a L2 output function, be dumb and simply use it. In most of the cases doing a route lookup at this point is a noop as it will return you the same DOWN entry you already have. The exception is the case where the route has been removed from tree since your kernel looked for it. So what? It's just a blue packet. Note that this "exception" can only happen if your sending path does not run under the KERNEL_LOCK. ok mikeb@ --- diff --git a/sys/net/route.c b/sys/net/route.c index f9955761686..1f11dd199b8 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.252 2015/10/14 10:18:03 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.253 2015/10/16 12:36:02 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1038,15 +1038,6 @@ rt_checkgate(struct ifnet *ifp, struct rtentry *rt, struct sockaddr *dst, KASSERT(rt != NULL); - if ((rt->rt_flags & RTF_UP) == 0) { - rt = rtalloc(dst, RT_REPORT|RT_RESOLVE, rtableid); - if (rt == NULL) - return (EHOSTUNREACH); - rt->rt_refcnt--; - if (rt->rt_ifp != ifp) - return (EHOSTUNREACH); - } - rt0 = rt; if (rt->rt_flags & RTF_GATEWAY) {