From aa7b36845626bf1d6830ddce4924c70c3a7b7369 Mon Sep 17 00:00:00 2001 From: Krzysztof Nazarewski Date: Mon, 23 Jun 2025 14:02:54 +0200 Subject: [PATCH] client: improve log message from: Adding route to 1.2.3.4/32 via invalid IP @ 10 (wt0) to: Adding route to 1.2.3.4/32 via no-ip @ 10 (wt0) --- client/internal/routemanager/systemops/systemops.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/internal/routemanager/systemops/systemops.go b/client/internal/routemanager/systemops/systemops.go index 261567dc3..8caf22f81 100644 --- a/client/internal/routemanager/systemops/systemops.go +++ b/client/internal/routemanager/systemops/systemops.go @@ -28,7 +28,10 @@ func (n Nexthop) String() string { if n.Intf == nil { return n.IP.String() } - return fmt.Sprintf("%s @ %d (%s)", n.IP.String(), n.Intf.Index, n.Intf.Name) + if n.IP.IsValid() { + return fmt.Sprintf("%s @ %d (%s)", n.IP.String(), n.Intf.Index, n.Intf.Name) + } + return fmt.Sprintf("no-ip @ %d (%s)", n.Intf.Index, n.Intf.Name) } type wgIface interface {