Petr Pavlu 14a20e5b4a net/ipv6: Fix the RT cache flush via sysctl using a previous delay
The net.ipv6.route.flush system parameter takes a value which specifies
a delay used during the flush operation for aging exception routes. The
written value is however not used in the currently requested flush and
instead utilized only in the next one.

A problem is that ipv6_sysctl_rtcache_flush() first reads the old value
of net->ipv6.sysctl.flush_delay into a local delay variable and then
calls proc_dointvec() which actually updates the sysctl based on the
provided input.

Fix the problem by switching the order of the two operations.

Fixes: 4990509f19e8 ("[NETNS][IPV6]: Make sysctls route per namespace.")
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240607112828.30285-1-petr.pavlu@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-12 17:51:35 -07:00
..
2024-06-03 18:50:09 -07:00
2024-03-07 21:12:43 -08:00
2024-05-06 19:14:56 -07:00
2024-04-29 13:32:01 +01:00
2024-04-29 13:32:01 +01:00
2024-04-29 13:32:01 +01:00
2024-04-29 13:32:01 +01:00
2023-10-27 10:35:46 +01:00
2023-09-14 16:16:36 +02:00
2024-03-08 10:56:05 +00:00