提交 6a553681 编写于 作者: A Alexander Duyck 提交者: David S. Miller

ip6_gre: Do not allow segmentation offloads GRE_CSUM is enabled with FOU/GUE

This patch addresses the same issue we had for IPv4 where enabling GRE with
an inner checksum cannot be supported with FOU/GUE due to the fact that
they will jump past the GRE header at it is treated like a tunnel header.
Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9a0351df
...@@ -1355,11 +1355,15 @@ static int ip6gre_newlink(struct net *src_net, struct net_device *dev, ...@@ -1355,11 +1355,15 @@ static int ip6gre_newlink(struct net *src_net, struct net_device *dev,
dev->hw_features |= GRE6_FEATURES; dev->hw_features |= GRE6_FEATURES;
if (!(nt->parms.o_flags & TUNNEL_SEQ)) { if (!(nt->parms.o_flags & TUNNEL_SEQ)) {
/* TCP segmentation offload is not supported when we /* TCP offload with GRE SEQ is not supported, nor
* generate output sequences. * can we support 2 levels of outer headers requiring
* an update.
*/ */
dev->features |= NETIF_F_GSO_SOFTWARE; if (!(nt->parms.o_flags & TUNNEL_CSUM) ||
dev->hw_features |= NETIF_F_GSO_SOFTWARE; (nt->encap.type == TUNNEL_ENCAP_NONE)) {
dev->features |= NETIF_F_GSO_SOFTWARE;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
}
/* Can use a lockless transmit, unless we generate /* Can use a lockless transmit, unless we generate
* output sequences * output sequences
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册