mirror of
https://github.com/opnsense/src.git
synced 2026-03-29 14:13:11 -04:00
tcp: Ensure that vnets have an initialized V_default_cc_ptr
This causes new vnets to inherit the cc algorithm from vnet0. This is a
temporary patch to fix vnet jail creation.
With encouragement from: glebius
Fixes: b8d60729de ("tcp: Congestion control cleanup.")
Differential Revision: https://reviews.freebsd.org/D32970
This commit is contained in:
parent
7e3c9ec906
commit
034a924009
1 changed files with 17 additions and 0 deletions
|
|
@ -316,6 +316,23 @@ cc_register_algo(struct cc_algo *add_cc)
|
|||
return (err);
|
||||
}
|
||||
|
||||
static void
|
||||
vnet_cc_sysinit(void *arg)
|
||||
{
|
||||
struct cc_algo *cc;
|
||||
|
||||
if (IS_DEFAULT_VNET(curvnet))
|
||||
return;
|
||||
|
||||
CURVNET_SET(vnet0);
|
||||
cc = V_default_cc_ptr;
|
||||
CURVNET_RESTORE();
|
||||
|
||||
V_default_cc_ptr = cc;
|
||||
}
|
||||
VNET_SYSINIT(vnet_cc_sysinit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
|
||||
vnet_cc_sysinit, NULL);
|
||||
|
||||
/*
|
||||
* Perform any necessary tasks before we exit congestion recovery.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue