[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200915073006.GR20687@gauss3.secunet.de>
Date: Tue, 15 Sep 2020 09:30:06 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: mtk81216 <lina.wang@...iatek.com>
CC: "David S . Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
"Jakub Kicinski" <kuba@...nel.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
Matthias Brugger <matthias.bgg@...il.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH] xfrm:fragmented ipv4 tunnel packets in inner interface
On Wed, Sep 09, 2020 at 02:26:13PM +0800, mtk81216 wrote:
> In esp's tunnel mode,if inner interface is ipv4,outer is ipv4,one big
> packet which travels through tunnel will be fragmented with outer
> interface's mtu,peer server will remove tunnelled esp header and assemble
> them in big packet.After forwarding such packet to next endpoint,it will
> be dropped because of exceeding mtu or be returned ICMP(packet-too-big).
What is the exact case where packets are dropped? Given that the packet
was fragmented (and reassembled), I'd assume the DF bit was not set. So
every router along the path is allowed to fragment again if needed.
> When inner interface is ipv4,outer is ipv6,the flag of xfrm state in tunnel
> mode is af-unspec, thing is different.One big packet through tunnel will be
> fragmented with outer interface's mtu minus tunneled header, then two or
> more less fragmented packets will be tunneled and transmitted in outer
> interface,that is what xfrm6_output has done. If peer server receives such
> packets, it will forward successfully to next because length is valid.
>
> This patch has followed up xfrm6_output's logic,which includes two changes,
> one is choosing suitable mtu value which considering innner/outer
> interface's mtu and dst path, the other is if packet is too big, calling
> ip_fragment first,then tunnelling fragmented packets in outer interface and
> transmitting finally.
>
> Signed-off-by: mtk81216 <lina.wang@...iatek.com>
Please use your real name to sign off.
Powered by blists - more mailing lists