diff options
| -rw-r--r-- | net/ipv4/devinet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index c6b5092f29a1..65f01dc47565 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
| @@ -1490,7 +1490,9 @@ static int devinet_conf_proc(ctl_table *ctl, int write, | |||
| 1490 | void __user *buffer, | 1490 | void __user *buffer, |
| 1491 | size_t *lenp, loff_t *ppos) | 1491 | size_t *lenp, loff_t *ppos) |
| 1492 | { | 1492 | { |
| 1493 | int old_value = *(int *)ctl->data; | ||
| 1493 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); | 1494 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
| 1495 | int new_value = *(int *)ctl->data; | ||
| 1494 | 1496 | ||
| 1495 | if (write) { | 1497 | if (write) { |
| 1496 | struct ipv4_devconf *cnf = ctl->extra1; | 1498 | struct ipv4_devconf *cnf = ctl->extra1; |
| @@ -1501,6 +1503,9 @@ static int devinet_conf_proc(ctl_table *ctl, int write, | |||
| 1501 | 1503 | ||
| 1502 | if (cnf == net->ipv4.devconf_dflt) | 1504 | if (cnf == net->ipv4.devconf_dflt) |
| 1503 | devinet_copy_dflt_conf(net, i); | 1505 | devinet_copy_dflt_conf(net, i); |
| 1506 | if (i == IPV4_DEVCONF_ACCEPT_LOCAL - 1) | ||
| 1507 | if ((new_value == 0) && (old_value != 0)) | ||
| 1508 | rt_cache_flush(net, 0); | ||
| 1504 | } | 1509 | } |
| 1505 | 1510 | ||
| 1506 | return ret; | 1511 | return ret; |
