From f774a5f97c188348663c90e0b76547cf48a9081c Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Tue, 14 Sep 2021 23:12:12 +0900 Subject: [PATCH] client: print endpoint reported by wireguard, not server thanks again @strohel :) --- client/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/main.rs b/client/src/main.rs index 7b6a505..fc695bc 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -1033,10 +1033,10 @@ fn print_peer(peer: &PeerState, short: bool, level: usize) { &peer.public_key[..10].yellow(), ); println_pad!(pad, " {}: {}", "ip".bold(), peer.ip); - if let Some(ref endpoint) = peer.endpoint { - println_pad!(pad, " {}: {}", "endpoint".bold(), endpoint); - } if let Some(info) = info { + if let Some(endpoint) = info.config.endpoint { + println_pad!(pad, " {}: {}", "endpoint".bold(), endpoint ); + } if let Some(last_handshake) = info.stats.last_handshake_time { let duration = last_handshake.elapsed().expect("horrible clock problem"); println_pad!(