mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
commit
0448873480
15 changed files with 106 additions and 40 deletions
|
|
@ -1317,14 +1317,19 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
|
|||
{
|
||||
int *valp = ctl->data;
|
||||
int val = *valp;
|
||||
loff_t pos = *ppos;
|
||||
int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
|
||||
|
||||
if (write && *valp != val) {
|
||||
struct net *net = ctl->extra2;
|
||||
|
||||
if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) {
|
||||
if (!rtnl_trylock())
|
||||
if (!rtnl_trylock()) {
|
||||
/* Restore the original values before restarting */
|
||||
*valp = val;
|
||||
*ppos = pos;
|
||||
return restart_syscall();
|
||||
}
|
||||
if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) {
|
||||
inet_forward_change(net);
|
||||
} else if (*valp) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue