diff --git a/pkg/mesh/config.go b/pkg/mesh/config.go index eb4db01..75b8d77 100644 --- a/pkg/mesh/config.go +++ b/pkg/mesh/config.go @@ -91,7 +91,11 @@ func (m *WgMeshConfigApplyer) convertMeshNode(params convertMeshNodeParams) (*wg return p.PublicKey.String() == pubKey.String() }) - endpoint, err := net.ResolveUDPAddr("udp", params.node.GetWgEndpoint()) + var endpoint *net.UDPAddr = nil + + if params.node.GetType() == conf.PEER_ROLE { + endpoint, err = net.ResolveUDPAddr("udp", params.node.GetWgEndpoint()) + } if err != nil { return nil, err