Skip to content

Commit 7d3986b

Browse files
committed
wg-linux: increase default messages size
Makes the need for splitting messages less likely Signed-off-by: Felix Fietkau <[email protected]>
1 parent ca17601 commit 7d3986b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

wg-linux.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,19 @@ static struct unl unl;
4444
static int
4545
wg_nl_init(void)
4646
{
47+
int ret;
48+
4749
if (unl.sock)
4850
return 0;
4951

50-
return unl_genl_init(&unl, "wireguard");
52+
ret = unl_genl_init(&unl, "wireguard");
53+
if (ret)
54+
return ret;
55+
56+
nl_socket_set_buffer_size(unl.sock, 32768, 32768);
57+
nlmsg_set_default_size(32768);
58+
59+
return 0;
5160
}
5261

5362
static struct nl_msg *

0 commit comments

Comments
 (0)