]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ip6_gre: update mtu properly in ip6gre_err
authorXin Long <lucien.xin@gmail.com>
Tue, 5 Sep 2017 09:26:33 +0000 (17:26 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 20 Sep 2017 12:23:44 +0000 (07:23 -0500)
commit3d4c55ad96383a0c3be4810b1d88b429b39c9837
treeb382943eac0e75ae03d85d72d741fc3474abcbfc
parent4ab0b8d31d3f507d46e042e9094d06274c1c30a4
ip6_gre: update mtu properly in ip6gre_err

BugLink: http://bugs.launchpad.net/bugs/1718412
[ 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.

Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
net/ipv6/ip6_gre.c