aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2021-10-15 16:05:51 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-16 08:46:08 +0100
commit72bcbc46a5c385961b9c167db79ad1f38f04e6a7 (patch)
tree7da655849e7ce9d0667b2c39f76e51153fb217ee /net/mptcp
parentmptcp: Avoid NULL dereference in mptcp_getsockopt_subflow_addrs() (diff)
downloadlinux-dev-72bcbc46a5c385961b9c167db79ad1f38f04e6a7.tar.xz
linux-dev-72bcbc46a5c385961b9c167db79ad1f38f04e6a7.zip
mptcp: increase default max additional subflows to 2
The current default does not allowing additional subflows, mostly as a safety restriction to avoid uncontrolled resource consumption on busy servers. Still the system admin and/or the application have to opt-in to MPTCP explicitly. After that, they need to change (increase) the default maximum number of additional subflows. Let set that to reasonable default, and make end-users life easier. Additionally we need to update some self-tests accordingly. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r--net/mptcp/pm_netlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 050eea231528..f7d33a9abd57 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -2052,6 +2052,9 @@ static int __net_init pm_nl_init_net(struct net *net)
struct pm_nl_pernet *pernet = net_generic(net, pm_nl_pernet_id);
INIT_LIST_HEAD_RCU(&pernet->local_addr_list);
+
+ /* Cit. 2 subflows ought to be enough for anybody. */
+ pernet->subflows_max = 2;
pernet->next_id = 1;
pernet->stale_loss_cnt = 4;
spin_lock_init(&pernet->lock);