Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151007576
D21665.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21665.id.diff
View Options
Index: head/sys/netinet/tcp_output.c
===================================================================
--- head/sys/netinet/tcp_output.c
+++ head/sys/netinet/tcp_output.c
@@ -941,6 +941,20 @@
if (tp->t_flags & TF_NEEDFIN)
sendalot = 1;
} else {
+ if (optlen + ipoptlen >= tp->t_maxseg) {
+ /*
+ * Since we don't have enough space to put
+ * the IP header chain and the TCP header in
+ * one packet as required by RFC 7112, don't
+ * send it. Also ensure that at least one
+ * byte of the payload can be put into the
+ * TCP segment.
+ */
+ SOCKBUF_UNLOCK(&so->so_snd);
+ error = EMSGSIZE;
+ sack_rxmit = 0;
+ goto out;
+ }
len = tp->t_maxseg - optlen - ipoptlen;
sendalot = 1;
if (dont_sendalot)
Index: head/sys/netinet/tcp_stacks/bbr.c
===================================================================
--- head/sys/netinet/tcp_stacks/bbr.c
+++ head/sys/netinet/tcp_stacks/bbr.c
@@ -13343,12 +13343,14 @@
}
} else {
/* Not doing TSO */
- if (optlen + ipoptlen > tp->t_maxseg) {
+ if (optlen + ipoptlen >= tp->t_maxseg) {
/*
* Since we don't have enough space to put
* the IP header chain and the TCP header in
* one packet as required by RFC 7112, don't
- * send it.
+ * send it. Also ensure that at least one
+ * byte of the payload can be put into the
+ * TCP segment.
*/
SOCKBUF_UNLOCK(&so->so_snd);
error = EMSGSIZE;
Index: head/sys/netinet/tcp_stacks/rack.c
===================================================================
--- head/sys/netinet/tcp_stacks/rack.c
+++ head/sys/netinet/tcp_stacks/rack.c
@@ -9200,12 +9200,14 @@
sendalot = 1;
} else {
- if (optlen + ipoptlen > tp->t_maxseg) {
+ if (optlen + ipoptlen >= tp->t_maxseg) {
/*
* Since we don't have enough space to put
* the IP header chain and the TCP header in
* one packet as required by RFC 7112, don't
- * send it.
+ * send it. Also ensure that at least one
+ * byte of the payload can be put into the
+ * TCP segment.
*/
SOCKBUF_UNLOCK(&so->so_snd);
error = EMSGSIZE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 10:38 AM (12 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30960374
Default Alt Text
D21665.id.diff (2 KB)
Attached To
Mode
D21665: Don't send TCP segments when the IP header chain and the TCP header doesn't fit in a packet
Attached
Detach File
Event Timeline
Log In to Comment