Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102671172
D46143.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
915 B
Referenced Files
None
Subscribers
None
D46143.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
@@ -2259,11 +2259,20 @@
KASSERT((tp->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) == 0,
("tcp_newtcpcb: using TFB being removed"));
rw_runlock(&tcp_function_lock);
- /*
- * Use the current system default CC algorithm.
- */
- cc_attach(tp, CC_DEFAULT_ALGO());
-
+ CC_LIST_RLOCK();
+ if (listening_tcb != NULL) {
+ if (CC_ALGO(listening_tcb)->flags & CC_MODULE_BEING_REMOVED) {
+ CC_LIST_RUNLOCK();
+ if (tp->t_fb->tfb_tcp_fb_fini)
+ (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1);
+ refcount_release(&tp->t_fb->tfb_refcnt);
+ return (NULL);
+ }
+ CC_ALGO(tp) = CC_ALGO(listening_tcb);
+ } else
+ CC_ALGO(tp) = CC_DEFAULT_ALGO();
+ cc_refer(CC_ALGO(tp));
+ CC_LIST_RUNLOCK();
if (CC_ALGO(tp)->cb_init != NULL)
if (CC_ALGO(tp)->cb_init(&tp->t_ccv, NULL) > 0) {
cc_detach(tp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 3:52 PM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660916
Default Alt Text
D46143.diff (915 B)
Attached To
Mode
D46143: tcp: inherit CC algorithm from listener
Attached
Detach File
Event Timeline
Log In to Comment