netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: Fix tcp_v6_send_response(): it didn't set skb transport header
@ 2009-09-03 16:25 Cosmin Ratiu
  2009-09-04  3:45 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Cosmin Ratiu @ 2009-09-03 16:25 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

Hello,

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.

Cosmin.

Signed-off-by: Cosmin Ratiu <cratiu@ixiacom.com>
---
 net/ipv6/tcp_ipv6.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)



[-- Attachment #2: 0001-ipv6-Fix-tcp_v6_send_response-it-didn-t-set-skb-trans.mbox --]
[-- Type: text/x-patch, Size: 466 bytes --]

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index d849dd5..776e911 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -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));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-04  3:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03 16:25 [PATCH] ipv6: Fix tcp_v6_send_response(): it didn't set skb transport header Cosmin Ratiu
2009-09-04  3:45 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).