arm64: dts: rockchip: add tsadc's working clock rate for rk3288
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / sysctl_net_ipv6.c
index 53a9f5a64536fd7b55199b17b323a76d80841049..45243bbe52536d523a7aff0b636a72b8f2e3daf5 100644 (file)
 #include <net/addrconf.h>
 #include <net/inet_frag.h>
 
-static ctl_table ipv6_table_template[] = {
+static int one = 1;
+static int auto_flowlabels_min;
+static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
+
+
+static struct ctl_table ipv6_table_template[] = {
        {
                .procname       = "bindv6only",
                .data           = &init_net.ipv6.sysctl.bindv6only,
@@ -24,6 +29,29 @@ static ctl_table ipv6_table_template[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
+       {
+               .procname       = "anycast_src_echo_reply",
+               .data           = &init_net.ipv6.sysctl.anycast_src_echo_reply,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
+       },
+       {
+               .procname       = "flowlabel_consistency",
+               .data           = &init_net.ipv6.sysctl.flowlabel_consistency,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
+       },
+       {
+               .procname       = "auto_flowlabels",
+               .data           = &init_net.ipv6.sysctl.auto_flowlabels,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &auto_flowlabels_min,
+               .extra2         = &auto_flowlabels_max
+       },
        {
                .procname       = "fwmark_reflect",
                .data           = &init_net.ipv6.sysctl.fwmark_reflect,
@@ -31,10 +59,38 @@ static ctl_table ipv6_table_template[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
+       {
+               .procname       = "idgen_retries",
+               .data           = &init_net.ipv6.sysctl.idgen_retries,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+       {
+               .procname       = "idgen_delay",
+               .data           = &init_net.ipv6.sysctl.idgen_delay,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_jiffies,
+       },
+       {
+               .procname       = "flowlabel_state_ranges",
+               .data           = &init_net.ipv6.sysctl.flowlabel_state_ranges,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
+       },
+       {
+               .procname       = "ip_nonlocal_bind",
+               .data           = &init_net.ipv6.sysctl.ip_nonlocal_bind,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
+       },
        { }
 };
 
-static ctl_table ipv6_rotable[] = {
+static struct ctl_table ipv6_rotable[] = {
        {
                .procname       = "mld_max_msf",
                .data           = &sysctl_mld_max_msf,
@@ -42,6 +98,14 @@ static ctl_table ipv6_rotable[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
+       {
+               .procname       = "mld_qrv",
+               .data           = &sysctl_mld_qrv,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &one
+       },
        { }
 };
 
@@ -58,6 +122,14 @@ static int __net_init ipv6_sysctl_net_init(struct net *net)
        if (!ipv6_table)
                goto out;
        ipv6_table[0].data = &net->ipv6.sysctl.bindv6only;
+       ipv6_table[1].data = &net->ipv6.sysctl.anycast_src_echo_reply;
+       ipv6_table[2].data = &net->ipv6.sysctl.flowlabel_consistency;
+       ipv6_table[3].data = &net->ipv6.sysctl.auto_flowlabels;
+       ipv6_table[4].data = &net->ipv6.sysctl.fwmark_reflect;
+       ipv6_table[5].data = &net->ipv6.sysctl.idgen_retries;
+       ipv6_table[6].data = &net->ipv6.sysctl.idgen_delay;
+       ipv6_table[7].data = &net->ipv6.sysctl.flowlabel_state_ranges;
+       ipv6_table[8].data = &net->ipv6.sysctl.ip_nonlocal_bind;
 
        ipv6_route_table = ipv6_route_sysctl_init(net);
        if (!ipv6_route_table)
@@ -128,7 +200,7 @@ int ipv6_sysctl_register(void)
        int err = -ENOMEM;
 
        ip6_header = register_net_sysctl(&init_net, "net/ipv6", ipv6_rotable);
-       if (ip6_header == NULL)
+       if (!ip6_header)
                goto out;
 
        err = register_pernet_subsys(&ipv6_sysctl_net_ops);