From: Gert Doering Date: Fri, 24 Feb 2017 13:52:22 +0000 (+0100) Subject: Fix '--dev null' X-Git-Tag: v2.5_beta1~733 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22c5381b71710ad0e1dbbccc1d5680fccb602311;p=thirdparty%2Fopenvpn.git Fix '--dev null' 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 Acked-by: Steffan Karger Message-Id: <20170224135222.44640-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14186.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 31585b325..3504fbf46 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; }