Re: TCP FIN-fragment failure in 2.2.x

Andrea Arcangeli (andrea@e-mind.com)
Wed, 10 Mar 1999 16:23:00 +0100 (CET)


On Wed, 10 Mar 1999, David Miller wrote:

>Although probably unrelated, there is a sysctl which turns off a TCP

Woops Dave, now I think I am been wrong again in my comments about Greg's
change. The reason there wasn't FIN on the wire is exactly because the
FIN is shifted in the second packet. I did understood fine how
tcp_fragment() works but I overlooked something again with the
solution under my eyes. Ok, I'll have a good break now...

I think a better (faster) patch could looks like this (the second line
change is just a little improvement):

Index: tcp_output.c
===================================================================
RCS file: /var/cvs/linux/net/ipv4/tcp_output.c,v
retrieving revision 1.1.2.16
diff -u -r1.1.2.16 tcp_output.c
--- tcp_output.c 1999/03/10 14:03:52 1.1.2.16
+++ tcp_output.c 1999/03/10 15:12:23
@@ -233,8 +233,8 @@
buff->csum = csum_partial_copy(skb->data + len, skb_put(buff, nsize),
nsize, 0);

- TCP_SKB_CB(skb)->end_seq -= nsize;
- skb_trim(skb, skb->len - nsize);
+ TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq;
+ skb_trim(skb, len);

/* Rechecksum original buffer. */
skb->csum = csum_partial(skb->data, skb->len, 0);

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/