netfilter: conntrack: convert sysctls to u8
[linux-2.6-microblaze.git] / net / netfilter / nf_conntrack_standalone.c
index fb89f6e..fe99605 100644 (file)
@@ -522,10 +522,6 @@ EXPORT_SYMBOL_GPL(nf_conntrack_count);
 /* Sysctl support */
 
 #ifdef CONFIG_SYSCTL
-/* Log invalid packets of a given protocol */
-static int log_invalid_proto_min __read_mostly;
-static int log_invalid_proto_max __read_mostly = 255;
-
 /* size the user *wants to set */
 static unsigned int nf_conntrack_htable_size_user __read_mostly;
 
@@ -640,20 +636,18 @@ static struct ctl_table nf_ct_sysctl_table[] = {
        [NF_SYSCTL_CT_CHECKSUM] = {
                .procname       = "nf_conntrack_checksum",
                .data           = &init_net.ct.sysctl_checksum,
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },
        [NF_SYSCTL_CT_LOG_INVALID] = {
                .procname       = "nf_conntrack_log_invalid",
                .data           = &init_net.ct.sysctl_log_invalid,
-               .maxlen         = sizeof(unsigned int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &log_invalid_proto_min,
-               .extra2         = &log_invalid_proto_max,
+               .proc_handler   = proc_dou8vec_minmax,
        },
        [NF_SYSCTL_CT_EXPECT_MAX] = {
                .procname       = "nf_conntrack_expect_max",
@@ -665,9 +659,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
        [NF_SYSCTL_CT_ACCT] = {
                .procname       = "nf_conntrack_acct",
                .data           = &init_net.ct.sysctl_acct,
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },
@@ -683,9 +677,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
        [NF_SYSCTL_CT_EVENTS] = {
                .procname       = "nf_conntrack_events",
                .data           = &init_net.ct.sysctl_events,
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },
@@ -694,9 +688,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
        [NF_SYSCTL_CT_TIMESTAMP] = {
                .procname       = "nf_conntrack_timestamp",
                .data           = &init_net.ct.sysctl_tstamp,
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },
@@ -769,25 +763,25 @@ static struct ctl_table nf_ct_sysctl_table[] = {
        },
        [NF_SYSCTL_CT_PROTO_TCP_LOOSE] = {
                .procname       = "nf_conntrack_tcp_loose",
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },
        [NF_SYSCTL_CT_PROTO_TCP_LIBERAL] = {
                .procname       = "nf_conntrack_tcp_be_liberal",
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },
        [NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS] = {
                .procname       = "nf_conntrack_tcp_max_retrans",
-               .maxlen         = sizeof(unsigned int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = proc_dou8vec_minmax,
        },
        [NF_SYSCTL_CT_PROTO_TIMEOUT_UDP] = {
                .procname       = "nf_conntrack_udp_timeout",
@@ -914,9 +908,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
        },
        [NF_SYSCTL_CT_PROTO_DCCP_LOOSE] = {
                .procname       = "nf_conntrack_dccp_loose",
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE,
        },