Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175804551
D60460.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
637 B
Referenced Files
None
Subscribers
None
D60460.id.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
@@ -3804,9 +3804,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
Wed, Oct 14, 12:10 PM (12 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40563220
Default Alt Text
D60460.id.diff (637 B)
Attached To
Mode
D60460: tcp: count only the SACK blocks that fit in tcp_maxseg()
Attached
Detach File
Event Timeline
Log In to Comment