aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-16 01:11:58 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-16 03:21:08 +0200
commitc8fbc33175d73099aec4d9269470116bf7ef0ed4 (patch)
tree17b2e4ca794b41d97528de72273f9d131d048d40 /src/send.c
parentsimd: add __must_check annotation (diff)
downloadwireguard-monolithic-historical-c8fbc33175d73099aec4d9269470116bf7ef0ed4.tar.xz
wireguard-monolithic-historical-c8fbc33175d73099aec4d9269470116bf7ef0ed4.zip
send/receive: reduce number of sg entries
This reduces stack usage to quell warnings on powerpc.
Diffstat (limited to '')
-rw-r--r--src/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/send.c b/src/send.c
index 5b6d0fe..2bfe80c 100644
--- a/src/send.c
+++ b/src/send.c
@@ -161,7 +161,7 @@ static inline bool skb_encrypt(struct sk_buff *skb,
simd_context_t simd_context)
{
unsigned int padding_len, plaintext_len, trailer_len;
- struct scatterlist sg[MAX_SKB_FRAGS * 2 + 1];
+ struct scatterlist sg[MAX_SKB_FRAGS + 8];
struct message_data *header;
struct sk_buff *trailer;
int num_frags;