Add ping client

This commit is contained in:
世界 2025-08-23 10:38:54 +08:00
parent 036d61a0aa
commit 8dbb51cfb7
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
21 changed files with 710 additions and 384 deletions

View file

@ -98,8 +98,8 @@ func (w *NatWriter) RewritePacket(packet []byte) {
icmpHdr.SetChecksum(0)
icmpHdr.SetChecksum(header.ICMPv6Checksum(header.ICMPv6ChecksumParams{
Header: icmpHdr,
Src: ipHdr.SourceAddress(),
Dst: ipHdr.DestinationAddress(),
Src: ipHdr.SourceAddressSlice(),
Dst: ipHdr.DestinationAddressSlice(),
}))
}
if ipHdr4, isIPv4 := ipHdr.(header.IPv4); isIPv4 {