From 77aac5534bc78fb2983166f30a6719d1d161addf Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Thu, 28 Dec 2023 17:46:04 +0000 Subject: [PATCH] main - Bugfix in client where "-" was attempted to be parsed as a UDP addr --- pkg/mesh/config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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