summaryrefslogtreecommitdiffstats
path: root/sys/net/if_mpe.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-02-14 03:27:42 +0000
committerdlg <dlg@openbsd.org>2019-02-14 03:27:42 +0000
commitf0b1bf0b3576e9d3e35c66cd2856db6730f433d9 (patch)
tree8783786a603a99e05cf6ce30d29135b7eae3f162 /sys/net/if_mpe.c
parentconsistently use the same flags for rt_ifa_add and _del. (diff)
downloadwireguard-openbsd-f0b1bf0b3576e9d3e35c66cd2856db6730f433d9.tar.xz
wireguard-openbsd-f0b1bf0b3576e9d3e35c66cd2856db6730f433d9.zip
use the configured route domain for the mpls tunnel when sending packets.
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r--sys/net/if_mpe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index a516415de3d..e4ebe1665a9 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.83 2019/02/14 00:49:04 dlg Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.84 2019/02/14 03:27:42 dlg Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -146,6 +146,7 @@ mpe_clone_destroy(struct ifnet *ifp)
void
mpe_start(struct ifnet *ifp)
{
+ struct mpe_softc *sc = ifp->if_softc;
struct mbuf *m;
struct sockaddr *sa;
struct sockaddr smpls = { .sa_family = AF_MPLS };
@@ -154,7 +155,7 @@ mpe_start(struct ifnet *ifp)
while ((m = ifq_dequeue(&ifp->if_snd)) != NULL) {
sa = mtod(m, struct sockaddr *);
- rt = rtalloc(sa, RT_RESOLVE, 0);
+ rt = rtalloc(sa, RT_RESOLVE, sc->sc_rdomain);
if (!rtisvalid(rt)) {
m_freem(m);
rtfree(rt);