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
commit e782d1be98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,