Files
tailscale/feature/conn25
Mazdak Nasab 076d07d626 feature/conn25: return extra WireGuard AllowedIPs in a stable order (#22630)
lookupTransitIPsByConnID returned the connector's Transit IPs straight
from a map-backed set, in map-iteration order. set.Set.Slice can't order
them: it only sorts ordered kinds, and netip.Prefix is a struct.

Both ends of the ExtraWireGuardAllowedIPs path require a stable order so
that unchanged entries are detected as no-ops: the hook's contract in
ipnext, and routemanager.Mutation.SetExtraAllowedIPs, whose applyExtras
compares each peer's prefixes with slices.Equal. Without it an unchanged
set looked changed, resyncing the WireGuard device peer for every
connector on every reconfig.

Sort the result, and drop the workaround sort in TestTransitIPConnMapping
that was masking this, so that test asserts the order too.

Fixes https://github.com/tailscale/corp/issues/52137

Change-Id: Ie4b17d69fb304a6411f534322314082a7feea542

Signed-off-by: Mazdak Nasab <[email protected]>
2026-11-24 12:36:00 -07:00
..