]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/sysctl_net_ipv4.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[net-next-2.6.git] / net / ipv4 / sysctl_net_ipv4.c
index 1cd5c15174b8a0f286fd9d7a92100841dd341ecd..e91911d7aae26656f940a747a6d0ccb91739f39a 100644 (file)
@@ -299,6 +299,13 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = ipv4_local_port_range,
        },
+       {
+               .procname       = "ip_local_reserved_ports",
+               .data           = NULL, /* initialized in sysctl_ipv4_init */
+               .maxlen         = 65536,
+               .mode           = 0644,
+               .proc_handler   = proc_do_large_bitmap,
+       },
 #ifdef CONFIG_IP_MULTICAST
        {
                .procname       = "igmp_max_memberships",
@@ -391,7 +398,7 @@ static struct ctl_table ipv4_table[] = {
                .data           = &sysctl_tcp_mem,
                .maxlen         = sizeof(sysctl_tcp_mem),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec
+               .proc_handler   = proc_doulongvec_minmax
        },
        {
                .procname       = "tcp_wmem",
@@ -595,8 +602,7 @@ static struct ctl_table ipv4_table[] = {
                .data           = &sysctl_udp_mem,
                .maxlen         = sizeof(sysctl_udp_mem),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero
+               .proc_handler   = proc_doulongvec_minmax,
        },
        {
                .procname       = "udp_rmem_min",
@@ -736,6 +742,16 @@ static __net_initdata struct pernet_operations ipv4_sysctl_ops = {
 static __init int sysctl_ipv4_init(void)
 {
        struct ctl_table_header *hdr;
+       struct ctl_table *i;
+
+       for (i = ipv4_table; i->procname; i++) {
+               if (strcmp(i->procname, "ip_local_reserved_ports") == 0) {
+                       i->data = sysctl_local_reserved_ports;
+                       break;
+               }
+       }
+       if (!i->procname)
+               return -EINVAL;
 
        hdr = register_sysctl_paths(net_ipv4_ctl_path, ipv4_table);
        if (hdr == NULL)