diff options
Diffstat (limited to 'net/ipv4/tcp_offload.c')
-rw-r--r-- | net/ipv4/tcp_offload.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c index b92b81718ca4..4e86c59ec7f7 100644 --- a/net/ipv4/tcp_offload.c +++ b/net/ipv4/tcp_offload.c | |||
@@ -57,10 +57,12 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
57 | SKB_GSO_TCP_ECN | | 57 | SKB_GSO_TCP_ECN | |
58 | SKB_GSO_TCPV6 | | 58 | SKB_GSO_TCPV6 | |
59 | SKB_GSO_GRE | | 59 | SKB_GSO_GRE | |
60 | SKB_GSO_GRE_CSUM | | ||
60 | SKB_GSO_IPIP | | 61 | SKB_GSO_IPIP | |
61 | SKB_GSO_SIT | | 62 | SKB_GSO_SIT | |
62 | SKB_GSO_MPLS | | 63 | SKB_GSO_MPLS | |
63 | SKB_GSO_UDP_TUNNEL | | 64 | SKB_GSO_UDP_TUNNEL | |
65 | SKB_GSO_UDP_TUNNEL_CSUM | | ||
64 | 0) || | 66 | 0) || |
65 | !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))) | 67 | !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))) |
66 | goto out; | 68 | goto out; |
@@ -97,9 +99,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
97 | th->check = newcheck; | 99 | th->check = newcheck; |
98 | 100 | ||
99 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 101 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
100 | th->check = | 102 | th->check = gso_make_checksum(skb, ~th->check); |
101 | csum_fold(csum_partial(skb_transport_header(skb), | ||
102 | thlen, skb->csum)); | ||
103 | 103 | ||
104 | seq += mss; | 104 | seq += mss; |
105 | if (copy_destructor) { | 105 | if (copy_destructor) { |
@@ -133,8 +133,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
133 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + | 133 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + |
134 | (__force u32)delta)); | 134 | (__force u32)delta)); |
135 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 135 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
136 | th->check = csum_fold(csum_partial(skb_transport_header(skb), | 136 | th->check = gso_make_checksum(skb, ~th->check); |
137 | thlen, skb->csum)); | ||
138 | out: | 137 | out: |
139 | return segs; | 138 | return segs; |
140 | } | 139 | } |