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 ( import (
"bytes" "bytes"
"errors"
"fmt" "fmt"
"os" "os"
@ -135,7 +136,11 @@ func (m *Machine) applyWireguardConfig(ring int, wg *wireguard.Config) error {
} }
for _, peer := range wg.Peer { 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) err = core.Wrapf(err, "%s: wg%v:%s", m.Name, ring, addr)
return err return err
} }

Loading…
Cancel
Save