From 48c47f5841f3b0695fe08929023d1db849e6251d Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Tue, 30 Nov 2021 10:31:33 -0600 Subject: [PATCH] Warn if no lighthouses were configured on a non lighthouse node (#587) --- CHANGELOG.md | 4 ++++ main.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04a6009..aa6f79a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Warn when a non lighthouse node does not have lighthouse hosts configured. (#587) + ## [1.5.0] - 2021-11-11 ### Added diff --git a/main.go b/main.go index c8384d4..fcd1200 100644 --- a/main.go +++ b/main.go @@ -249,6 +249,10 @@ func Main(c *config.C, configTest bool, buildVersion string, logger *logrus.Logg lighthouseHosts[i] = iputil.Ip2VpnIp(ip) } + if !amLighthouse && len(lighthouseHosts) == 0 { + l.Warn("No lighthouses.hosts configured, this host will only be able to initiate tunnels with static_host_map entries") + } + lightHouse := NewLightHouse( l, amLighthouse,