aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.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/noise.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/noise.c')
-rw-r--r--src/noise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/noise.c b/src/noise.c
index 7fd16b7..3fccd1e 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -339,7 +339,7 @@ bool noise_handshake_create_initiation(struct message_handshake_initiation *dst,
if (unlikely(!handshake->static_identity->has_identity))
goto out;
- dst->header.type = MESSAGE_HANDSHAKE_INITIATION;
+ dst->header.type = cpu_to_le32(MESSAGE_HANDSHAKE_INITIATION);
handshake_init(handshake->key, handshake->chaining_key, handshake->hash, handshake->remote_static,
handshake->static_identity->has_psk ? handshake->static_identity->preshared_key : NULL);
@@ -459,7 +459,7 @@ bool noise_handshake_create_response(struct message_handshake_response *dst, str
if (handshake->state != HANDSHAKE_CONSUMED_INITIATION)
goto out;
- dst->header.type = MESSAGE_HANDSHAKE_RESPONSE;
+ dst->header.type = cpu_to_le32(MESSAGE_HANDSHAKE_RESPONSE);
dst->receiver_index = handshake->remote_index;
/* e */