mirror of
https://github.com/tailscale/tailscale.git
synced 2026-07-20 21:23:07 +08:00
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 <bradfitz@tailscale.com> Change-Id: I9181e77416fa22f4c904620d42e9bcb934165216 |
||
|---|---|---|
| .. | ||
| ipnext.go | ||