summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2024-01-10 12:45:57 +0100
committerJo-Philipp Wich <jo@mein.io>2024-01-10 12:45:57 +0100
commit534417132e1876cc1a2e38d2a35f5937883be282 (patch)
treec7323561a2e877d45c2f361899c050b6c079a1a9 /lib
parent9cbe8294909f76f69cf654d8df4ddc2f609848e0 (diff)
rtnl: increase event socket rx buffer size limit to 1 MiB
Use the same RX buffer size which iproute2 uses as default, in order to avoid (or rather, delay as much as possible) ENOBUFS conditions when receiving a large burst of netlink notifications. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/rtnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rtnl.c b/lib/rtnl.c
index 448e43e..6d2c819 100644
--- a/lib/rtnl.c
+++ b/lib/rtnl.c
@@ -3671,7 +3671,7 @@ uc_nl_evsock_init(void)
fd->cb = uc_nl_listener_cb;
uloop_fd_add(fd, ULOOP_READ);
- nl_socket_set_buffer_size(sock, 65535, 0);
+ nl_socket_set_buffer_size(sock, 1024 * 1024, 0);
nl_socket_disable_seq_check(sock);
nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, cb_listener_event, NULL);