mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-01 05:01:01 +00:00
use addslice
This commit is contained in:
parent
80d3119965
commit
787a1625ad
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user