diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index c04176be7ed1..0336422c88a0 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2145,7 +2145,7 @@ int compat_tcp_getsockopt(struct sock *sk, int level, int optname, | |||
2145 | EXPORT_SYMBOL(compat_tcp_getsockopt); | 2145 | EXPORT_SYMBOL(compat_tcp_getsockopt); |
2146 | #endif | 2146 | #endif |
2147 | 2147 | ||
2148 | struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int sg) | 2148 | struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) |
2149 | { | 2149 | { |
2150 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 2150 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
2151 | struct tcphdr *th; | 2151 | struct tcphdr *th; |
@@ -2166,10 +2166,14 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int sg) | |||
2166 | if (!pskb_may_pull(skb, thlen)) | 2166 | if (!pskb_may_pull(skb, thlen)) |
2167 | goto out; | 2167 | goto out; |
2168 | 2168 | ||
2169 | segs = NULL; | ||
2170 | if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) | ||
2171 | goto out; | ||
2172 | |||
2169 | oldlen = (u16)~skb->len; | 2173 | oldlen = (u16)~skb->len; |
2170 | __skb_pull(skb, thlen); | 2174 | __skb_pull(skb, thlen); |
2171 | 2175 | ||
2172 | segs = skb_segment(skb, sg); | 2176 | segs = skb_segment(skb, features); |
2173 | if (IS_ERR(segs)) | 2177 | if (IS_ERR(segs)) |
2174 | goto out; | 2178 | goto out; |
2175 | 2179 | ||