]> err.no Git - linux-2.6/blobdiff - net/ipv4/sysctl_net_ipv4.c
[ARP]: Minus one level of ndentation in arp_req_delete
[linux-2.6] / net / ipv4 / sysctl_net_ipv4.c
index bfd0dec6238d419b17f6d59a08f88e132307fb41..844f26fab06f9b06e4dde166c299a1acf299921e 100644 (file)
@@ -27,62 +27,6 @@ static int tcp_retr1_max = 255;
 static int ip_local_port_range_min[] = { 1, 1 };
 static int ip_local_port_range_max[] = { 65535, 65535 };
 
-static
-int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
-                       void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-       int val = IPV4_DEVCONF_ALL(FORWARDING);
-       int ret;
-
-       ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
-
-       if (write && IPV4_DEVCONF_ALL(FORWARDING) != val)
-               inet_forward_change();
-
-       return ret;
-}
-
-static int ipv4_sysctl_forward_strategy(ctl_table *table,
-                        int __user *name, int nlen,
-                        void __user *oldval, size_t __user *oldlenp,
-                        void __user *newval, size_t newlen)
-{
-       int *valp = table->data;
-       int new;
-
-       if (!newval || !newlen)
-               return 0;
-
-       if (newlen != sizeof(int))
-               return -EINVAL;
-
-       if (get_user(new, (int __user *)newval))
-               return -EFAULT;
-
-       if (new == *valp)
-               return 0;
-
-       if (oldval && oldlenp) {
-               size_t len;
-
-               if (get_user(len, oldlenp))
-                       return -EFAULT;
-
-               if (len) {
-                       if (len > table->maxlen)
-                               len = table->maxlen;
-                       if (copy_to_user(oldval, valp, len))
-                               return -EFAULT;
-                       if (put_user(len, oldlenp))
-                               return -EFAULT;
-               }
-       }
-
-       *valp = new;
-       inet_forward_change();
-       return 1;
-}
-
 extern seqlock_t sysctl_port_range_lock;
 extern int sysctl_local_port_range[2];
 
@@ -281,15 +225,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec
        },
-       {
-               .ctl_name       = NET_IPV4_FORWARD,
-               .procname       = "ip_forward",
-               .data           = &IPV4_DEVCONF_ALL(FORWARDING),
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &ipv4_sysctl_forward,
-               .strategy       = &ipv4_sysctl_forward_strategy
-       },
        {
                .ctl_name       = NET_IPV4_DEFAULT_TTL,
                .procname       = "ip_default_ttl",