This commit is contained in:
jdl
2026-06-07 18:12:44 +02:00
parent cad200b9cc
commit b8344a20b9
37 changed files with 568 additions and 981 deletions

View File

@@ -19,7 +19,7 @@ func (a *App) onPing(e PingEvent) {
// If we're the server, respond - this is always necessary as it's used to
// know if peers are up or down.
if peer.Role == control.Server {
a.sendPing(peer, e.ping.ID, e.ping.PingTS)
a.sendPing(peer, e.ping.PingTS)
}
// Compute RTT from server echo.
@@ -50,11 +50,9 @@ func (a *App) onPing(e PingEvent) {
func (a *App) addProbe(peer *Peer, v4, v6 netip.AddrPort) {
endpoint := preferredEndpoint(v4, v6)
if !endpoint.IsValid() || endpoint == peer.WGEndpoint() {
if !endpoint.IsValid() || endpoint == peer.PreferredEndpoint() {
return
}
peer.Endpoint4 = v4
peer.Endpoint6 = v6
peer.UpdateEndpoints(v4, v6)
a.devAddProbe(peer, endpoint)
}