aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/sysctl_net_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
-rw-r--r--net/ipv4/sysctl_net_ipv4.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index ef0ff3357a44..93e172118a94 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -201,6 +201,8 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write,
201static int proc_tcp_congestion_control(struct ctl_table *ctl, int write, 201static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
202 void __user *buffer, size_t *lenp, loff_t *ppos) 202 void __user *buffer, size_t *lenp, loff_t *ppos)
203{ 203{
204 struct net *net = container_of(ctl->data, struct net,
205 ipv4.tcp_congestion_control);
204 char val[TCP_CA_NAME_MAX]; 206 char val[TCP_CA_NAME_MAX];
205 struct ctl_table tbl = { 207 struct ctl_table tbl = {
206 .data = val, 208 .data = val,
@@ -208,11 +210,11 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
208 }; 210 };
209 int ret; 211 int ret;
210 212
211 tcp_get_default_congestion_control(val); 213 tcp_get_default_congestion_control(net, val);
212 214
213 ret = proc_dostring(&tbl, write, buffer, lenp, ppos); 215 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
214 if (write && ret == 0) 216 if (write && ret == 0)
215 ret = tcp_set_default_congestion_control(val); 217 ret = tcp_set_default_congestion_control(net, val);
216 return ret; 218 return ret;
217} 219}
218 220
@@ -447,12 +449,6 @@ static struct ctl_table ipv4_table[] = {
447 .mode = 0644, 449 .mode = 0644,
448 .proc_handler = proc_dointvec 450 .proc_handler = proc_dointvec
449 }, 451 },
450 {
451 .procname = "tcp_congestion_control",
452 .mode = 0644,
453 .maxlen = TCP_CA_NAME_MAX,
454 .proc_handler = proc_tcp_congestion_control,
455 },
456#ifdef CONFIG_NETLABEL 452#ifdef CONFIG_NETLABEL
457 { 453 {
458 .procname = "cipso_cache_enable", 454 .procname = "cipso_cache_enable",
@@ -764,6 +760,13 @@ static struct ctl_table ipv4_net_table[] = {
764 }, 760 },
765#endif 761#endif
766 { 762 {
763 .procname = "tcp_congestion_control",
764 .data = &init_net.ipv4.tcp_congestion_control,
765 .mode = 0644,
766 .maxlen = TCP_CA_NAME_MAX,
767 .proc_handler = proc_tcp_congestion_control,
768 },
769 {
767 .procname = "tcp_keepalive_time", 770 .procname = "tcp_keepalive_time",
768 .data = &init_net.ipv4.sysctl_tcp_keepalive_time, 771 .data = &init_net.ipv4.sysctl_tcp_keepalive_time,
769 .maxlen = sizeof(int), 772 .maxlen = sizeof(int),