diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-12-09 11:37:33 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-12-16 06:35:58 +0100 |
commit | 13aa2b4d464c6c606c31b378ea76c23e73f23b2d (patch) | |
tree | c727bde66ed8f6f592c00a8fa15f94870c1d6245 /src/noise.c | |
parent | 4e1cf0bd5f9db159bb1627078ea2147a24881cae (diff) |
messages: increase header by 3 bytes for alignment
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/noise.c')
-rw-r--r-- | src/noise.c | 4 |
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 */ |