]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_ipv4.c
tcp: fix length used for checksum in a reset
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_ipv4.c
index 24ffc5e1d3dab2aabe8eaea47e0ca1198bf302c7..ba46769c6e97ead6e0c24cf127b20d72b87dc461 100644 (file)
@@ -589,7 +589,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
 #endif
        arg.csum = csum_tcpudp_nofold(ip_hdr(skb)->daddr,
                                      ip_hdr(skb)->saddr, /* XXX */
-                                     sizeof(struct tcphdr), IPPROTO_TCP, 0);
+                                     arg.iov[0].iov_len, IPPROTO_TCP, 0);
        arg.csumoffset = offsetof(struct tcphdr, check) / 2;
        arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0;