[ovs-dev,ERSPAN,RFC,08/25] ip_gre: erspan device should keep dst

Message ID 1521756461-3870-9-git-send-email-gvrose8192@gmail.com
State RFC
Headers show
  • Introduce ERSPAN for OVS
Related show

Commit Message

Gregory Rose March 22, 2018, 10:07 p.m.
From: Xin Long <lucien.xin@gmail.com>

Upstream commit:
    commit c84bed440e4e11a973e8c0254d0dfaccfca41fb0
    Author: Xin Long <lucien.xin@gmail.com>
    Date:   Sun Oct 1 22:00:56 2017 +0800

    ip_gre: erspan device should keep dst

    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>

Cc: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
 datapath/linux/compat/ip_gre.c | 1 +
 1 file changed, 1 insertion(+)


diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index dc58396..0199350 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -879,6 +879,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);