diff options
author | 2017-06-01 06:31:26 +0200 | |
---|---|---|
committer | 2017-06-01 06:31:26 +0200 | |
commit | b13a1652b5137df09cbfe2e908a899f6868e91a2 (patch) | |
tree | cc38f8db45f385ded3e870654e497caa5a115329 /contrib | |
parent | timers: queue up killing ephemerals only if not already (diff) | |
download | wireguard-monolithic-historical-b13a1652b5137df09cbfe2e908a899f6868e91a2.tar.xz wireguard-monolithic-historical-b13a1652b5137df09cbfe2e908a899f6868e91a2.zip |
go test: properly pad message
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/external-tests/go/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/external-tests/go/main.go b/contrib/external-tests/go/main.go index 4b58891..013a1a9 100644 --- a/contrib/external-tests/go/main.go +++ b/contrib/external-tests/go/main.go @@ -127,7 +127,7 @@ func main() { Dst: net.IPv4(10, 189, 129, 1), }).Marshal() binary.BigEndian.PutUint16(pingHeader[2:], uint16(ipv4.HeaderLen+len(pingMessage))) // fix the length endianness on BSDs - pingData := append(pingHeader, pingMessage...) + pingData := append(append(pingHeader, pingMessage...), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) binary.BigEndian.PutUint16(pingData[10:], ipChecksum(pingData)) pingPacket := make([]byte, 16) pingPacket[0] = 4 // Type: Data @@ -142,7 +142,7 @@ func main() { } // read ICMP Echo Reply packet - replyPacket := make([]byte, 128) + replyPacket := make([]byte, 80) n, err = conn.Read(replyPacket) if err != nil { log.Fatalf("error reading ping reply message: %s", err) |