Audit changes.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package peer
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
@@ -37,9 +38,15 @@ func (a *App) onPing(e PingEvent) {
|
||||
if peer.State == StateDirect {
|
||||
if dst := e.ping.Dst; dst.IsValid() {
|
||||
if dst.Addr().Is4() {
|
||||
a.selfV4 = dst
|
||||
if dst != a.selfV4 {
|
||||
log.Printf("Local IPv4 updated: %s -> %s", a.selfV4, dst)
|
||||
a.selfV4 = dst
|
||||
}
|
||||
} else {
|
||||
a.selfV6 = dst
|
||||
if dst != a.selfV6 {
|
||||
log.Printf("Local IPv6 updated: %s -> %s", a.selfV6, dst)
|
||||
a.selfV6 = dst
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user