aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-12-05 13:18:17 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-05 14:54:46 +0100
commit12b4b2210c1783437b602a6ebcef242b422b30d8 (patch)
tree1c99c578078f1c4d0780ee3de53e996415fac582 /src/send.c
parentnetlink: prepare for removal of genl_family_attrbuf in 5.5 (diff)
downloadwireguard-monolithic-historical-12b4b2210c1783437b602a6ebcef242b422b30d8.tar.xz
wireguard-monolithic-historical-12b4b2210c1783437b602a6ebcef242b422b30d8.zip
chacha20poly1305: port to sgmitter for 5.5
I'm not totally comfortable with these changes yet, and it'll require some more scrutiny. But it's a start.
Diffstat (limited to '')
-rw-r--r--src/send.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/send.c b/src/send.c
index 9b54f4a..85b83fa 100644
--- a/src/send.c
+++ b/src/send.c
@@ -207,9 +207,10 @@ static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair,
if (skb_to_sgvec(skb, sg, sizeof(struct message_data),
noise_encrypted_len(plaintext_len)) <= 0)
return false;
- return chacha20poly1305_encrypt_sg(sg, sg, plaintext_len, NULL, 0,
- PACKET_CB(skb)->nonce,
- keypair->sending.key, simd_context);
+ return chacha20poly1305_encrypt_sg_inplace(sg, plaintext_len, NULL, 0,
+ PACKET_CB(skb)->nonce,
+ keypair->sending.key,
+ simd_context);
}
void wg_packet_send_keepalive(struct wg_peer *peer)