summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2023-05-31 08:41:16 +0000
committerFelix Fietkau2023-05-31 08:41:17 +0000
commit7d3986b7a5a20b9af0dacd053b2657210385e7bb (patch)
tree7ca78d3054d31ad0ec71d9f60d55191ceb8deb8f
parentca17601dc24e4e593012d8d38e04e308956efa95 (diff)
downloadunetd-7d3986b7a5a20b9af0dacd053b2657210385e7bb.tar.gz
wg-linux: increase default messages size
Makes the need for splitting messages less likely Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--wg-linux.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/wg-linux.c b/wg-linux.c
index 35365e5..0a17c90 100644
--- a/wg-linux.c
+++ b/wg-linux.c
@@ -44,10 +44,19 @@ static struct unl unl;
static int
wg_nl_init(void)
{
+ int ret;
+
if (unl.sock)
return 0;
- return unl_genl_init(&unl, "wireguard");
+ ret = unl_genl_init(&unl, "wireguard");
+ if (ret)
+ return ret;
+
+ nl_socket_set_buffer_size(unl.sock, 32768, 32768);
+ nlmsg_set_default_size(32768);
+
+ return 0;
}
static struct nl_msg *