summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2017-05-27 09:51:19 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2017-05-27 09:51:19 +0000
commit59b677eed633fc98ac5efd9d5af1d4875bf8cc18 (patch)
treea25eb812fc960778a1b389ea8afbfc1816578ca6 /sys
parentd0932bdf89103318f7100aac21f63673c65709b4 (diff)
In ifa_ifwithroute() the rtalloc() needs to be done against the rdomain
so use rtable_l2() to get the right id. Fixes adding routes to rtables. OK mpi@ phessler@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index fe2d39d4d62..ac57cc6fc44 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.356 2017/05/16 12:24:01 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.357 2017/05/27 09:51:18 claudio Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -750,7 +750,7 @@ ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway,
} else {
struct rtentry *rt;
- rt = rtalloc(gateway, RT_RESOLVE, rtableid);
+ rt = rtalloc(gateway, RT_RESOLVE, rtable_l2(rtableid));
if (rt != NULL)
ifa = rt->rt_ifa;
rtfree(rt);