summaryrefslogtreecommitdiff
path: root/osnet
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-08 14:57:13 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-08 14:57:13 -0700
commitfe3ad5e2cc27b6b7e9bf8f78e6e681bd10315143 (patch)
tree815b6d4750fc9162841aeeae121be5e17bd0e172 /osnet
parent502ea66f151b0bef05c5a4183e955c2d358a837a (diff)
downloadinfinitytier-fe3ad5e2cc27b6b7e9bf8f78e6e681bd10315143.tar.gz
infinitytier-fe3ad5e2cc27b6b7e9bf8f78e6e681bd10315143.zip
Fix a Windows bug in refactored tap code, and always make sure we have a firewall exception rule on startup.
Diffstat (limited to 'osnet')
-rw-r--r--osnet/WindowsEthernetTap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/osnet/WindowsEthernetTap.cpp b/osnet/WindowsEthernetTap.cpp
index 8326597a..0e580643 100644
--- a/osnet/WindowsEthernetTap.cpp
+++ b/osnet/WindowsEthernetTap.cpp
@@ -706,8 +706,9 @@ NET_IFINDEX WindowsEthernetTap::_getDeviceIndex()
for(ULONG i=0;i<ift->NumEntries;++i) {
if (ift->Table[i].InterfaceLuid.Value == _deviceLuid.Value) {
+ NET_IFINDEX idx = ift->Table[i].InterfaceIndex;
FreeMibTable(ift);
- return ift->Table[i].InterfaceIndex;
+ return idx;
}
}