[Openvpn-devel] [PATCH applied] Re: networking: add net_iface_type API

2022-07-13 Thread Gert Doering
Acked-by: Gert Doering Thanks for the v3 changes. I tested v2 very thoroughly on "non sitnl" builds (FreeBSD, Linux with --enable-iproute2) to make sure this really only affects sitnl - and that has not changed with v3. What has changed is "-errno", typo fix in the commit message, and the extra

[Openvpn-devel] [PATCH v3 pre-05/25] networking: add net_iface_type API

2022-07-13 Thread Antonio Quartulli
This new API can be used to retrieve the type of a specific interface. It's mostly platform dependant, but right now expected values are "ovpn-dco", "tun" or "tap". Other values are possible too, but they are not of interest to us. This commit also extends the networking unit-test by using the ne

[Openvpn-devel] [PATCH applied] Re: networking_sitnl: always return negative error code in case of failure

2022-07-13 Thread Gert Doering
Acked-by: Gert Doering "obvious in hindsight" :-) Your patch has been applied to the master branch. Not applicable to 2.5, as there is no net_iface_del() yet. commit dab9343a0530ee2468304823181372393d365675 (HEAD -> master) Author: Antonio Quartulli Date: Wed Jul 13 14:14:16 2022 +0200

[Openvpn-devel] [PATCH] networking_sitnl: always return negative error code in case of failure

2022-07-13 Thread Antonio Quartulli
The API is designed to always return a negative error code in case of failure, therefore we should return '-errno' when ifindex has failed. Signed-off-by: Antonio Quartulli --- ** This patch should also go to 2.5 ** src/openvpn/networking_sitnl.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: [Openvpn-devel] [PATCH] networking_sitnl: standardize returned error when no ifindex can be retrieved

2022-07-13 Thread Antonio Quartulli
Hi, let's drop this patch as using errno after another syscall has been made is not clean. Will send a patch that fixes the errno/-errno alone. Cheers, On 13/07/2022 00:09, Antonio Quartulli wrote: if_nametoindex() sets errno to the related error code in case of failure. For this reason th

Re: [Openvpn-devel] [PATCH applied] Re: Handle exceeding 'max-clients'

2022-07-13 Thread Gert Doering
Hi, On Wed, Jul 13, 2022 at 02:00:30PM +0200, Gert Doering wrote: > Quite obvious in hindsight ;-) - good catch. > > Your patch has been applied to the master branch. > > commit 6e47cadd6219a8a9da8c2c1558652f274a10 Apologies. My tree was not clean, so this commit ID is wrong. I noticed be

Re: [Openvpn-devel] [PATCH v2 pre-05/25] networking: add net_iface_type API

2022-07-13 Thread Antonio Quartulli
Hi, On 13/07/2022 12:53, Gert Doering wrote: Hi, close, but NAK, due to... On Mon, Jul 11, 2022 at 10:10:19AM +0200, Antonio Quartulli wrote: This new API can be used to retrieve the type of a specific interface. It's mostly platform dependant, but right now expected values are "ovpn-dco", "t

[Openvpn-devel] [PATCH applied] Re: Handle exceeding 'max-clients'

2022-07-13 Thread Gert Doering
Quite obvious in hindsight ;-) - good catch. Your patch has been applied to the master branch. commit 6e47cadd6219a8a9da8c2c1558652f274a10 Author: Kristof Provost Date: Wed Jul 13 10:34:04 2022 +0200 Handle exceeding 'max-clients' Signed-off-by: Kristof Provost Acked-by: A

Re: [Openvpn-devel] [PATCH] Handle exceeding 'max-clients'

2022-07-13 Thread Arne Schwabe
Am 13.07.22 um 10:34 schrieb Kristof Provost via Openvpn-devel: From: Kristof Provost If 'max-clients' is set multi_create_instance() can return NULL (for any client that would take us over the client limit). If mi is NULL we don't add it to the hash map, but we do potentially dereference it t

Re: [Openvpn-devel] [PATCH v2 pre-05/25] networking: add net_iface_type API

2022-07-13 Thread Gert Doering
Hi, close, but NAK, due to... On Mon, Jul 11, 2022 at 10:10:19AM +0200, Antonio Quartulli wrote: > This new API can be used to retrieve the type of a specific interface. > It's mostly platform dependant, but right now expected values are > "ovpn-dco", "tun" or "tap". > > Other values are possibl

[Openvpn-devel] [PATCH applied] Re: options: don't export local function pre_connect_save()

2022-07-13 Thread Gert Doering
"git show --color-moved=zebra" is very clear on this :-) - so I did not bother to do more testing than "does it really still compile?" Your patch has been applied to the master branch. commit ad085464b15d63324846d0a5151141f58ccb5a34 Author: Antonio Quartulli Date: Mon Jul 11 14:23:48 2022 +0200

[Openvpn-devel] [PATCH] Handle exceeding 'max-clients'

2022-07-13 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost If 'max-clients' is set multi_create_instance() can return NULL (for any client that would take us over the client limit). If mi is NULL we don't add it to the hash map, but we do potentially dereference it to increment the session count. Do not attempt to do so if 'mi == N

[Openvpn-devel] [PATCH]: Handle exceeding max-clients

2022-07-13 Thread Kristof Provost via Openvpn-devel
This patch fixes a crash we've seen on server instances when one more client than 'max-clients' connects. I believe this affects both master and DCO branches, and I think it was introduced with this commit: commit b364711486dc6371ad2659a5aa190941136f4f04 Author: Arne Schwabe