netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Steffen Klassert <steffen.klassert@secunet.com>,
	Alexander Duyck <alexander.h.duyck@redhat.com>
Cc: David Miller <davem@davemloft.net>, NetDev <netdev@vger.kernel.org>
Subject: Re: Looking for a lost patch
Date: Wed, 20 May 2015 19:06:36 -0700	[thread overview]
Message-ID: <555D3DAC.4080003@gmail.com> (raw)
In-Reply-To: <20150520063223.GM8928@secunet.com>

On 05/19/2015 11:32 PM, Steffen Klassert wrote:
> On Tue, May 19, 2015 at 11:32:15AM -0700, Alexander Duyck wrote:
>> On 05/19/2015 12:57 AM, Steffen Klassert wrote:
>>> The MTU should be 1500. All the IPsec overhead is handled by PMTU
>>> discovery, just like in the case we use IPsec without vti tunnels.
>>> The IPv6 side of vti does it like that.
>> The problem is the PMTU isn't communicated to things that make use
>> of the tunnel.  For example if I do a "ping -s 2000 x.x.x.x" across
>> an IPv6 VTI interface it will fail currently as it assumes the MTU
>> is 1500 and so it is fragmenting the ping packet at sizes that won't
>> be communicated across the underlying interface.
> Well, the problem is that the local socket is still attached on the
> skb. The socket gets an error notification if the packet is too big,
> but ping does not care much about these error notifications.
>
> One option to get such applications to work is to orphan the skb
> in the vti xmit function. Then the packet is not assumed to be
> local, so PMTU discovery is triggered on that route.
>
> Something like this should work for IPv6:
>
> diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
> index ed9d681..cd50bc1 100644
> --- a/net/ipv6/ip6_vti.c
> +++ b/net/ipv6/ip6_vti.c
> @@ -459,6 +459,7 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
>   		goto tx_err_dst_release;
>   	}
>   
> +	skb_orphan(skb);
>   	skb_scrub_packet(skb, !net_eq(t->net, dev_net(dev)));
>   	skb_dst_set(skb, dst);
>   	skb->dev = skb_dst(skb)->dev;
>

This works, sort-of.  I have to ping from both ends before I can start 
to send traffic.

I am going to do some digging.  It seems like there should be some way 
to get the PMTU fed back into the PMTU for the VTI interface. If we can 
do that it would save a ton of pain.

- Alex

  reply	other threads:[~2015-05-21  2:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 17:47 Looking for a lost patch Alexander Duyck
2015-05-18  7:38 ` Steffen Klassert
2015-05-18 16:02   ` Alexander Duyck
2015-05-19  7:57     ` Steffen Klassert
2015-05-19 18:32       ` Alexander Duyck
2015-05-20  6:32         ` Steffen Klassert
2015-05-21  2:06           ` Alexander Duyck [this message]
2015-05-21 21:25           ` David Miller
2015-05-27  8:35             ` Steffen Klassert
2015-05-27 15:46               ` David Miller
2015-05-28  5:51                 ` Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555D3DAC.4080003@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).