Skip to contentSkip to conversation

stray 2.4 tcp fix.

PATCH [email protected] 3 participants 3 messages Mar 24, 2003 – Mar 25, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Sent to davem and netdev already, and was met with silence..

net/ipv4/tcp.c +2 -1
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/net/ipv4/tcp.c linux-2.5/net/ipv4/tcp.c
@@ -1189,7 +1189,8 @@ new_segment:
 
 			from += copy;
 			copied += copy;
-			seglen -= copy;
+			if ((seglen -= copy) == 0 && iovlen == 0)
+				goto out;
 
 			if (skb->len != mss_now || (flags & MSG_OOB))
 				continue;
#1 lore raw

net/ipv4/tcp.c new_segment: · line 1193

Quoted 12 lines · On Mon, Mar 24, 2003 at 04:42:00PM +0000, [email protected] wrote:

Sent to davem and netdev already, and was met with silence..

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/net/ipv4/tcp.c linux-2.5/net/ipv4/tcp.c

net/ipv4/tcp.c +2 -1
@@ -1189,7 +1189,8 @@ new_segment:
 
 			from += copy;
 			copied += copy;
-			seglen -= copy;
+			if ((seglen -= copy) == 0 && iovlen == 0)
+				goto out;

What's the purpose of combining a statement and a test?

Simply adding a test would be more clear.

Jeff

#2 lore raw
In reply to [email protected]
Quoted 1 line · On Mon, 2003-03-24 at 08:42, [email protected] wrote:

Sent to davem and netdev already, and was met with silence..

Thanks for finding this I'll apply it, but please note:

1) I am a lossy protocol like IP, so you may need to retransmit a patch if I don't respond to it.

2) For some reason a lot of netdev mails aren't making their way to me, I believe I've been unsubscribed and I'll check this now.

Thanks again.

Signature · 1 line
David S. Miller <[email protected]>