Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

vxlan 1/2: multicast fix

4 views
Skip to first unread message

Reyk Floeter

unread,
Aug 5, 2016, 4:34:05 PM8/5/16
to
Hi,

VXLAN has to clear all multicast flags from the outer packet after
decapsulating the mbuf. This fixes things like ARP in VXLAN multicast
tunnels. It used to work ... but simply clearing M_MCAST and M_BCAST
is a practical approach that is also found in other L2 tunnel drivers.

OK?

Reyk

Index: sys/net/if_vxlan.c
===================================================================
RCS file: /cvs/src/sys/net/if_vxlan.c,v
retrieving revision 1.38
diff -u -p -u -p -r1.38 if_vxlan.c
--- sys/net/if_vxlan.c 13 Apr 2016 11:41:15 -0000 1.38
+++ sys/net/if_vxlan.c 5 Aug 2016 20:20:27 -0000
@@ -562,11 +562,7 @@ vxlan_lookup(struct mbuf *m, struct udph
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);

0 new messages