use addslice

This commit is contained in:
Fran Bull 2025-03-17 09:06:46 -07:00
parent 80d3119965
commit 787a1625ad

View File

@ -131,9 +131,7 @@ func newPeers(status *ipnstate.Status, tag string) *peers {
for _, p := range status.Peer {
if p.Tags != nil && views.SliceContains(*p.Tags, tag) {
ps.allowedPeers = append(ps.allowedPeers, p)
for _, addr := range p.TailscaleIPs {
ps.allowedRemoteAddrs.Add(addr)
}
ps.allowedRemoteAddrs.AddSlice(p.TailscaleIPs)
}
}
return ps