pkg/mesh: respect allowed location IPs in peers
Currently, when rendering the configuration for a Peer, the allowed location configs of any segment are erroneously ignored, meaning that an administrator will have to manually edit the configuration to get the expected behavior from a Peer. This commit fixes the generation of the configuration. Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit is contained in:
parent
5de689ea1f
commit
df8d2cb68f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user