summaryrefslogtreecommitdiff
path: root/sys/net/if_gre.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-05-28 04:30:17 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-05-28 04:30:17 +0000
commit0e0dc4d8e2abb0416991aa502dea2ca6767475c3 (patch)
treee74925b3ed28db2089430623b9ea7ff5f43c624b /sys/net/if_gre.c
parent52aee80c874801c37df9346ab3fed8e7c280a2e6 (diff)
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@
Diffstat (limited to 'sys/net/if_gre.c')
-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);