Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177747794
D60460.1795192246.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
637 B
Referenced Files
None
Subscribers
None
D60460.1795192246.diff
View Options
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -3797,9 +3797,12 @@
optlen += PADTCPOLEN(TCPOLEN_SIGNATURE);
#endif
if ((tp->t_flags & TF_SACK_PERMIT) && tp->rcv_numsacks > 0) {
- optlen += TCPOLEN_SACKHDR;
- optlen += tp->rcv_numsacks * TCPOLEN_SACK;
- optlen = PADTCPOLEN(optlen);
+ u_int sackblks;
+
+ sackblks = min(tp->rcv_numsacks, (TCP_MAXOLEN - optlen -
+ PADTCPOLEN(TCPOLEN_SACKHDR)) / TCPOLEN_SACK);
+ optlen += PADTCPOLEN(TCPOLEN_SACKHDR +
+ sackblks * TCPOLEN_SACK);
}
} else {
if (tp->t_flags & TF_REQ_TSTMP)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 20, 4:30 PM (14 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41731833
Default Alt Text
D60460.1795192246.diff (637 B)
Attached To
Mode
D60460: tcp: count only the SACK blocks that fit in tcp_maxseg()
Attached
Detach File
Event Timeline