aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/cookie.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-12-09 11:37:33 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-12-16 06:35:58 +0100
commit1c5a090cfd20d6168d6e2950c9b2bc8e13ebc506 (patch)
treed29c19222b66433d28327239fdce71076724d07e /src/cookie.c
parentsiphash: update against upstream submission (diff)
downloadwireguard-monolithic-historical-1c5a090cfd20d6168d6e2950c9b2bc8e13ebc506.tar.xz
wireguard-monolithic-historical-1c5a090cfd20d6168d6e2950c9b2bc8e13ebc506.zip
messages: increase header by 3 bytes for alignment
Diffstat (limited to 'src/cookie.c')
-rw-r--r--src/cookie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cookie.c b/src/cookie.c
index 21f287f..a2d1b22 100644
--- a/src/cookie.c
+++ b/src/cookie.c
@@ -163,7 +163,7 @@ void cookie_message_create(struct message_handshake_cookie *dst, struct sk_buff
u8 key[NOISE_SYMMETRIC_KEY_LEN];
u8 cookie[COOKIE_LEN];
- dst->header.type = MESSAGE_HANDSHAKE_COOKIE;
+ dst->header.type = cpu_to_le32(MESSAGE_HANDSHAKE_COOKIE);
dst->receiver_index = index;
get_random_bytes(dst->salt, COOKIE_SALT_LEN);
blake2s(dst->salt, dst->salt, NULL, COOKIE_SALT_LEN, COOKIE_SALT_LEN, 0); /* Avoid directly transmitting RNG output. */