aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/cookie.c
diff options
context:
space:
mode:
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. */