Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162921365
D35388.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35388.diff
View Options
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -328,13 +328,16 @@
*/
p = NULL;
goto after_sack_rexmit;
- } else
+ } else {
/* Can rexmit part of the current hole */
len = ((int32_t)ulmin(cwin,
- tp->snd_recover - p->rxmit));
- } else
- len = ((int32_t)ulmin(cwin, p->end - p->rxmit));
- off = p->rxmit - tp->snd_una;
+ SEQ_SUB(tp->snd_recover, p->rxmit)));
+ }
+ } else {
+ len = ((int32_t)ulmin(cwin,
+ SEQ_SUB(p->end, p->rxmit)));
+ }
+ off = SEQ_SUB(p->rxmit, tp->snd_una);
KASSERT(off >= 0,("%s: sack block to the left of una : %d",
__func__, off));
if (len > 0) {
diff --git a/sys/netinet/tcp_seq.h b/sys/netinet/tcp_seq.h
--- a/sys/netinet/tcp_seq.h
+++ b/sys/netinet/tcp_seq.h
@@ -43,6 +43,7 @@
#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
#define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
#define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
+#define SEQ_SUB(a,b) ((int)((a)-(b)))
#define SEQ_MIN(a, b) ((SEQ_LT(a, b)) ? (a) : (b))
#define SEQ_MAX(a, b) ((SEQ_GT(a, b)) ? (a) : (b))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 19, 8:00 AM (13 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35227014
Default Alt Text
D35388.diff (1 KB)
Attached To
Mode
D35388: tcp: Correctly compute the retransmit length for all 64-bit platforms.
Attached
Detach File
Event Timeline
Log In to Comment