This commit is contained in:
jdl
2026-06-11 18:47:49 +02:00
parent 0902341322
commit 2b4cbae49c
4 changed files with 43 additions and 18 deletions

View File

@@ -37,7 +37,8 @@ func (a *App) onMulticastDiscovery(e MulticastEvent) {
return
}
// payload: [1 VPN IP byte][32 WG pubkey][2 WG port]
// payload: [1 VPN IP byte][32 WG pubkey][2 WG port][8 timestamp]
// (timestamp freshness is gated in the reader before this point).
wgPubKey, err := wgtypes.NewKey(payload[1:33])
if err != nil || wgPubKey != peer.PubKey() {
return