Merge pull request #287 from squat/respect_allowed_location_ips_for_peers

pkg/mesh: respect allowed location IPs in peers
This commit is contained in:
Lucas Servén Marín
2022-04-01 09:33:21 +02:00
committed by GitHub

View File

@@ -371,7 +371,7 @@ func (t *Topology) PeerConf(name string) *wireguard.Conf {
for _, s := range t.segments {
peer := wireguard.Peer{
PeerConfig: wgtypes.PeerConfig{
AllowedIPs: s.allowedIPs,
AllowedIPs: append(s.allowedIPs, s.allowedLocationIPs...),
PersistentKeepaliveInterval: pka,
PresharedKey: psk,
PublicKey: s.key,