Page MenuHomeFreeBSD

D26478.1794834161.diff
No OneTemporary

Authored By
Unknown
Size
906 B
Referenced Files
None
Subscribers
None

D26478.1794834161.diff

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

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)

Event Timeline