Skip to content
Commit 30a93d2b authored by Antoine Tenart's avatar Antoine Tenart Committed by David S. Miller
Browse files

vxlan: do not modify the shared tunnel info when PMTU triggers an ICMP reply

When the interface is part of a bridge or an Open vSwitch port and a
packet exceed a PMTU estimate, an ICMP reply is sent to the sender. When
using the external mode (collect metadata) the source and destination
addresses are reversed, so that Open vSwitch can match the packet
against an existing (reverse) flow.

But inverting the source and destination addresses in the shared
ip_tunnel_info will make following packets of the flow to use a wrong
destination address (packets will be tunnelled to itself), if the flow
isn't updated. Which happens with Open vSwitch, until the flow times
out.

Fixes this by uncloning the skb's ip_tunnel_info before inverting its
source and destination addresses, so that the modification will only be
made for the PTMU packet, not the following ones.

Fixes: fc68c995

 ("vxlan: Support for PMTU discovery on directly bridged links")
Tested-by: default avatarEelco Chaudron <echaudro@redhat.com>
Reviewed-by: default avatarEelco Chaudron <echaudro@redhat.com>
Signed-off-by: default avatarAntoine Tenart <atenart@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aa5a5b7a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment