Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
131e8f397c
|
@@ -328,9 +328,8 @@ func (rp *RingPeer) AllowCIDR(addr netip.Addr, bits int) {
|
||||
|
||||
// AllowSubnet allows an IP range via this peer
|
||||
func (rp *RingPeer) AllowSubnet(subnet netip.Prefix) {
|
||||
if !core.SliceContains(rp.PeerConfig.AllowedIPs, subnet) {
|
||||
rp.PeerConfig.AllowedIPs = append(rp.PeerConfig.AllowedIPs, subnet)
|
||||
}
|
||||
rp.PeerConfig.AllowedIPs = append(rp.PeerConfig.AllowedIPs, subnet)
|
||||
core.SliceUniquify[netip.Prefix](&rp.PeerConfig.AllowedIPs)
|
||||
}
|
||||
|
||||
// NewRing composes a new Ring for Wireguard setup
|
||||
|
||||
Reference in New Issue
Block a user