mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-18 11:00:06 +02:00
[client] improve adding route log message (#4034)
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)
This commit is contained in:
committed by
GitHub
parent
0480507a10
commit
c1c71b6d39
@@ -28,8 +28,11 @@ func (n Nexthop) String() string {
|
|||||||
if n.Intf == nil {
|
if n.Intf == nil {
|
||||||
return n.IP.String()
|
return n.IP.String()
|
||||||
}
|
}
|
||||||
|
if n.IP.IsValid() {
|
||||||
return fmt.Sprintf("%s @ %d (%s)", n.IP.String(), n.Intf.Index, n.Intf.Name)
|
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 {
|
type wgIface interface {
|
||||||
Address() wgaddr.Address
|
Address() wgaddr.Address
|
||||||
|
Reference in New Issue
Block a user