From 0e0dc4d8e2abb0416991aa502dea2ca6767475c3 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Sun, 28 May 2006 04:30:17 +0000 Subject: 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@ --- sys/net/if_gre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys') 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); -- cgit v1.2.3