Commit c667ab2c authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

[IPV6]: Correct CHECKSUM_HW handling in tcp_v6_send_check.

parent 5e1dcb06
...@@ -967,7 +967,7 @@ static void tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len, ...@@ -967,7 +967,7 @@ static void tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len,
struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk);
if (skb->ip_summed == CHECKSUM_HW) { if (skb->ip_summed == CHECKSUM_HW) {
th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 0); th->check = ~csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 0);
skb->csum = offsetof(struct tcphdr, check); skb->csum = offsetof(struct tcphdr, check);
} else { } else {
th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment