]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Workaround: make ovpn-dco more reliable
authorArne Schwabe <arne@rfc2549.org>
Thu, 12 Jan 2023 16:37:37 +0000 (17:37 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 19 Jan 2023 08:39:52 +0000 (09:39 +0100)
This workaround avoids the kernel trigger ENOBUFS when the kernel
internal queue is overrun with events of disconnectingh clients or
similar. This is a workaround until we come up with a more permanent
solution.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20230112163737.1240059-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25988.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_linux.c

index 5524cdbcd00a02684c5f879a9553f6dbec5874fb..c84f9cfe1baafcc6708d121173ccfcde6e248a7c 100644 (file)
@@ -375,6 +375,11 @@ ovpn_dco_init_netlink(dco_context_t *dco)
      * wrong sequence numbers (NLE_SEQ_MISMATCH), so disable libnl's sequence
      * number check */
     nl_socket_disable_seq_check(dco->nl_sock);
+
+    /* nl library sets the buffer size to 32k/32k by default which is sometimes
+     * overrun with very fast connecting/disconnecting clients.
+     * TODO: fix this in a better and more reliable way */
+    ASSERT(!nl_socket_set_buffer_size(dco->nl_sock, 1024*1024, 1024*1024));
 }
 
 bool