Browse Source

ignore unpublished addresses

pull/1226/head
orignal 6 years ago
parent
commit
863baeb68b
  1. 4
      daemon/UPnP.cpp

4
daemon/UPnP.cpp

@ -131,7 +131,7 @@ namespace transport @@ -131,7 +131,7 @@ namespace transport
const auto& a = context.GetRouterInfo().GetAddresses();
for (const auto& address : a)
{
if (!address->host.is_v6 ())
if (!address->host.is_v6 () && address->port)
TryPortMapping (address);
}
m_Timer.expires_from_now (boost::posix_time::minutes(20)); // every 20 minutes
@ -148,7 +148,7 @@ namespace transport @@ -148,7 +148,7 @@ namespace transport
const auto& a = context.GetRouterInfo().GetAddresses();
for (const auto& address : a)
{
if (!address->host.is_v6 ())
if (!address->host.is_v6 () && address->port)
CloseMapping (address);
}
}

Loading…
Cancel
Save