diff options
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)); |