summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2015-05-19 18:40:34 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2015-05-19 18:40:34 -0700
commitdd701886437d654482ab454b220d41de1dbff012 (patch)
tree95615eaabc0185e9dc4ead5ee8832354a1a5b244
parentc7eb5f0c81d32f26d0cca47f80d9d9d5e1307aca (diff)
downloadinfinitytier-dd701886437d654482ab454b220d41de1dbff012.tar.gz
infinitytier-dd701886437d654482ab454b220d41de1dbff012.zip
Make tap driver even more defensive... seems to maybe fix the new network problem. Have to test a bit more.
-rw-r--r--ext/installfiles/windows/ZeroTier One.aip2
-rw-r--r--osdep/WindowsEthernetTap.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip
index 4be09951..69c2c0b7 100644
--- a/ext/installfiles/windows/ZeroTier One.aip
+++ b/ext/installfiles/windows/ZeroTier One.aip
@@ -23,7 +23,7 @@
<ROW Property="CTRLS" Value="2"/>
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
- <ROW Property="ProductCode" Value="1033:{935C8724-0E87-4178-A29A-007508B15436} " Type="16"/>
+ <ROW Property="ProductCode" Value="1033:{F4513A63-407E-447E-A840-FAE83DF26A78} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="ZeroTier One"/>
<ROW Property="ProductVersion" Value="1.0.3" Type="32"/>
diff --git a/osdep/WindowsEthernetTap.cpp b/osdep/WindowsEthernetTap.cpp
index 1cea0d96..77e7dc9c 100644
--- a/osdep/WindowsEthernetTap.cpp
+++ b/osdep/WindowsEthernetTap.cpp
@@ -578,11 +578,6 @@ void WindowsEthernetTap::threadMain()
HANDLE wait4[3];
char *tapReadBuf = (char *)0;
- if (!_enableTapDevice()) {
- _enabled = false;
- return; // only happens if devcon is missing or totally fails
- }
-
/* No idea why I did this. I did it a long time ago and there was only a
* a snarky comment. But I'd never do crap like this without a reason, so
* I am leaving it alone with a more descriptive snarky comment. */
@@ -596,6 +591,9 @@ void WindowsEthernetTap::threadMain()
int prevTapResetStatus = _systemTapResetStatus;
bool throwOneAway = true; // "Power cycle" the network port once on startup, because Windows...
while (_run) {
+ _disableTapDevice();
+ Sleep(500);
+ _enableTapDevice();
Sleep(500);
_tap = CreateFileA(tapPath,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_SYSTEM|FILE_FLAG_OVERLAPPED,NULL);