diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index f951f94..7b95d4d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -498,6 +498,12 @@ impl State { fn read_wg_peers(&mut self, daemon: &Daemon) -> Result<()> { let (_, _, wg_peers) = wg_dump(&daemon.config)?; + + // Clear old known endpoints if any + for (_, peer) in self.peers.iter_mut() { + peer.endpoint = None; + } + for (pk, endpoint, last_seen) in wg_peers { match self.peers.get_mut(&pk) { Some(i) => { |