aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/cc/cc.h
diff options
context:
space:
mode:
authorSean Bruno <sbruno@FreeBSD.org>2018-03-26 19:53:36 +0000
committerSean Bruno <sbruno@FreeBSD.org>2018-03-26 19:53:36 +0000
commite2041bfa7c15f9d23a69a3a3dc5a66299f33b204 (patch)
treeb7de9316b7ad36acfac022fe295e47920438d3ce /sys/netinet/cc/cc.h
parent7953f98e235666fa9d085d042fa9579bc662b65b (diff)
downloadsrc-e2041bfa7c15f9d23a69a3a3dc5a66299f33b204.tar.gz
src-e2041bfa7c15f9d23a69a3a3dc5a66299f33b204.zip
CC Cubic: fix underflow for cubic_cwnd()
Singed calculations in cubic_cwnd() can result in negative cwnd value which is then cast to an unsigned value. Values less than 1 mss are generally bad for other parts of the code, also fixed. Submitted by: Jason Eggleston <jason@eggnet.com> Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D14141
Notes
Notes: svn path=/head/; revision=331567
Diffstat (limited to 'sys/netinet/cc/cc.h')
-rw-r--r--sys/netinet/cc/cc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/cc/cc.h b/sys/netinet/cc/cc.h
index 7f16a7cbf046..1389b27a335b 100644
--- a/sys/netinet/cc/cc.h
+++ b/sys/netinet/cc/cc.h
@@ -102,6 +102,8 @@ struct cc_var {
#define CCF_ACKNOW 0x0008 /* Will this ack be sent now? */
#define CCF_IPHDR_CE 0x0010 /* Does this packet set CE bit? */
#define CCF_TCPHDR_CWR 0x0020 /* Does this packet set CWR bit? */
+#define CCF_MAX_CWND 0x0040 /* Have we reached maximum cwnd? */
+#define CCF_CHG_MAX_CWND 0x0080 /* Cubic max_cwnd changed, for K */
/* ACK types passed to the ack_received() hook. */
#define CC_ACK 0x0001 /* Regular in sequence ACK. */