Do not try portmapping when using traversal server

using portmapping with hosting while using traversal server (which is possible by checking the option while under "direct connect" and flipping back to traversal server) causes dolphin to request a mapping to external port 0.

In UPnP a mapping to external port 0 is actually the wildcard, which means that connection requests on all
external ports (that are not otherwise mapped) will be forwarded to the client.

Additionally it seems like using port mapping with traversal server is probably not expected behavior, as the option checkbox disappears when traversal server is used.
This commit is contained in:
jmlee337 2023-07-13 01:15:12 -07:00 committed by GitHub
parent 7f40c6f2f8
commit 550b9782e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ NetPlayServer::NetPlayServer(const u16 port, const bool forward_port, NetPlayUI*
m_chunked_data_thread = std::thread(&NetPlayServer::ChunkedDataThreadFunc, this);
#ifdef USE_UPNP
if (forward_port)
if (forward_port && !traversal_config.use_traversal)
Common::UPnP::TryPortmapping(port);
#endif
}