ipv4: Namespacify ip_dynaddr sysctl knob
[deliverable/linux.git] / net / ipv4 / sysctl_net_ipv4.c
index a833a9f9e4cd35cea2d5215504dfa159cd10034b..04ac5b763385144b392ba30e868ce1e04b9e7867 100644 (file)
@@ -303,13 +303,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
-       {
-               .procname       = "ip_dynaddr",
-               .data           = &sysctl_ip_dynaddr,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec
-       },
        {
                .procname       = "tcp_fastopen",
                .data           = &sysctl_tcp_fastopen,
@@ -743,6 +736,13 @@ static struct ctl_table ipv4_net_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
+       {
+               .procname       = "ip_dynaddr",
+               .data           = &init_net.ipv4.sysctl_ip_dynaddr,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
+       },
        {
                .procname       = "ip_default_ttl",
                .data           = &init_net.ipv4.sysctl_ip_default_ttl,
@@ -989,6 +989,7 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
                goto err_ports;
 
        net->ipv4.sysctl_ip_default_ttl = IPDEFTTL;
+       net->ipv4.sysctl_ip_dynaddr = 0;
 
        return 0;
 
This page took 0.027331 seconds and 5 git commands to generate.