Skip to content

Commit

Permalink
tcp: Mark v6 response packets as CHECKSUM_PARTIAL
Browse files Browse the repository at this point in the history
Otherwise we only get the checksum right for data-less TCP responses.

Noticed by Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 21, 2010
1 parent f71b70e commit e5700af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,9 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
ipv6_addr_copy(&fl.fl6_dst, &ipv6_hdr(skb)->saddr);
ipv6_addr_copy(&fl.fl6_src, &ipv6_hdr(skb)->daddr);

buff->ip_summed = CHECKSUM_PARTIAL;
buff->csum = 0;

__tcp_v6_send_check(buff, &fl.fl6_src, &fl.fl6_dst);

fl.proto = IPPROTO_TCP;
Expand Down

0 comments on commit e5700af

Please sign in to comment.