Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6: Fix tcp_v6_send_response(): it didn't set skb transport header

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>

authored by

Cosmin Ratiu and committed by
David S. Miller
a8fdf2b3 6fdfa970

+1
+1
net/ipv6/tcp_ipv6.c
··· 1003 1003 skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); 1004 1004 1005 1005 t1 = (struct tcphdr *) skb_push(buff, tot_len); 1006 + skb_reset_transport_header(skb); 1006 1007 1007 1008 /* Swap the send and the receive. */ 1008 1009 memset(t1, 0, sizeof(*t1));