From e4d284802c8ed9482f05c1d555f4e627068b41a4 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 26 Feb 2016 07:54:40 +0000 Subject: L2 entries are always in the first table of a routing domain, this fixes a regression introduced during 5.7 and 5.8 as reported by Jean-Daniel Dupas on misc@ diff provided by mpi, ok claudio --- sys/net/route.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net') diff --git a/sys/net/route.c b/sys/net/route.c index 08859f1a4b3..a538ff15f79 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.294 2016/02/24 22:41:53 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.295 2016/02/26 07:54:39 deraadt Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -389,7 +389,8 @@ _rtalloc(struct sockaddr *dst, uint32_t *src, int flags, unsigned int rtableid) * this behavior. But it is safe since rt_checkgate() wont * allow us to us this route later on. */ - nhrt = rt_match(rt->rt_gateway, NULL, flags | RT_RESOLVE, rtableid); + nhrt = rt_match(rt->rt_gateway, NULL, flags | RT_RESOLVE, + rtable_l2(rtableid)); if (nhrt == NULL) return (rt); -- cgit v1.2.3