On Freitag, 24. Juni 2022 10:38:05 CEST Antonio Quartulli wrote: > The current condition checking if the TUN interface was preserved is > dependant on the platform being Android or not. This makes the code > reasonably ugly, especially because uncrustify can't indent properly. > > On top of that, we will require an extra condition only for windows+DCO, > which will make the check even uglier. > > For this reason, factor out the check in a separate function which can > keep the ifdefs craziness well hidden, while do_open_tun becomes > (a bit) cleaner. > > Signed-off-by: Antonio Quartulli <a...@unstable.cc>
Looks mighty, but is rather trivial. Two things: I think the code could benefit from factoring out the call to run_up_down() and block_outside_dns into two simple functions. Currently it's pretty much duplicated in the if and else branch. Besides that: Acked-by: Heiko Hund <he...@ist.eigentlich.net> _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel