diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-08-12 17:20:34 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-08-12 17:20:34 -0700 |
| commit | f8d4611d15b18bf505de9ca82d74f5102fc57024 (patch) | |
| tree | 731d0e6e1f808c227f1e82eaa15c238a3fa437a1 /osnet/WindowsRoutingTable.cpp | |
| parent | f25bd41a03561b960622fefd9ab22a03010e9733 (diff) | |
| download | infinitytier-f8d4611d15b18bf505de9ca82d74f5102fc57024.tar.gz infinitytier-f8d4611d15b18bf505de9ca82d74f5102fc57024.zip | |
(1) Tweak LAN locator beacon frequencies, (2) Windows virtual networks
now show up as *real* networks and prompt the user to set their
location and firewall status (public, private, home/work, etc.).
The hack used to achieve #2 should not be examined by children or those
suffering from epilepsy or heart conditions.
Diffstat (limited to 'osnet/WindowsRoutingTable.cpp')
| -rw-r--r-- | osnet/WindowsRoutingTable.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/osnet/WindowsRoutingTable.cpp b/osnet/WindowsRoutingTable.cpp index aa215fb0..eef03ae6 100644 --- a/osnet/WindowsRoutingTable.cpp +++ b/osnet/WindowsRoutingTable.cpp @@ -151,7 +151,9 @@ RoutingTable::Entry WindowsRoutingTable::set(const InetAddress &destination,cons _copyInetAddressToSockaddrInet(gateway,nr.NextHop); nr.Metric = metric; nr.Protocol = MIB_IPPROTO_NETMGMT; - CreateIpForwardEntry2(&nr); + DWORD result = CreateIpForwardEntry2(&nr); + if (result != NO_ERROR) + return RoutingTable::Entry(); } std::vector<RoutingTable::Entry> rtab(get(true,true)); |
