summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-05-07 09:56:39 +0000
committermpi <mpi@openbsd.org>2016-05-07 09:56:39 +0000
commitc7d3df3da4b4278d552949454bfb7e6debd85a82 (patch)
treea6a92e90cdb979fdec18392083bf7aaf3ca0bc99
parentset the high speed enable bit if the timing isn't SDMMC_TIMING_LEGACY (diff)
downloadwireguard-openbsd-c7d3df3da4b4278d552949454bfb7e6debd85a82.tar.xz
wireguard-openbsd-c7d3df3da4b4278d552949454bfb7e6debd85a82.zip
Use rtalloc_mpath() when checking for local route entries because we
are now using the returned route for forwarding as well. This restore the behavior of r1.274 when using mpath entries for forwarding. ok visa@, henning@
-rw-r--r--sys/netinet/ip_input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 112633d291c..332060c7988 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.275 2016/05/03 12:19:13 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.276 2016/05/07 09:56:39 mpi Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -606,7 +606,8 @@ in_ouraddr(struct mbuf *m, struct ifnet *ifp, struct rtentry **prt)
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr = ip->ip_dst;
- rt = rtalloc(sintosa(&sin), 0, m->m_pkthdr.ph_rtableid);
+ rt = rtalloc_mpath(sintosa(&sin), &ip->ip_src.s_addr,
+ m->m_pkthdr.ph_rtableid);
if (rtisvalid(rt)) {
if (ISSET(rt->rt_flags, RTF_LOCAL))
match = 1;