]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ip_gre: ipgre_tap device should keep dst
authorXin Long <lucien.xin@gmail.com>
Thu, 28 Sep 2017 05:23:31 +0000 (13:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 02:46:42 +0000 (03:46 +0100)
Without keeping dst, the tunnel will not update any mtu/pmtu info,
since it does not have a dst on the skb.

Reproducer:
  client(ipgre_tap1 - eth1) <-----> (eth1 - ipgre_tap1)server

After reducing eth1's mtu on client, then perforamnce became 0.

This patch is to netif_keep_dst in gre_tap_init, as ipgre does.

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>
net/ipv4/ip_gre.c

index 0162fb955b33abf18514cbfd482e72a0ebce6e48..8b837f6f553201da37e3909fb0d5fd82748ee34a 100644 (file)
@@ -1223,6 +1223,7 @@ static int gre_tap_init(struct net_device *dev)
 {
        __gre_tunnel_init(dev);
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+       netif_keep_dst(dev);
 
        return ip_tunnel_init(dev);
 }