From e9104d332552bc617b30bc8b7db0ccfac53bff72 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 9 May 2008 18:19:05 +0000 Subject: linux tun/tap device works now with tun *and* tap TODO: ifconfig --- src/options.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/options.cpp') diff --git a/src/options.cpp b/src/options.cpp index 3b7e468..798504b 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -66,7 +66,7 @@ Options::Options() : key_(u_int32_t(0)), salt_(u_int32_t(0)) remote_sync_addr_ = ""; remote_addr_ = ""; remote_port_ = 4444; - dev_name_ = "tun"; + dev_name_ = ""; dev_type_ = ""; ifconfig_param_local_ = ""; ifconfig_param_remote_netmask_ = ""; @@ -194,6 +194,9 @@ bool Options::parse(int argc, char* argv[]) if((cipher_ != "null" || auth_algo_ != "null") && kd_prf_ == "null") kd_prf_ = "aes-ctr"; + if(dev_name_ == "" && dev_type_ == "") + dev_type_ = "tun"; + while(!host_port_queue.empty()) { std::stringstream tmp_stream(host_port_queue.front()); -- cgit v1.2.3