Re: [PATCH net v4] ipv6: fib6_rules: flush route cache when rule is changed
From: Jiri Pirko
Date: Fri Mar 01 2024 - 10:28:51 EST
Fri, Mar 01, 2024 at 03:39:46PM CET, Lena.Wang@xxxxxxxxxxxx wrote:
>From: Shiming Cheng <shiming.cheng@xxxxxxxxxxxx>
>
>When rule policy is changed, ipv6 socket cache is not refreshed.
>The sock's skb still uses a outdated route cache and was sent to
>a wrong interface.
>
>To avoid this error we should update fib node's version when
>rule is changed. Then skb's route will be reroute checked as
>route cache version is already different with fib node version.
>The route cache is refreshed to match the latest rule.
>
>Fixes: 101367c2f8c4 ("[IPV6]: Policy Routing Rules")
>Signed-off-by: Shiming Cheng <shiming.cheng@xxxxxxxxxxxx>
>Signed-off-by: Lena Wang <lena.wang@xxxxxxxxxxxx>
Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>