ipv6: keep fib6 node serials from going backwards
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ipv6: stamp the default route node with a fresh serial on link failurenet/ | +10 | 0 replies | |
| 2/2 | ipv6: allocate the flush serial under each table's locknet/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/2] ipv6: keep fib6 node serials from going backwards
Hi,
Two writers can give a fib6 node a serial older than the one it had, or one that fib6_new_sernum never allocates: ip6_link_failure writes -1 into the node of a default route, and fib6_flush_trees allocates its serial before walking the tables, so it can overwrite a newer serial stamped by a concurrent route change.
Validating dsts by comparing serials by age, as Ido suggested [1], needs node serials to only move forward, so both writers have to be fixed before the respin of "ipv6: tie dst validation to the lookup that returned the dst" [2].
Patch 1 stamps the default route node with a fresh serial on link failure, and patch 2 allocates the flush serial under each table's lock.
[1] https://lore.kernel.org/netdev/20261203153447.GA3201592@shredder/
[2] https://lore.kernel.org/netdev/[email protected]/
Thanks,
Ralf Lici
Mandelbit Srl
---
Changes since v5 of "ipv6: tie dst validation to the lookup that returned the dst" [2]
- Send 1/4 separately, without the Fixes tag. (Ido)
- Add the fib6_flush_trees fix. (Ido)
Ralf Lici (2):
ipv6: stamp the default route node with a fresh serial on link failure
ipv6: allocate the flush serial under each table's lock
net/ipv6/ip6_fib.c | 13 ++++++++----- net/ipv6/route.c | 18 ++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-)
base-commit: 8a3d0368f58e34e34d402718c7655811902a6bd4
Signature · 1 line
2.56.1