Hi,

On 31/05/2022 17:17, 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 called before close_tun(), but only if
--ifconfig-noexec isn't set. This is symmetric to how open_tun() and
do_ifconfig() are used.

This change also allows us to drop the second argument from close_tun().

v2: Fix tabs-vs-spaces.
v3: Fix another style mistake.
v4: Move undo_ifconfig{4,6}() out of #ifdef TARGET_LINUX.

Signed-off-by: Max Fillinger <maximilian.fillin...@foxcrypto.com>

Max, something that I feared (and that now became reality with DCO) is that we would still need the net-ctx object in open/close_tun().

The reason is that the DCO interface is created/destroyed by means of the networking APIs, therefore the net-ctx object is still required...

If you rebase this patch on top of latest master you will see what I mean.

Unfortunately this patch as is does not apply and does not compile easily anymore.

Max how do you feel about re-spinning this and see how to better handle this situation?

Thanks!


--
Antonio Quartulli


_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to