diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-07 02:32:40 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-07 02:33:29 +0200 |
commit | 5a427c702421458c41890cd610c27d197f677082 (patch) | |
tree | cf0319c732dd481a0ad6f30a32b43ed3d3da15ad /contrib/external-tests/go/main.go | |
parent | go test: make more idiomatic (diff) | |
download | wireguard-tools-5a427c702421458c41890cd610c27d197f677082.tar.xz wireguard-tools-5a427c702421458c41890cd610c27d197f677082.zip |
go test: put nonce at correct location
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | contrib/external-tests/go/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/external-tests/go/main.go b/contrib/external-tests/go/main.go index 86fe192..a06b565 100644 --- a/contrib/external-tests/go/main.go +++ b/contrib/external-tests/go/main.go @@ -80,7 +80,7 @@ func main() { keepalivePacket := make([]byte, 13) keepalivePacket[0] = 4 // Type: Data binary.LittleEndian.PutUint32(keepalivePacket[1:], theirIndex) - binary.LittleEndian.PutUint64(keepalivePacket[3:], 0) // Nonce + binary.LittleEndian.PutUint64(keepalivePacket[5:], 0) // Nonce keepalivePacket = sendCipher.Encrypt(keepalivePacket, nil, nil) if _, err := conn.Write(keepalivePacket); err != nil { log.Fatalf("error writing keepalive packet: %s", err) |