From 05b8a93f8a86b88da8556fcdf51132784a3aa246 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 22 Jan 2009 13:46:45 +0000 Subject: setting device status to up after ifconfig --- src/win32/tunDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/win32/tunDevice.cpp') diff --git a/src/win32/tunDevice.cpp b/src/win32/tunDevice.cpp index 2e95966..94fc657 100644 --- a/src/win32/tunDevice.cpp +++ b/src/win32/tunDevice.cpp @@ -96,6 +96,9 @@ TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifc } } + if(ifcfg_lp != "" && ifcfg_rnmp != "") + do_ifconfig(); + int status = true; err = performIoControl(TAP_IOCTL_SET_MEDIA_STATUS, &status, sizeof(status), &status, sizeof(status)); if(err != ERROR_SUCCESS) { @@ -105,9 +108,6 @@ TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifc throw std::runtime_error(msg.str()); } - if(ifcfg_lp != "" && ifcfg_rnmp != "") - do_ifconfig(); - roverlapped_.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); woverlapped_.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); } -- cgit v1.2.3