Browse Source

cluster: fix wg1 generation (AllowedIPs)

Signed-off-by: Nagy Károly Gábriel <k@jpi.io>
pull/57/head
Nagy Károly Gábriel 4 months ago
parent
commit
f0c09c2176
Signed by: karasz
GPG Key ID: FA002E83BC206F83
  1. 8
      pkg/cluster/wireguard.go

8
pkg/cluster/wireguard.go

@ -97,14 +97,10 @@ func (m *Cluster) WriteWireguardConfig(ring rings.RingID) error {
// WriteWireguardConfig rewrites all wgN.conf on all machines
// on the Zone attached to that ring
func (z *Zone) WriteWireguardConfig(ring rings.RingID) error {
switch ring {
case rings.RingZeroID:
if ring == rings.RingZeroID || ring == rings.RingOneID {
return writeWireguardConfig(z.zones, z.zones, ring)
case rings.RingOneID:
return writeWireguardConfig(z.zones, z, ring)
default:
return ErrInvalidRing(ring)
}
return ErrInvalidRing(ring)
}
func writeWireguardConfig(z ZoneIterator, m MachineIterator, ring rings.RingID) error {

Loading…
Cancel
Save