diff options
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/tunDevice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |