Skip to contentSkip to conversation

Patch "ip6_gre: update mtu properly in ip6gre_err" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 2 messages Sep 15, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ip6_gre: update mtu properly in ip6gre_err

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ip6_gre-update-mtu-properly-in-ip6gre_err.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Fri Sep 15 10:03:45 PDT 2017

From: Xin Long <[email protected]>
Date: Tue, 5 Sep 2017 17:26:33 +0800
Subject: ip6_gre: update mtu properly in ip6gre_err

From: Xin Long <[email protected]>

[ Upstream commit 5c25f30c93fdc5bf25e62101aeaae7a4f9b421b3 ]

Now when probessing ICMPV6_PKT_TOOBIG, ip6gre_err only subtracts the offset of gre header from mtu info. The expected mtu of gre device should also subtract gre header. Otherwise, the next packets still can't be sent out.

Jianlin found this issue when using the topo:
client(ip6gre)<---->(nic1)route(nic2)<----->(ip6gre)server

and reducing nic2's mtu, then both tcp and sctp's performance with big size data became 0.

This patch is to fix it by also subtracting grehdr (tun->tun_hlen) from mtu info when updating gre device's mtu in ip6gre_err(). It also needs to subtract ETH_HLEN if gre dev'type is ARPHRD_ETHER.

---
 net/ipv6/ip6_gre.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv6/ip6_gre.c +3 -1
@@ -433,7 +433,9 @@ static void ip6gre_err(struct sk_buff *s
 		}
 		break;
 	case ICMPV6_PKT_TOOBIG:
-		mtu = be32_to_cpu(info) - offset;
+		mtu = be32_to_cpu(info) - offset - t->tun_hlen;
+		if (t->dev->type == ARPHRD_ETHER)
+			mtu -= ETH_HLEN;
 		if (mtu < IPV6_MIN_MTU)
 			mtu = IPV6_MIN_MTU;
 		t->dev->mtu = mtu;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/ip6_gre-update-mtu-properly-in-ip6gre_err.patch

author maintainer
#1 lore raw
Quoted 8 lines · On Fri, Sep 15, 2017 at 10:08:24AM -0700, [email protected] wrote:

This is a note to let you know that I've just added the patch titled

ip6_gre: update mtu properly in ip6gre_err

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 6 lines

The filename of the patch is:
ip6_gre-update-mtu-properly-in-ip6gre_err.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Nope, sorry, this broke the build, it doesn't look to be needed in 4.4, sorry for the noise.

greg k-h