summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-05-28 04:30:16 +0000
committerclaudio <claudio@openbsd.org>2006-05-28 04:30:16 +0000
commit10e098a8609f724fab29ff74da43dd5402e6a8b9 (patch)
tree82562076e01353ee71a39fa43a14b57f20006e77
parento KNF (diff)
downloadwireguard-openbsd-10e098a8609f724fab29ff74da43dd5402e6a8b9.tar.xz
wireguard-openbsd-10e098a8609f724fab29ff74da43dd5402e6a8b9.zip
Fix multicast and broadcast over gre(4) tunnels. Clear the M_MCAST and M_BCAST
mbuf flags so that the packet is sent out with a normal link local address instead of a multicast or broadcast address. OK brad@
-rw-r--r--sys/net/if_gre.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 66af9942c6d..67b4463b2da 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.40 2006/03/25 22:41:47 djm Exp $ */
+/* $OpenBSD: if_gre.c,v 1.41 2006/05/28 04:30:16 claudio Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -231,6 +231,8 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
bcopy(&ifp, (caddr_t)(mtag + 1), sizeof(struct ifnet *));
m_tag_prepend(m, mtag);
+ m->m_flags &= ~(M_BCAST|M_MCAST);
+
#if NBPFILTER >0
if (ifp->if_bpf)
bpf_mtap_af(ifp->if_bpf, dst->sa_family, m, BPF_DIRECTION_OUT);