From ccef06b9682407d5f91d06df68738df784598cad Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 8 Apr 2026 17:06:52 +0000 Subject: [PATCH] tstest/integration/testcontrol: notify peers when subnet routes change When SetSubnetRoutes is called, also send updatePeerChanged to all other connected nodes so they re-fetch their MapResponse and learn about the updated AllowedIPs. Without this, peers never see new subnet routes until they happen to reconnect to the control server. Discovered while working on a three-VM natlab subnet router integration test, coming later. Updates #13038 Change-Id: I20e7a2fda994a8ab0e7a24240e6eae536f4f5f15 Signed-off-by: Brad Fitzpatrick --- tstest/integration/testcontrol/testcontrol.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tstest/integration/testcontrol/testcontrol.go b/tstest/integration/testcontrol/testcontrol.go index 8bfe446ad..486bc8b81 100644 --- a/tstest/integration/testcontrol/testcontrol.go +++ b/tstest/integration/testcontrol/testcontrol.go @@ -486,6 +486,13 @@ func (s *Server) SetSubnetRoutes(nodeKey key.NodePublic, routes []netip.Prefix) mak.Set(&s.nodeSubnetRoutes, nodeKey, routes) if node, ok := s.nodes[nodeKey]; ok { sendUpdate(s.updates[node.ID], updateSelfChanged) + // Also notify all other peers so they get the updated AllowedIPs + // in their next MapResponse. + for _, n := range s.nodes { + if n.ID != node.ID { + sendUpdate(s.updates[n.ID], updatePeerChanged) + } + } } }