diff options
| author | Felix Fietkau | 2023-05-31 08:41:16 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2023-05-31 08:41:17 +0000 |
| commit | 7d3986b7a5a20b9af0dacd053b2657210385e7bb (patch) | |
| tree | 7ca78d3054d31ad0ec71d9f60d55191ceb8deb8f | |
| parent | ca17601dc24e4e593012d8d38e04e308956efa95 (diff) | |
| download | unetd-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.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 * |