mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
71d67e666e
commit
16ca3f9130
1 changed files with 1 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam
|
|||
|
||||
tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
|
||||
ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
|
||||
if (ret == 0 && newval && newlen)
|
||||
if (ret == 1 && newval && newlen)
|
||||
ret = tcp_set_allowed_congestion_control(tbl.data);
|
||||
kfree(tbl.data);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue