ipv4: Namespecify tcp_keepalive_probes sysctl knob
[cascardo/linux.git] / net / ipv4 / sysctl_net_ipv4.c
index 25300c5..e99fbb7 100644 (file)
@@ -48,14 +48,14 @@ static void set_local_port_range(struct net *net, int range[2])
 {
        bool same_parity = !((range[0] ^ range[1]) & 1);
 
-       write_seqlock(&net->ipv4.ip_local_ports.lock);
+       write_seqlock_bh(&net->ipv4.ip_local_ports.lock);
        if (same_parity && !net->ipv4.ip_local_ports.warned) {
                net->ipv4.ip_local_ports.warned = true;
                pr_err_ratelimited("ip_local_port_range: prefer different parity for start/end values.\n");
        }
        net->ipv4.ip_local_ports.range[0] = range[0];
        net->ipv4.ip_local_ports.range[1] = range[1];
-       write_sequnlock(&net->ipv4.ip_local_ports.lock);
+       write_sequnlock_bh(&net->ipv4.ip_local_ports.lock);
 }
 
 /* Validate changes from /proc interface. */
@@ -336,20 +336,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
-       {
-               .procname       = "tcp_keepalive_time",
-               .data           = &sysctl_tcp_keepalive_time,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec_jiffies,
-       },
-       {
-               .procname       = "tcp_keepalive_probes",
-               .data           = &sysctl_tcp_keepalive_probes,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec
-       },
        {
                .procname       = "tcp_keepalive_intvl",
                .data           = &sysctl_tcp_keepalive_intvl,
@@ -915,6 +901,17 @@ static struct ctl_table ipv4_net_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
        },
+#ifdef CONFIG_NET_L3_MASTER_DEV
+       {
+               .procname       = "tcp_l3mdev_accept",
+               .data           = &init_net.ipv4.sysctl_tcp_l3mdev_accept,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &zero,
+               .extra2         = &one,
+       },
+#endif
        {
                .procname       = "tcp_mtu_probing",
                .data           = &init_net.ipv4.sysctl_tcp_mtu_probing,
@@ -950,6 +947,20 @@ static struct ctl_table ipv4_net_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
+       {
+               .procname       = "tcp_keepalive_time",
+               .data           = &init_net.ipv4.sysctl_tcp_keepalive_time,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_jiffies,
+       },
+       {
+               .procname       = "tcp_keepalive_probes",
+               .data           = &init_net.ipv4.sysctl_tcp_keepalive_probes,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
+       },
        { }
 };