summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMike Rapoport <mike.rapoport@ravellosystems.com>2013-04-14 03:21:51 +0400
committerDavid S. Miller <davem@davemloft.net>2013-04-15 22:06:39 +0400
commitab09a6d0d38fc0da11e4cd57ec7f9fcfd16d335d (patch)
tree4a3f4adb8cd87cc049f3c5825d3ac272307add22 /drivers
parent4731d011d678679c188b6f9cd93a83970c562598 (diff)
downloadlinux-ab09a6d0d38fc0da11e4cd57ec7f9fcfd16d335d.tar.xz
vxlan: don't bypass encapsulation for multi- and broadcasts
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> Tested-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Sridhar Samudrala <sri@us.ibm.com> Tested-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vxlan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 725aba37e182..97a306c9e65d 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);