From: pravin shelar Date: Sat, 6 Aug 2016 00:45:37 +0000 (-0700) Subject: net: vxlan: lwt: Fix vxlan local traffic. X-Git-Tag: v4.4.223~21 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b1f88cb2ca8526e77e482c80a5c5bf6ab041cbe1;p=thirdparty%2Fkernel%2Fstable.git net: vxlan: lwt: Fix vxlan local traffic. commit bbec7802c6948c8626b71a4fe31283cb4691c358 upstream. vxlan driver has bypass for local vxlan traffic, but that depends on information about all VNIs on local system in vxlan driver. This is not available in case of LWT. Therefore following patch disable encap bypass for LWT vxlan traffic. Fixes: ee122c79d42 ("vxlan: Flow based tunneling"). Reported-by: Jakub Libosvar Signed-off-by: Pravin B Shelar Acked-by: Jiri Benc Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index d294949005bdd..108c899a87486 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2054,7 +2054,7 @@ static void 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 (!info && rt->rt_flags & RTCF_LOCAL && !(rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) { struct vxlan_dev *dst_vxlan; @@ -2112,7 +2112,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, /* Bypass encapsulation if the destination is local */ rt6i_flags = ((struct rt6_info *)ndst)->rt6i_flags; - if (rt6i_flags & RTF_LOCAL && + if (!info && rt6i_flags & RTF_LOCAL && !(rt6i_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) { struct vxlan_dev *dst_vxlan;