Hi, On 24-02-17 14:52, Gert Doering wrote: > To test whether a server is reachable and all the key handling is > right, openvpn can connect with "--dev null --ifconfig-noexec" to > avoid needing to the client with elevated privileges. > > This was erroring out for no good reason (because the "set environment > variables appropriately" code didn't know if this is a tun or tap > device...) - treat --dev null as "tap", done. > > Signed-off-by: Gert Doering <g...@greenie.muc.de> > --- > src/openvpn/tun.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > index 31585b32..12ce99d5 100644 > --- a/src/openvpn/tun.c > +++ b/src/openvpn/tun.c > @@ -560,7 +560,9 @@ is_tun_p2p(const struct tuntap *tt) > { > bool tun = false; > > - if (tt->type == DEV_TYPE_TAP || (tt->type == DEV_TYPE_TUN && > tt->topology == TOP_SUBNET)) > + if (tt->type == DEV_TYPE_TAP || > + (tt->type == DEV_TYPE_TUN && tt->topology == TOP_SUBNET) || > + tt->type == DEV_TYPE_NULL ) > { > tun = false; > } >
Code makes sense. Code-ACK. Style-wise, we went for pos_arith=lead (Knuth style), so x = first_condition && second_condition && third_condition and this patch is trying to sneak a tab into the code! ;) I'd be fine with you fixing the style on the fly when applying. -Steffan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel