ipn/ipnlocal: fix cache update for peers deleted by netmap deltas (#20851)
After a netmap delta is applied, we scan the mutations for affected peers and update the cache (if enabled) for those peers. For removals in particular, we were relying on the node backend to resolve node IDs (provided by the delta mutation) to stable IDs. Prior to 65fd320a this happened to work because the node backend would hold on to all the peers mentioned by the previous full netmap, even after applying deltas. But that was essentially accidental, and once we fixed it not to do that, these lookups no longer worked. We need the stable ID, since that is how the cache is keyed, and now that they're no longer pinned, we were not properly evicting removed peers from the cache. To fix this, capture removed peer stable IDs while applying mutations to the node backend, instead of trying to look them up afterward. Updates #20796 Change-Id: I14ded78eaf9657645f0869a52460fd3cd86edba6 Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
M
M. J. Fromberger committed
f3552c29c04e5ec4d0d38637e67e1f8a40d8ca09
Parent: 90ed0bc
Committed by GitHub <noreply@github.com>
on 8/19/2026, 5:31:38 PM