Skip to content

Commit bbec780

Browse files
pshelardavem330
authored andcommitted
net: vxlan: lwt: Fix vxlan local traffic.
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: ee122c7 ("vxlan: Flow based tunneling"). Reported-by: Jakub Libosvar <[email protected]> Signed-off-by: Pravin B Shelar <[email protected]> Acked-by: Jiri Benc <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 272d96a commit bbec780

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/vxlan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
20222022
}
20232023

20242024
/* Bypass encapsulation if the destination is local */
2025-
if (rt->rt_flags & RTCF_LOCAL &&
2025+
if (!info && rt->rt_flags & RTCF_LOCAL &&
20262026
!(rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) {
20272027
struct vxlan_dev *dst_vxlan;
20282028

@@ -2082,7 +2082,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
20822082

20832083
/* Bypass encapsulation if the destination is local */
20842084
rt6i_flags = ((struct rt6_info *)ndst)->rt6i_flags;
2085-
if (rt6i_flags & RTF_LOCAL &&
2085+
if (!info && rt6i_flags & RTF_LOCAL &&
20862086
!(rt6i_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) {
20872087
struct vxlan_dev *dst_vxlan;
20882088

0 commit comments

Comments
 (0)