wgengine/packet: add some tests, more docs, minor Go style, performance changes

This commit is contained in:
Brad Fitzpatrick
2020-05-25 08:57:04 -07:00
parent 3f4a567032
commit 43ded2b581
3 changed files with 115 additions and 50 deletions

View File

@ -322,7 +322,7 @@ func (e *userspaceEngine) pinger(peerKey wgcfg.Key, ips []wgcfg.IP) {
return
}
for _, dstIP := range dstIPs {
b := packet.GenICMP(srcIP, dstIP, ipid, packet.EchoRequest, 0, payload)
b := packet.GenICMP(srcIP, dstIP, ipid, packet.ICMPEchoRequest, 0, payload)
e.tundev.InjectOutbound(b)
}
ipid++