net/mlx4_en: Fix mixed PFC and Global pause user control requests
[pandora-kernel.git] / net / core / sysctl_net_core.c
index f0bdd36..f9496c4 100644 (file)
@@ -21,6 +21,8 @@
 
 static int zero = 0;
 static int ushort_max = USHRT_MAX;
+static int min_sndbuf = SOCK_MIN_SNDBUF;
+static int min_rcvbuf = SOCK_MIN_RCVBUF;
 
 #ifdef CONFIG_RPS
 static int rps_sock_flow_sysctl(ctl_table *table, int write,
@@ -89,28 +91,32 @@ static struct ctl_table net_core_table[] = {
                .data           = &sysctl_wmem_max,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &min_sndbuf,
        },
        {
                .procname       = "rmem_max",
                .data           = &sysctl_rmem_max,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &min_rcvbuf,
        },
        {
                .procname       = "wmem_default",
                .data           = &sysctl_wmem_default,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &min_sndbuf,
        },
        {
                .procname       = "rmem_default",
                .data           = &sysctl_rmem_default,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &min_rcvbuf,
        },
        {
                .procname       = "dev_weight",