WIP
This commit is contained in:
22
peer/ping.go
22
peer/ping.go
@@ -1,9 +1,21 @@
|
||||
package peer
|
||||
|
||||
import "net/netip"
|
||||
import (
|
||||
"log"
|
||||
"net/netip"
|
||||
|
||||
func (a *App) sendPing(p *Peer, id, ts int64) {
|
||||
_ = id
|
||||
_ = ts
|
||||
_ = netip.AddrPort{}
|
||||
"vppn/peer/control"
|
||||
)
|
||||
|
||||
func (a *App) sendPing(p *Peer, ts int64) {
|
||||
ping := control.Ping{
|
||||
PingTS: ts,
|
||||
SrcV4: a.selfV4,
|
||||
SrcV6: a.selfV6,
|
||||
Dst: p.WGEndpoint(),
|
||||
}
|
||||
dst := netip.AddrPortFrom(p.VPNIP, ControlPort)
|
||||
if err := a.controlConn.SendPing(dst, ping); err != nil {
|
||||
log.Printf("sendPing %v: %v", p.VPNIP, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user