summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-22 13:46:45 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-22 13:46:45 +0000
commit05b8a93f8a86b88da8556fcdf51132784a3aa246 (patch)
treecc645383a039435a6275e4ffdabc8fcf7583eb74 /src/win32
parentwindows tap driver version gets checked now (diff)
setting device status to up after ifconfig
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/tunDevice.cpp6
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);
}