]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/sysctl_net_ipv4.c
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[~andy/linux] / net / ipv4 / sysctl_net_ipv4.c
index 844f26fab06f9b06e4dde166c299a1acf299921e..88286f35d1e266ec6aad248c5328d17891cdcc0c 100644 (file)
@@ -19,6 +19,7 @@
 #include <net/ip.h>
 #include <net/route.h>
 #include <net/tcp.h>
+#include <net/udp.h>
 #include <net/cipso_ipv4.h>
 #include <net/inet_frag.h>
 
@@ -184,7 +185,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam
 
        tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
        ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
-       if (ret == 0 && newval && newlen)
+       if (ret == 1 && newval && newlen)
                ret = tcp_set_allowed_congestion_control(tbl.data);
        kfree(tbl.data);
 
@@ -282,22 +283,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec
        },
-       {
-               .ctl_name       = NET_IPV4_IPFRAG_HIGH_THRESH,
-               .procname       = "ipfrag_high_thresh",
-               .data           = &ip4_frags_ctl.high_thresh,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               .ctl_name       = NET_IPV4_IPFRAG_LOW_THRESH,
-               .procname       = "ipfrag_low_thresh",
-               .data           = &ip4_frags_ctl.low_thresh,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
        {
                .ctl_name       = NET_IPV4_DYNADDR,
                .procname       = "ip_dynaddr",
@@ -306,15 +291,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec
        },
-       {
-               .ctl_name       = NET_IPV4_IPFRAG_TIME,
-               .procname       = "ipfrag_time",
-               .data           = &ip4_frags_ctl.timeout,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec_jiffies,
-               .strategy       = &sysctl_jiffies
-       },
        {
                .ctl_name       = NET_IPV4_TCP_KEEPALIVE_TIME,
                .procname       = "tcp_keepalive_time",
@@ -657,23 +633,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec
        },
-       {
-               .ctl_name       = NET_IPV4_IPFRAG_SECRET_INTERVAL,
-               .procname       = "ipfrag_secret_interval",
-               .data           = &ip4_frags_ctl.secret_interval,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec_jiffies,
-               .strategy       = &sysctl_jiffies
-       },
-       {
-               .procname       = "ipfrag_max_dist",
-               .data           = &sysctl_ipfrag_max_dist,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec_minmax,
-               .extra1         = &zero
-       },
        {
                .ctl_name       = NET_TCP_NO_METRICS_SAVE,
                .procname       = "tcp_no_metrics_save",
@@ -812,20 +771,51 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "udp_mem",
+               .data           = &sysctl_udp_mem,
+               .maxlen         = sizeof(sysctl_udp_mem),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &zero
+       },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "udp_rmem_min",
+               .data           = &sysctl_udp_rmem_min,
+               .maxlen         = sizeof(sysctl_udp_rmem_min),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &zero
+       },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "udp_wmem_min",
+               .data           = &sysctl_udp_wmem_min,
+               .maxlen         = sizeof(sysctl_udp_wmem_min),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &zero
+       },
        { .ctl_name = 0 }
 };
 
-static __initdata struct ctl_path net_ipv4_path[] = {
+struct ctl_path net_ipv4_ctl_path[] = {
        { .procname = "net", .ctl_name = CTL_NET, },
        { .procname = "ipv4", .ctl_name = NET_IPV4, },
        { },
 };
+EXPORT_SYMBOL_GPL(net_ipv4_ctl_path);
 
 static __init int sysctl_ipv4_init(void)
 {
        struct ctl_table_header *hdr;
 
-       hdr = register_sysctl_paths(net_ipv4_path, ipv4_table);
+       hdr = register_sysctl_paths(net_ipv4_ctl_path, ipv4_table);
        return hdr == NULL ? -ENOMEM : 0;
 }