Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108119562
D30470.id89925.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
843 B
Referenced Files
None
Subscribers
None
D30470.id89925.diff
View Options
diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c
--- a/sys/netinet/cc/cc_newreno.c
+++ b/sys/netinet/cc/cc_newreno.c
@@ -239,7 +239,12 @@
cwin = CCV(ccv, snd_cwnd);
mss = tcp_fixed_maxseg(ccv->ccvc.tcp);
- nreno = ccv->cc_data;
+ /*
+ * Other TCP congestion controls use newreno_cong_signal(), but
+ * with their own private cc_data. Make sure the cc_data is used
+ * correctly.
+ */
+ nreno = (CC_ALGO(ccv->ccvc.tcp) == &newreno_cc_algo) ? ccv->cc_data : NULL;
beta = (nreno == NULL) ? V_newreno_beta : nreno->beta;
beta_ecn = (nreno == NULL) ? V_newreno_beta_ecn : nreno->beta_ecn;
@@ -336,6 +341,9 @@
if (sopt->sopt_valsize != sizeof(struct cc_newreno_opts))
return (EMSGSIZE);
+ if (CC_ALGO(ccv->ccvc.tcp) != &newreno_cc_algo)
+ return (ENOPROTOOPT);
+
nreno = ccv->cc_data;
opt = buf;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 22, 2:26 PM (13 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16030940
Default Alt Text
D30470.id89925.diff (843 B)
Attached To
Mode
D30470: tcp: Use local CC data only in correct context
Attached
Detach File
Event Timeline
Log In to Comment