Re: [Openvpn-devel] [Patch v5] Don't "undo" ifconfig on exit if it wasn't done

2022-07-11 Thread Antonio Quartulli
Hi, On 29/06/2022 19:05, Max Fillinger wrote: When running with --ifconfig-noexec, OpenVPN does not execute ifconfig, but on exit, it still tries to "undo" the configuration it would have done. This patch fixes it by extracting an undo_ifconfig() function from close_tun(). The undo function is

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

2022-07-11 Thread Heiko Hund
On Montag, 11. Juli 2022 14:23:48 CEST Antonio Quartulli wrote: > The pre_connect_save() function is not used outside of options.c, > therefore it should not be exported. > > Make it static and move definition before its invocation. > Move also pre_connect_restore() along with it in order to keep

Re: [Openvpn-devel] [PATCH v2 23/23] dco-win: implement ovpn-dco support in P2P Windows code path

2022-07-11 Thread Heiko Hund
On Montag, 11. Juli 2022 16:19:44 CEST Antonio Quartulli wrote: > With this change it is possible to use ovpn-dco-win when running OpenVPN > in client or P2P mode. > > Signed-off-by: Arne Schwabe > Signed-off-by: Lev Stipakov > Signed-off-by: Antonio Quartulli > --- > > Changes from v1: > *

[Openvpn-devel] [PATCH v2 23/23] dco-win: implement ovpn-dco support in P2P Windows code path

2022-07-11 Thread Antonio Quartulli
With this change it is possible to use ovpn-dco-win when running OpenVPN in client or P2P mode. Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v1: * use suffix _dco_win instead of _windco * create helper function to retrieve last

[Openvpn-devel] [PATCH v8 05/25] dco: let open_tun_generic handle the DCO case

2022-07-11 Thread Antonio Quartulli
open_tun_generic already contains the logic required to find a device name when not specified b the user. For this reason the DCO case can easily leverage on function and avoid code duplication. Signed-off-by: Antonio Quartulli --- Changes from v7: * enclose setting 'disable_dco' field within

[Openvpn-devel] [PATCH v7] dco: let open_tun_generic handle the DCO case

2022-07-11 Thread Antonio Quartulli
open_tun_generic already contains the logic required to find a device name when not specified b the user. For this reason the DCO case can easily leverage on function and avoid code duplication. Signed-off-by: Antonio Quartulli --- Changes from v6: * do not touch tls_multi in do_open_tun as

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

2022-07-11 Thread Antonio Quartulli
The pre_connect_save() function is not used outside of options.c, therefore it should not be exported. Make it static and move definition before its invocation. Move also pre_connect_restore() along with it in order to keep the two close to each other. Cc: Arne Schwabe Signed-off-by: Antonio

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

2022-07-11 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