mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-23 17:18:50 +02:00
policy/v2: fix via grants in BuildPeerMap, MatchersForNode, and ViaRoutesForPeer
Use per-node compilation path for via grants in BuildPeerMap and MatchersForNode to ensure via-granted nodes appear in peer maps. Fix ViaRoutesForPeer golden test route inference to correctly resolve via grant effects. Updates #2180
This commit is contained in:
@@ -693,7 +693,11 @@ func (s *State) ListPeers(nodeID types.NodeID, peerIDs ...types.NodeID) views.Sl
|
||||
return s.nodeStore.ListPeers(nodeID)
|
||||
}
|
||||
|
||||
// For specific peerIDs, filter from all nodes
|
||||
// For specific peerIDs, filter from all nodes.
|
||||
// This path is used for incremental updates (NodeAdded, NodeChanged)
|
||||
// where the caller already knows which peer IDs are involved.
|
||||
// The peer visibility filtering happens in the mapper's buildTailPeers
|
||||
// via MatchersForNode/ReduceNodes.
|
||||
allNodes := s.nodeStore.ListNodes()
|
||||
|
||||
nodeIDSet := make(map[types.NodeID]struct{}, len(peerIDs))
|
||||
|
||||
Reference in New Issue
Block a user