diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 84be9b42819c3ec3ca37afb66136b9c466df1f5c..74f948a28a5eee9b41e25303495acbde1bb161ed 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5145,12 +5145,16 @@ int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write, { struct net *net; int delay; + int ret; if (!write) return -EINVAL; net = (struct net *)ctl->extra1; delay = net->ipv6.sysctl.flush_delay; - proc_dointvec(ctl, write, buffer, lenp, ppos); + ret = proc_dointvec(ctl, write, buffer, lenp, ppos); + if (ret) + return ret; + fib6_run_gc(delay <= 0 ? 0 : (unsigned long)delay, net, delay > 0); return 0; }