Files
Brad FitzpatrickandBrad Fitzpatrick 3515b009c2 ipn/ipnext, ipn/ipnlocal, feature/conn25: pass peer seq to AllowedIPs hook
The ExtraWireGuardAllowedIPs hook was called once per peer on every
authReconfig, so each netmap delta paid an O(n) scan over all peers
even when conn25 (the only implementer) wasn't configured and every
call returned nothing.

Invert the API: the hook now receives an iter.Seq2 of the current
peers and returns the extra prefixes keyed by node ID. An idle
extension returns nil without iterating, so the unconfigured case
does no per-peer work at all.

With this, the runtime.DidRange analysis (see the ts_rangehook test)
no longer reports the updateRouteManagerExtras peer scan on netmap
deltas.

Updates #12542

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: I9181e77416fa22f4c904620d42e9bcb934165216
2026-07-15 10:12:58 -04:00
..