diff options
-rw-r--r-- | sys/net/route.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 34abcd70071..a63d4311a7e 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.272 2015/11/18 12:45:59 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.273 2015/11/18 13:05:58 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -419,14 +419,8 @@ _rtalloc(struct sockaddr *dst, uint32_t *src, int flags, unsigned int rtableid) return (rt); } - /* Next hop entry must be UP... */ - if (!ISSET(nhrt->rt_flags, RTF_UP)) { - rtfree(nhrt); - return (rt); - } - - /* ...and on the same interface unless we have multiple gateways. */ - if (nhrt->rt_ifidx != rt->rt_ifidx && !ISSET(rt->rt_flags, RTF_MPATH)) { + /* Next hop entry must be UP and on the same interface. */ + if (!ISSET(nhrt->rt_flags, RTF_UP) || nhrt->rt_ifidx != rt->rt_ifidx) { rtfree(nhrt); return (rt); } |