diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2018-06-11 17:50:22 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-06-14 12:56:13 -0700 |
commit | 2fe15e8c532c58d541fe0540c93b4d510e345fcc (patch) | |
tree | bc57d614d6babfafefe1d6d4637aee8f0d7c3c6e /datapath | |
parent | 1e40b541bc9bd0a768986172ec63e41708a3e1f6 (diff) | |
download | openvswitch-2fe15e8c532c58d541fe0540c93b4d510e345fcc.tar.gz |
datapath: Fix ip6_gre, ip6_tunnel, and ip_gre backport
Recently added ERSAPN feature introduced changes in ip6_gre, ip6_tunnel,
and ip_gre which will break build on RHEL 7.5 kernel because of
ndo_change_mtu(). This patch fixes the issue in RHEL 7.5 kernel.
Fixes: 8e53509c ("gre: introduce native tunnel support for ERSPAN")
Fixes: c387d817 ("compat: Add ipv6 GRE and IPV6 Tunneling")
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/ip6_gre.c | 15 | ||||
-rw-r--r-- | datapath/linux/compat/ip6_tunnel.c | 5 | ||||
-rw-r--r-- | datapath/linux/compat/ip_gre.c | 10 |
3 files changed, 30 insertions, 0 deletions
diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c index dd22240fc..0c885472d 100644 --- a/datapath/linux/compat/ip6_gre.c +++ b/datapath/linux/compat/ip6_gre.c @@ -1525,7 +1525,12 @@ static const struct net_device_ops ip6gre_netdev_ops = { .ndo_uninit = ip6gre_tunnel_uninit, .ndo_start_xmit = ip6gre_tunnel_xmit, .ndo_do_ioctl = ip6gre_tunnel_ioctl, +#ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), + .extended.ndo_change_mtu = ip6_tnl_change_mtu, +#else .ndo_change_mtu = ip6_tnl_change_mtu, +#endif .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_NDO_GET_IFLINK .ndo_get_iflink = ip6_tnl_get_iflink, @@ -2010,7 +2015,12 @@ static const struct net_device_ops ip6gre_tap_netdev_ops = { .ndo_start_xmit = ip6gre_tunnel_xmit, .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, +#ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), + .extended.ndo_change_mtu = ip6_tnl_change_mtu, +#else .ndo_change_mtu = ip6_tnl_change_mtu, +#endif .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_NDO_GET_IFLINK .ndo_get_iflink = ip6_tnl_get_iflink, @@ -2073,7 +2083,12 @@ static const struct net_device_ops ip6erspan_netdev_ops = { .ndo_start_xmit = ip6erspan_tunnel_xmit, .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, +#ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), + .extended.ndo_change_mtu = ip6_tnl_change_mtu, +#else .ndo_change_mtu = ip6_tnl_change_mtu, +#endif .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_NDO_GET_IFLINK .ndo_get_iflink = ip6_tnl_get_iflink, diff --git a/datapath/linux/compat/ip6_tunnel.c b/datapath/linux/compat/ip6_tunnel.c index f6ac069b5..7c6678796 100644 --- a/datapath/linux/compat/ip6_tunnel.c +++ b/datapath/linux/compat/ip6_tunnel.c @@ -1612,7 +1612,12 @@ static const struct net_device_ops ip6_tnl_netdev_ops = { .ndo_uninit = ip6_tnl_dev_uninit, .ndo_start_xmit = ip6_tnl_start_xmit, .ndo_do_ioctl = ip6_tnl_ioctl, +#ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), + .extended.ndo_change_mtu = ip6_tnl_change_mtu, +#else .ndo_change_mtu = ip6_tnl_change_mtu, +#endif .ndo_get_stats = ip6_get_stats, #ifdef HAVE_NDO_GET_IFLINK .ndo_get_iflink = ip6_tnl_get_iflink, diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index d35614ee9..ac9fb8bfc 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -1153,7 +1153,12 @@ static const struct net_device_ops ipgre_netdev_ops = { .ndo_init = ipgre_tunnel_init, .ndo_uninit = rpl_ip_tunnel_uninit, .ndo_start_xmit = ipgre_xmit, +#ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), + .extended.ndo_change_mtu = ip_tunnel_change_mtu, +#else .ndo_change_mtu = ip_tunnel_change_mtu, +#endif .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_GET_LINK_NET .ndo_get_iflink = ip_tunnel_get_iflink, @@ -1187,7 +1192,12 @@ static const struct net_device_ops erspan_netdev_ops = { .ndo_start_xmit = erspan_xmit, .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, +#ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), + .extended.ndo_change_mtu = ip_tunnel_change_mtu, +#else .ndo_change_mtu = ip_tunnel_change_mtu, +#endif .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_NDO_GET_IFLINK .ndo_get_iflink = rpl_ip_tunnel_get_iflink, |