Browse Source

zones: ignore unknown wireguard endpoints

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/11/head
Alejandro Mery 1 year ago
parent
commit
6a071ba5f0
  1. 7
      pkg/zones/machine_rings.go

7
pkg/zones/machine_rings.go

@ -2,6 +2,7 @@ package zones
import (
"bytes"
"errors"
"fmt"
"os"
@ -135,7 +136,11 @@ func (m *Machine) applyWireguardConfig(ring int, wg *wireguard.Config) error {
}
for _, peer := range wg.Peer {
if err := m.applyWireguardPeerConfig(ring, peer); err != nil {
err := m.applyWireguardPeerConfig(ring, peer)
switch {
case errors.Is(err, ErrUnknownNode):
// ignore unknown peers
case err != nil:
err = core.Wrapf(err, "%s: wg%v:%s", m.Name, ring, addr)
return err
}

Loading…
Cancel
Save