diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/devinet.c | 12 | ||||
-rw-r--r-- | net/ipv4/route.c | 7 | ||||
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 16 |
3 files changed, 17 insertions, 18 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 07336c6201f0..e92f1fd28aa5 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1270,10 +1270,10 @@ static void inet_forward_change(struct net *net) | |||
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | static int devinet_conf_proc(ctl_table *ctl, int write, | 1272 | static int devinet_conf_proc(ctl_table *ctl, int write, |
1273 | struct file *filp, void __user *buffer, | 1273 | void __user *buffer, |
1274 | size_t *lenp, loff_t *ppos) | 1274 | size_t *lenp, loff_t *ppos) |
1275 | { | 1275 | { |
1276 | int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1276 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1277 | 1277 | ||
1278 | if (write) { | 1278 | if (write) { |
1279 | struct ipv4_devconf *cnf = ctl->extra1; | 1279 | struct ipv4_devconf *cnf = ctl->extra1; |
@@ -1342,12 +1342,12 @@ static int devinet_conf_sysctl(ctl_table *table, | |||
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | static int devinet_sysctl_forward(ctl_table *ctl, int write, | 1344 | static int devinet_sysctl_forward(ctl_table *ctl, int write, |
1345 | struct file *filp, void __user *buffer, | 1345 | void __user *buffer, |
1346 | size_t *lenp, loff_t *ppos) | 1346 | size_t *lenp, loff_t *ppos) |
1347 | { | 1347 | { |
1348 | int *valp = ctl->data; | 1348 | int *valp = ctl->data; |
1349 | int val = *valp; | 1349 | int val = *valp; |
1350 | int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1350 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1351 | 1351 | ||
1352 | if (write && *valp != val) { | 1352 | if (write && *valp != val) { |
1353 | struct net *net = ctl->extra2; | 1353 | struct net *net = ctl->extra2; |
@@ -1372,12 +1372,12 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, | |||
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | int ipv4_doint_and_flush(ctl_table *ctl, int write, | 1374 | int ipv4_doint_and_flush(ctl_table *ctl, int write, |
1375 | struct file *filp, void __user *buffer, | 1375 | void __user *buffer, |
1376 | size_t *lenp, loff_t *ppos) | 1376 | size_t *lenp, loff_t *ppos) |
1377 | { | 1377 | { |
1378 | int *valp = ctl->data; | 1378 | int *valp = ctl->data; |
1379 | int val = *valp; | 1379 | int val = *valp; |
1380 | int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1380 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1381 | struct net *net = ctl->extra2; | 1381 | struct net *net = ctl->extra2; |
1382 | 1382 | ||
1383 | if (write && *valp != val) | 1383 | if (write && *valp != val) |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index df9347314538..bb4199252026 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -3036,7 +3036,7 @@ void ip_rt_multicast_event(struct in_device *in_dev) | |||
3036 | 3036 | ||
3037 | #ifdef CONFIG_SYSCTL | 3037 | #ifdef CONFIG_SYSCTL |
3038 | static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, | 3038 | static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, |
3039 | struct file *filp, void __user *buffer, | 3039 | void __user *buffer, |
3040 | size_t *lenp, loff_t *ppos) | 3040 | size_t *lenp, loff_t *ppos) |
3041 | { | 3041 | { |
3042 | if (write) { | 3042 | if (write) { |
@@ -3046,7 +3046,7 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, | |||
3046 | 3046 | ||
3047 | memcpy(&ctl, __ctl, sizeof(ctl)); | 3047 | memcpy(&ctl, __ctl, sizeof(ctl)); |
3048 | ctl.data = &flush_delay; | 3048 | ctl.data = &flush_delay; |
3049 | proc_dointvec(&ctl, write, filp, buffer, lenp, ppos); | 3049 | proc_dointvec(&ctl, write, buffer, lenp, ppos); |
3050 | 3050 | ||
3051 | net = (struct net *)__ctl->extra1; | 3051 | net = (struct net *)__ctl->extra1; |
3052 | rt_cache_flush(net, flush_delay); | 3052 | rt_cache_flush(net, flush_delay); |
@@ -3106,12 +3106,11 @@ static void rt_secret_reschedule(int old) | |||
3106 | } | 3106 | } |
3107 | 3107 | ||
3108 | static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, | 3108 | static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, |
3109 | struct file *filp, | ||
3110 | void __user *buffer, size_t *lenp, | 3109 | void __user *buffer, size_t *lenp, |
3111 | loff_t *ppos) | 3110 | loff_t *ppos) |
3112 | { | 3111 | { |
3113 | int old = ip_rt_secret_interval; | 3112 | int old = ip_rt_secret_interval; |
3114 | int ret = proc_dointvec_jiffies(ctl, write, filp, buffer, lenp, ppos); | 3113 | int ret = proc_dointvec_jiffies(ctl, write, buffer, lenp, ppos); |
3115 | 3114 | ||
3116 | rt_secret_reschedule(old); | 3115 | rt_secret_reschedule(old); |
3117 | 3116 | ||
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 4710d219f06a..2dcf04d9b005 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -36,7 +36,7 @@ static void set_local_port_range(int range[2]) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* Validate changes from /proc interface. */ | 38 | /* Validate changes from /proc interface. */ |
39 | static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, | 39 | static int ipv4_local_port_range(ctl_table *table, int write, |
40 | void __user *buffer, | 40 | void __user *buffer, |
41 | size_t *lenp, loff_t *ppos) | 41 | size_t *lenp, loff_t *ppos) |
42 | { | 42 | { |
@@ -51,7 +51,7 @@ static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | inet_get_local_port_range(range, range + 1); | 53 | inet_get_local_port_range(range, range + 1); |
54 | ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos); | 54 | ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); |
55 | 55 | ||
56 | if (write && ret == 0) { | 56 | if (write && ret == 0) { |
57 | if (range[1] < range[0]) | 57 | if (range[1] < range[0]) |
@@ -91,7 +91,7 @@ static int ipv4_sysctl_local_port_range(ctl_table *table, | |||
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||
94 | static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp, | 94 | static int proc_tcp_congestion_control(ctl_table *ctl, int write, |
95 | void __user *buffer, size_t *lenp, loff_t *ppos) | 95 | void __user *buffer, size_t *lenp, loff_t *ppos) |
96 | { | 96 | { |
97 | char val[TCP_CA_NAME_MAX]; | 97 | char val[TCP_CA_NAME_MAX]; |
@@ -103,7 +103,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * | |||
103 | 103 | ||
104 | tcp_get_default_congestion_control(val); | 104 | tcp_get_default_congestion_control(val); |
105 | 105 | ||
106 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | 106 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
107 | if (write && ret == 0) | 107 | if (write && ret == 0) |
108 | ret = tcp_set_default_congestion_control(val); | 108 | ret = tcp_set_default_congestion_control(val); |
109 | return ret; | 109 | return ret; |
@@ -129,7 +129,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, | |||
129 | } | 129 | } |
130 | 130 | ||
131 | static int proc_tcp_available_congestion_control(ctl_table *ctl, | 131 | static int proc_tcp_available_congestion_control(ctl_table *ctl, |
132 | int write, struct file * filp, | 132 | int write, |
133 | void __user *buffer, size_t *lenp, | 133 | void __user *buffer, size_t *lenp, |
134 | loff_t *ppos) | 134 | loff_t *ppos) |
135 | { | 135 | { |
@@ -140,13 +140,13 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl, | |||
140 | if (!tbl.data) | 140 | if (!tbl.data) |
141 | return -ENOMEM; | 141 | return -ENOMEM; |
142 | tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); | 142 | tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); |
143 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | 143 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
144 | kfree(tbl.data); | 144 | kfree(tbl.data); |
145 | return ret; | 145 | return ret; |
146 | } | 146 | } |
147 | 147 | ||
148 | static int proc_allowed_congestion_control(ctl_table *ctl, | 148 | static int proc_allowed_congestion_control(ctl_table *ctl, |
149 | int write, struct file * filp, | 149 | int write, |
150 | void __user *buffer, size_t *lenp, | 150 | void __user *buffer, size_t *lenp, |
151 | loff_t *ppos) | 151 | loff_t *ppos) |
152 | { | 152 | { |
@@ -158,7 +158,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl, | |||
158 | return -ENOMEM; | 158 | return -ENOMEM; |
159 | 159 | ||
160 | tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen); | 160 | tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen); |
161 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | 161 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
162 | if (write && ret == 0) | 162 | if (write && ret == 0) |
163 | ret = tcp_set_allowed_congestion_control(tbl.data); | 163 | ret = tcp_set_allowed_congestion_control(tbl.data); |
164 | kfree(tbl.data); | 164 | kfree(tbl.data); |