From: reyk Date: Sat, 6 Aug 2016 14:29:48 +0000 (+0000) Subject: Fix multicast mode (destination is a multicast IP): the BCAST and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=af394180777c2d1b69e7197417e7a59017610632;p=openbsd Fix multicast mode (destination is a multicast IP): the BCAST and MCAST flags have to be cleared from the mbuf after decapsulating packets. This fixes tunneled broadcast packets, eg. ARP. It used to work before the input path was changed the flags got cleared later in the stack. OK yasuoka@ --- diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 7d7bb4aafe5..f8abf90509c 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.38 2016/04/13 11:41:15 mpi Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.39 2016/08/06 14:29:48 reyk Exp $ */ /* * Copyright (c) 2013 Reyk Floeter @@ -562,11 +562,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen, memcpy(sa, srcsa, sa->sa_len); #endif - /* Clear multicast flag from the outer packet */ - if (sc->sc_imo.imo_num_memberships > 0 && - m->m_flags & (M_MCAST) && - !ETHER_IS_MULTICAST(eh->ether_dhost)) - m->m_flags &= ~M_MCAST; + m->m_flags &= ~(M_MCAST|M_BCAST); #if NPF > 0 pf_pkt_addr_changed(m);