diff options
author | Shan Wei <shanwei@cn.fujitsu.com> | 2008-01-31 19:47:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-31 22:28:23 -0500 |
commit | 16ca3f913001efdb6171a2781ef41c77474e3895 (patch) | |
tree | 5e679d3bdf9ce714895b47d1d4ecfb2d08f68c79 | |
parent | 71d67e666e73e3b7e9ef124745ee2e454ac04be8 (diff) |
[TCP]: Fix a bug in strategy_allowed_congestion_control
In strategy_allowed_congestion_control of the 2.6.24 kernel, when
sysctl_string return 1 on success,it should call
tcp_set_allowed_congestion_control to set the allowed congestion
control.But, it don't. the sysctl_string return 1 on success,
otherwise return negative, never return 0.The patch fix the problem.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 82cdf23837e3..88286f35d1e2 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -185,7 +185,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam | |||
185 | 185 | ||
186 | tcp_get_available_congestion_control(tbl.data, tbl.maxlen); | 186 | tcp_get_available_congestion_control(tbl.data, tbl.maxlen); |
187 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); | 187 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); |
188 | if (ret == 0 && newval && newlen) | 188 | if (ret == 1 && newval && newlen) |
189 | ret = tcp_set_allowed_congestion_control(tbl.data); | 189 | ret = tcp_set_allowed_congestion_control(tbl.data); |
190 | kfree(tbl.data); | 190 | kfree(tbl.data); |
191 | 191 | ||