]> www.infradead.org Git - users/hch/block.git/commit
ipv6: fib6_rules: flush route cache when rule is changed
authorShiming Cheng <shiming.cheng@mediatek.com>
Thu, 7 Mar 2024 10:01:57 +0000 (18:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2024 10:10:35 +0000 (10:10 +0000)
commitc4386ab4f6c600f75fdfd21143f89bac3e625d0d
tree526ca2f2c617686b4888783541a0e8800e901c9f
parente3fb8e8ba72b053d05ca2602acdd6b869f9f296f
ipv6: fib6_rules: flush route cache when rule is changed

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@mediatek.com>
Signed-off-by: Lena Wang <lena.wang@mediatek.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/fib6_rules.c