diff options
author | Gert Doering | 2017-02-24 14:52:22 +0100 |
---|---|---|
committer | Gert Doering | 2017-02-24 20:10:48 +0100 |
commit | 2085c1f3875b9c96ac739941712247b805677efa (patch) | |
tree | 0f6f3bca3eb2d152000eff6fdb6ce477163877e7 /src/openvpn/tun.c | |
parent | 4c241acc67c1d6b42dbe1f6199c75d9f7f228ac2 (diff) | |
download | openvpn-2085c1f3875b9c96ac739941712247b805677efa.zip openvpn-2085c1f3875b9c96ac739941712247b805677efa.tar.gz |
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 <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
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 <gert@greenie.muc.de>
(cherry picked from commit 22c5381b71710ad0e1dbbccc1d5680fccb602311)
Diffstat (limited to 'src/openvpn/tun.c')
-rw-r--r-- | src/openvpn/tun.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 31585b3..3504fbf 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; } |