summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2016-09-01 15:40:38 +0000
committerbluhm <bluhm@openbsd.org>2016-09-01 15:40:38 +0000
commitf6d2d8a7ef74bdce15b34724127decd69d718302 (patch)
tree02bf3fb1aee2ede4b4c5079e8968ea0f300a95ad
parentforgot during previous commit, thanks stefan@ (diff)
downloadwireguard-openbsd-f6d2d8a7ef74bdce15b34724127decd69d718302.tar.xz
wireguard-openbsd-f6d2d8a7ef74bdce15b34724127decd69d718302.zip
Disable the RTF_UP kassert check in rtisvalid() for now as it can
be triggered from userland. A gateway route is simply not valid if its gwroute is not up. OK phessler@
-rw-r--r--sys/net/route.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index a02bb9dcf51..f8fd23c2039 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.320 2016/09/01 11:26:44 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.321 2016/09/01 15:40:38 bluhm Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -214,13 +214,12 @@ rtisvalid(struct rtentry *rt)
if (rt->rt_ifa == NULL || rt->rt_ifa->ifa_ifp == NULL)
return (0);
-#ifdef DIAGNOSTIC
if (ISSET(rt->rt_flags, RTF_GATEWAY)) {
KASSERT(rt->rt_gwroute != NULL);
- KASSERT(ISSET(rt->rt_gwroute->rt_flags, RTF_UP));
KASSERT(!ISSET(rt->rt_gwroute->rt_flags, RTF_GATEWAY));
+ if (!ISSET(rt->rt_gwroute->rt_flags, RTF_UP))
+ return (0);
}
-#endif /* DIAGNOSTIC */
return (1);
}