ip_gre: erspan device should keep dst
authorXin Long <lucien.xin@gmail.com>
Sun, 1 Oct 2017 14:00:56 +0000 (22:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Oct 2017 05:30:32 +0000 (22:30 -0700)
The patch 'ip_gre: ipgre_tap device should keep dst' fixed
the issue ipgre_tap dev mtu couldn't be updated in tx path.

The same fix is needed for erspan as well.

Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c

index fad0bb1e3e9afd8026813887c7dc1a3984d16d3c..467e44d7587dcf6dc9eeb3845b1fe069b6c8389e 100644 (file)
@@ -1254,6 +1254,7 @@ static int erspan_tunnel_init(struct net_device *dev)
        dev->features           |= GRE_FEATURES;
        dev->hw_features        |= GRE_FEATURES;
        dev->priv_flags         |= IFF_LIVE_ADDR_CHANGE;
+       netif_keep_dst(dev);
 
        return ip_tunnel_init(dev);
 }