Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177610313
D26478.1794834161.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
906 B
Referenced Files
None
Subscribers
None
D26478.1794834161.diff
View Options
Index: sys/netinet/tcp_output.c
===================================================================
--- sys/netinet/tcp_output.c
+++ sys/netinet/tcp_output.c
@@ -207,7 +207,7 @@
#endif
struct tcphdr *th;
u_char opt[TCP_MAXOLEN];
- unsigned ipoptlen, optlen, hdrlen;
+ unsigned ipoptlen, optlen = 0, hdrlen;
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
unsigned ipsec_optlen = 0;
#endif
@@ -588,7 +588,15 @@
* - we need to retransmit
*/
if (len) {
- if (len >= tp->t_maxseg)
+ /*
+ * As the TCP header options are now
+ * considered when setting up the initial
+ * window, we would not send the last segment
+ * if we skip considering the option length here.
+ * Note: this may not work when tcp headers change
+ * very dynamically in the future.
+ */
+ if ((len + optlen) >= tp->t_maxseg)
goto send;
/*
* NOTE! on localhost connections an 'ack' from the remote
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 1:02 PM (23 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41778855
Default Alt Text
D26478.1794834161.diff (906 B)
Attached To
Mode
D26478: TCP: Send full Initial Window when Timestamps are in use
Attached
Detach File
Event Timeline