[Openvpn-devel,6/9] Do not set nl socket buffer size

Message ID 20221224194253.3202231-7-arne@rfc2549.org
State Accepted
Headers show
Series Various patches to improve DCO behaviour | expand

Commit Message

Arne Schwabe Dec. 24, 2022, 7:42 p.m. UTC
libnl increases the sizes we pass to 8192 anyway. Currently when we have
a lot of events queued we might run into a NLE_NOMEM message and that
terminates the server. So rather let the kernel decide the buffer sizes.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
 src/openvpn/dco_linux.c | 3 ---
 1 file changed, 3 deletions(-)


Gert Doering Dec. 25, 2022, 3:35 p.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"Trivial enough", removing code that we're not sure why we have it
in the first place.  Tested on Linux/DCO, client and server, and 
all is well behaved (for normal operations, did not test gremlins -
but my gremlins never hit sitnl queue limits either).

Your patch has been applied to the master and release/2.6 branch.

commit b2ca179ce2678115c3a61fd3f843c64c1d059fbc (master)
commit fa2a330f72d29a5ce630327ca288ed520aa2d697 (release/2.6)
Author: Arne Schwabe
Date:   Sat Dec 24 20:42:50 2022 +0100

     Do not set nl socket buffer size

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20221224194253.3202231-7-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25789.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>

kind regards,

Gert Doering


diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c
index 222537fc1..d4bca555d 100644
--- a/src/openvpn/dco_linux.c
+++ b/src/openvpn/dco_linux.c
@@ -348,9 +348,6 @@  ovpn_dco_init_netlink(dco_context_t *dco)
         msg(M_ERR, "Cannot create netlink socket");
-    /* TODO: Why are we setting this buffer size? */
-    nl_socket_set_buffer_size(dco->nl_sock, 8192, 8192);
     int ret = genl_connect(dco->nl_sock);
     if (ret)