]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_ipv4.c
tcpv[46]: fix md5 pseudoheader address field ordering
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_ipv4.c
index 24ffc5e1d3dab2aabe8eaea47e0ca1198bf302c7..5c8fa7f1e327821dbcb378244e8674183025906c 100644 (file)
@@ -583,13 +583,13 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
                rep.th.doff = arg.iov[0].iov_len / 4;
 
                tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[1],
-                                    key, ip_hdr(skb)->daddr,
-                                    ip_hdr(skb)->saddr, &rep.th);
+                                    key, ip_hdr(skb)->saddr,
+                                    ip_hdr(skb)->daddr, &rep.th);
        }
 #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;