Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140089143
D45076.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45076.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
@@ -3530,7 +3530,6 @@
if (tp->t_flags & TF_SACK_PERMIT)
optlen += PADTCPOLEN(TCPOLEN_SACK_PERMITTED);
}
-#undef PAD
optlen = min(optlen, TCP_MAXOLEN);
return (tp->t_maxseg - optlen);
}
@@ -3552,7 +3551,6 @@
* for cc modules to figure out what the modulo of the
* cwnd should be.
*/
-#define PAD(len) ((((len) / 4) + !!((len) % 4)) * 4)
if (TCPS_HAVEESTABLISHED(tp->t_state)) {
if (tp->t_flags & TF_RCVD_TSTMP)
optlen = TCPOLEN_TSTAMP_APPA;
@@ -3560,23 +3558,22 @@
optlen = 0;
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
if (tp->t_flags & TF_SIGNATURE)
- optlen += PAD(TCPOLEN_SIGNATURE);
+ optlen += PADTCPOLEN(TCPOLEN_SIGNATURE);
#endif
} else {
if (tp->t_flags & TF_REQ_TSTMP)
optlen = TCPOLEN_TSTAMP_APPA;
else
- optlen = PAD(TCPOLEN_MAXSEG);
+ optlen = PADTCPOLEN(TCPOLEN_MAXSEG);
if (tp->t_flags & TF_REQ_SCALE)
- optlen += PAD(TCPOLEN_WINDOW);
+ optlen += PADTCPOLEN(TCPOLEN_WINDOW);
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
if (tp->t_flags & TF_SIGNATURE)
- optlen += PAD(TCPOLEN_SIGNATURE);
+ optlen += PADTCPOLEN(TCPOLEN_SIGNATURE);
#endif
if (tp->t_flags & TF_SACK_PERMIT)
- optlen += PAD(TCPOLEN_SACK_PERMITTED);
+ optlen += PADTCPOLEN(TCPOLEN_SACK_PERMITTED);
}
-#undef PAD
optlen = min(optlen, TCP_MAXOLEN);
return (tp->t_maxseg - optlen);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 2:22 AM (3 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27105158
Default Alt Text
D45076.id.diff (1 KB)
Attached To
Mode
D45076: tcp: clean up macro useage in tcp_fixed_maxseg()
Attached
Detach File
Event Timeline
Log In to Comment