summaryrefslogtreecommitdiffstats
path: root/sys/net/if_mpe.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-04-02 10:50:16 +0000
committerdlg <dlg@openbsd.org>2019-04-02 10:50:16 +0000
commit957fd304283991d93680c4292ff139796759c24b (patch)
treea8e812d4464ad42aa748e36408ac4bcdf8732063 /sys/net/if_mpe.c
parentsome mbuf ph_rtableid fixes (diff)
downloadwireguard-openbsd-957fd304283991d93680c4292ff139796759c24b.tar.xz
wireguard-openbsd-957fd304283991d93680c4292ff139796759c24b.zip
clear the BCAST and MCAST mbuf flags for "outgoing" packets.
if these remain set then output on the underlying interface may mistakenly be done with the wrong protocol type (eg, MPLS_MCAST instead of MPLS), and to the wrong link layer address. reported by Lee Nelson the specific problem was identified by Mitchell Krome
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r--sys/net/if_mpe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index bafe9d661bc..af5c61204d8 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.88 2019/04/02 10:46:02 dlg Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.89 2019/04/02 10:50:16 dlg Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -198,6 +198,7 @@ mpe_start(struct ifnet *ifp)
#endif
m->m_pkthdr.ph_rtableid = sc->sc_rdomain;
+ CLR(m->m_flags, M_BCAST|M_MCAST);
mpls_output(ifp0, m, &smpls, rt);
if_put(ifp0);