diff options
Diffstat (limited to 'net/dccp/sysctl.c')
-rw-r--r-- | net/dccp/sysctl.c | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index a5a1856234e7..21295993fdb8 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
@@ -18,72 +18,76 @@ | |||
18 | #error This file should not be compiled without CONFIG_SYSCTL defined | 18 | #error This file should not be compiled without CONFIG_SYSCTL defined |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* Boundary values */ | ||
22 | static int zero = 0, | ||
23 | u8_max = 0xFF; | ||
24 | static unsigned long seqw_min = 32; | ||
25 | |||
26 | static struct ctl_table dccp_default_table[] = { | 21 | static struct ctl_table dccp_default_table[] = { |
27 | { | 22 | { |
28 | .procname = "seq_window", | 23 | .procname = "seq_window", |
29 | .data = &sysctl_dccp_sequence_window, | 24 | .data = &sysctl_dccp_feat_sequence_window, |
30 | .maxlen = sizeof(sysctl_dccp_sequence_window), | 25 | .maxlen = sizeof(sysctl_dccp_feat_sequence_window), |
31 | .mode = 0644, | 26 | .mode = 0644, |
32 | .proc_handler = proc_doulongvec_minmax, | 27 | .proc_handler = proc_dointvec, |
33 | .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */ | ||
34 | }, | 28 | }, |
35 | { | 29 | { |
36 | .procname = "rx_ccid", | 30 | .procname = "rx_ccid", |
37 | .data = &sysctl_dccp_rx_ccid, | 31 | .data = &sysctl_dccp_feat_rx_ccid, |
38 | .maxlen = sizeof(sysctl_dccp_rx_ccid), | 32 | .maxlen = sizeof(sysctl_dccp_feat_rx_ccid), |
39 | .mode = 0644, | 33 | .mode = 0644, |
40 | .proc_handler = proc_dointvec_minmax, | 34 | .proc_handler = proc_dointvec, |
41 | .extra1 = &zero, | ||
42 | .extra2 = &u8_max, /* RFC 4340, 10. */ | ||
43 | }, | 35 | }, |
44 | { | 36 | { |
45 | .procname = "tx_ccid", | 37 | .procname = "tx_ccid", |
46 | .data = &sysctl_dccp_tx_ccid, | 38 | .data = &sysctl_dccp_feat_tx_ccid, |
47 | .maxlen = sizeof(sysctl_dccp_tx_ccid), | 39 | .maxlen = sizeof(sysctl_dccp_feat_tx_ccid), |
40 | .mode = 0644, | ||
41 | .proc_handler = proc_dointvec, | ||
42 | }, | ||
43 | { | ||
44 | .procname = "ack_ratio", | ||
45 | .data = &sysctl_dccp_feat_ack_ratio, | ||
46 | .maxlen = sizeof(sysctl_dccp_feat_ack_ratio), | ||
47 | .mode = 0644, | ||
48 | .proc_handler = proc_dointvec, | ||
49 | }, | ||
50 | { | ||
51 | .procname = "send_ackvec", | ||
52 | .data = &sysctl_dccp_feat_send_ack_vector, | ||
53 | .maxlen = sizeof(sysctl_dccp_feat_send_ack_vector), | ||
54 | .mode = 0644, | ||
55 | .proc_handler = proc_dointvec, | ||
56 | }, | ||
57 | { | ||
58 | .procname = "send_ndp", | ||
59 | .data = &sysctl_dccp_feat_send_ndp_count, | ||
60 | .maxlen = sizeof(sysctl_dccp_feat_send_ndp_count), | ||
48 | .mode = 0644, | 61 | .mode = 0644, |
49 | .proc_handler = proc_dointvec_minmax, | 62 | .proc_handler = proc_dointvec, |
50 | .extra1 = &zero, | ||
51 | .extra2 = &u8_max, /* RFC 4340, 10. */ | ||
52 | }, | 63 | }, |
53 | { | 64 | { |
54 | .procname = "request_retries", | 65 | .procname = "request_retries", |
55 | .data = &sysctl_dccp_request_retries, | 66 | .data = &sysctl_dccp_request_retries, |
56 | .maxlen = sizeof(sysctl_dccp_request_retries), | 67 | .maxlen = sizeof(sysctl_dccp_request_retries), |
57 | .mode = 0644, | 68 | .mode = 0644, |
58 | .proc_handler = proc_dointvec_minmax, | 69 | .proc_handler = proc_dointvec, |
59 | .extra1 = &zero, | ||
60 | .extra2 = &u8_max, | ||
61 | }, | 70 | }, |
62 | { | 71 | { |
63 | .procname = "retries1", | 72 | .procname = "retries1", |
64 | .data = &sysctl_dccp_retries1, | 73 | .data = &sysctl_dccp_retries1, |
65 | .maxlen = sizeof(sysctl_dccp_retries1), | 74 | .maxlen = sizeof(sysctl_dccp_retries1), |
66 | .mode = 0644, | 75 | .mode = 0644, |
67 | .proc_handler = proc_dointvec_minmax, | 76 | .proc_handler = proc_dointvec, |
68 | .extra1 = &zero, | ||
69 | .extra2 = &u8_max, | ||
70 | }, | 77 | }, |
71 | { | 78 | { |
72 | .procname = "retries2", | 79 | .procname = "retries2", |
73 | .data = &sysctl_dccp_retries2, | 80 | .data = &sysctl_dccp_retries2, |
74 | .maxlen = sizeof(sysctl_dccp_retries2), | 81 | .maxlen = sizeof(sysctl_dccp_retries2), |
75 | .mode = 0644, | 82 | .mode = 0644, |
76 | .proc_handler = proc_dointvec_minmax, | 83 | .proc_handler = proc_dointvec, |
77 | .extra1 = &zero, | ||
78 | .extra2 = &u8_max, | ||
79 | }, | 84 | }, |
80 | { | 85 | { |
81 | .procname = "tx_qlen", | 86 | .procname = "tx_qlen", |
82 | .data = &sysctl_dccp_tx_qlen, | 87 | .data = &sysctl_dccp_tx_qlen, |
83 | .maxlen = sizeof(sysctl_dccp_tx_qlen), | 88 | .maxlen = sizeof(sysctl_dccp_tx_qlen), |
84 | .mode = 0644, | 89 | .mode = 0644, |
85 | .proc_handler = proc_dointvec_minmax, | 90 | .proc_handler = proc_dointvec, |
86 | .extra1 = &zero, | ||
87 | }, | 91 | }, |
88 | { | 92 | { |
89 | .procname = "sync_ratelimit", | 93 | .procname = "sync_ratelimit", |