2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

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>
This commit is contained in:
Yi-Hung Wei
2018-06-11 17:50:22 -07:00
committed by Ben Pfaff
parent 1e40b541bc
commit 2fe15e8c53
3 changed files with 30 additions and 0 deletions

View File

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

View File

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

View File

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