netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
@ 2013-04-14  9:21 Mike Rapoport
  2013-04-14 15:24 ` Cong Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mike Rapoport @ 2013-04-14  9:21 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Stephen Hemminger, Mike Rapoport

The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
and therefore will be sent out bypassing encapsulation. This breaks
delivery of packets sent to the vxlan multicast group.
Disabling encapsulation bypass for multicasts and broadcasts fixes the
issue.

Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
---
 drivers/net/vxlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 725aba3..97a306c 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1014,7 +1014,8 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
 	}
 
 	/* Bypass encapsulation if the destination is local */
-	if (rt->rt_flags & RTCF_LOCAL) {
+	if (rt->rt_flags & RTCF_LOCAL &&
+	    !(rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) {
 		struct vxlan_dev *dst_vxlan;
 
 		ip_rt_put(rt);
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-15 18:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14  9:21 [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts Mike Rapoport
2013-04-14 15:24 ` Cong Wang
2013-04-14 19:39 ` David Miller
2013-04-15  5:31   ` Mike Rapoport
2013-04-15  5:45     ` David Miller
2013-04-15  6:23       ` Mike Rapoport
2013-04-15 13:32       ` Mike Rapoport
2013-04-15 16:58 ` Cong Wang
2013-04-15 17:39   ` Sridhar Samudrala
2013-04-15 18:06   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).