Skip to content

Commit

Permalink
ipv6: Fix tcp_v6_send_response(): it didn't set skb transport header
Browse files Browse the repository at this point in the history
Here is a patch which fixes an issue observed when using TCP over IPv6
and AH from IPsec.

When a connection gets closed the 4-way method and the last ACK from
the server gets dropped, the subsequent FINs from the client do not
get ACKed because tcp_v6_send_response does not set the transport
header pointer. This causes ah6_output to try to allocate a lot of
memory, which typically fails, so the ACKs never make it out of the
stack.

I have reproduced the problem on kernel 2.6.7, but after looking at
the latest kernel it seems the problem is still there.

Signed-off-by: Cosmin Ratiu <cratiu@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Cosmin Ratiu authored and David S. Miller committed Sep 4, 2009
1 parent 6fdfa97 commit a8fdf2b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len);

t1 = (struct tcphdr *) skb_push(buff, tot_len);
skb_reset_transport_header(skb);

/* Swap the send and the receive. */
memset(t1, 0, sizeof(*t1));
Expand Down

0 comments on commit a8fdf2b

Please sign in to comment.