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@
-/* $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 $ */
/*
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) {