use our local address correctly for user port-mapping requests

This commit is contained in:
arvidn 2020-01-19 20:16:57 +01:00 committed by Arvid Norberg
parent 7529d3e67e
commit f94c09c95d
1 changed files with 2 additions and 2 deletions

View File

@ -6700,9 +6700,9 @@ namespace aux {
for (auto& s : m_listen_sockets)
{
if (s->upnp_mapper) ret.push_back(s->upnp_mapper->add_mapping(t, external_port
, tcp::endpoint({}, static_cast<std::uint16_t>(local_port))));
, tcp::endpoint(s->local_endpoint.address(), static_cast<std::uint16_t>(local_port))));
if (s->natpmp_mapper) ret.push_back(s->natpmp_mapper->add_mapping(t, external_port
, tcp::endpoint({}, static_cast<std::uint16_t>(local_port))));
, tcp::endpoint(s->local_endpoint.address(), static_cast<std::uint16_t>(local_port))));
}
return ret;
}