]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - net/ipv4/tcp_output.c
net: Fix possible wrong checksum generation.
[~shefty/rdma-dev.git] / net / ipv4 / tcp_output.c
index 564bf89d9fd39e8cf33f72eaca36f7bc4696bdbf..6182d90e97b0fde55b533e3d53f78aa9136b6731 100644 (file)
@@ -1133,7 +1133,6 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
 static void tcp_set_skb_tso_segs(const struct sock *sk, struct sk_buff *skb,
                                 unsigned int mss_now)
 {
-       skb_shinfo(skb)->gso_type &= SKB_GSO_SHARED_FRAG;
        if (skb->len <= mss_now || !sk_can_gso(sk) ||
            skb->ip_summed == CHECKSUM_NONE) {
                /* Avoid the costly divide in the normal
@@ -1141,10 +1140,11 @@ static void tcp_set_skb_tso_segs(const struct sock *sk, struct sk_buff *skb,
                 */
                skb_shinfo(skb)->gso_segs = 1;
                skb_shinfo(skb)->gso_size = 0;
+               skb_shinfo(skb)->gso_type = 0;
        } else {
                skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss_now);
                skb_shinfo(skb)->gso_size = mss_now;
-               skb_shinfo(skb)->gso_type |= sk->sk_gso_type;
+               skb_shinfo(skb)->gso_type = sk->sk_gso_type;
        }
 }