|
@@ -315,6 +315,25 @@ out_undo:
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int __net_init net_defaults_init_net(struct net *net)
|
|
|
|
+{
|
|
|
|
+ net->core.sysctl_somaxconn = SOMAXCONN;
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static struct pernet_operations net_defaults_ops = {
|
|
|
|
+ .init = net_defaults_init_net,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static __init int net_defaults_init(void)
|
|
|
|
+{
|
|
|
|
+ if (register_pernet_subsys(&net_defaults_ops))
|
|
|
|
+ panic("Cannot initialize net default settings");
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+core_initcall(net_defaults_init);
|
|
|
|
|
|
#ifdef CONFIG_NET_NS
|
|
#ifdef CONFIG_NET_NS
|
|
static struct ucounts *inc_net_namespaces(struct user_namespace *ns)
|
|
static struct ucounts *inc_net_namespaces(struct user_namespace *ns)
|