diff mbox series

[net] ip_gre: ipgre_tap device should keep dst

Message ID af0a18f43bc27a26ca1f3bce3730edcb312c9f76.1506576211.git.lucien.xin@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [net] ip_gre: ipgre_tap device should keep dst | expand

Commit Message

Xin Long Sept. 28, 2017, 5:23 a.m. UTC
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>
---
 net/ipv4/ip_gre.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller Oct. 1, 2017, 3:54 a.m. UTC | #1
From: Xin Long <lucien.xin@gmail.com>
Date: Thu, 28 Sep 2017 13:23:31 +0800

> 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>

Applied and queued up for -stable.
diff mbox series

Patch

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 0162fb9..8b837f6 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -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);
 }