0ad/source
Dunedan a7694ef8b3
Fix adding port forwardings using UPnP
The UPnP implementation included a combination of two subtle bugs, which
resulted in failure to create port forwardings every time after the
first one.

When using UPnP, the internet gateway to create the port forwardings at
needs to discovered. As that takes a while, the its root descriptor URL
was supposed to be cached after successful discovery in the user config
in "network.upnprootdescurl". However, instead of caching the root
descriptor URL, the control URL got cached. That caused following
requests to the root descriptor URL to fail, as they ended up at the
control URL instead. As such requests might also fail when the network
topology changed, the code was supposed to fall back to discovering the
internet gateway again when the cached one didn't work. However, due to
the inner workings of miniupnpc the request using the cached root
descriptor URL didn't result in an error, so the new discovery was never
triggered. As the wrong value was persisted in the user config there was
also no way to get out of this situation again.

This commit fixes both of these bugs.

As far as I can tell these bugs existed since the introduction of the
caching of the root descriptor URL in 0ba25e9968, which means creating
port forwardings using UPnP has been broken since Alpha 15.

(cherry picked from commit 18d7746c84)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:44:35 +02:00
..
collada Update trac links with gitea links 2024-12-10 11:29:48 +01:00
graphics Fixes runtime switch of the GPU skinning. 2025-05-01 08:56:56 +02:00
gui Fix alignment issue with 'imgleft' and 'imgright' 2025-01-20 22:07:59 +01:00
i18n Update trac links with gitea links 2024-12-10 11:29:48 +01:00
lib Sign and notarize macOS bundles 2025-01-03 22:51:17 +01:00
lobby Allow to change a password from the lobby page 2024-12-08 17:13:47 +01:00
maths Update trac links with gitea links 2024-12-10 11:29:48 +01:00
mocks Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
network Fix adding port forwardings using UPnP 2025-05-15 13:44:35 +02:00
pch Remove glooxwrapper 2024-11-25 20:01:00 +01:00
ps Don't map unknown scancodes to hotkeys 2025-05-01 08:56:52 +02:00
renderer Fixes runtime switch of the GPU skinning. 2025-05-01 08:56:56 +02:00
rlinterface Shutdown mongoose in rl-interface gracefully 2024-06-23 17:26:03 +00:00
scriptinterface Add workaround to turn off nursery size heuristic 2025-05-01 08:56:53 +02:00
simulation2 Only freeze once the cached JS values of templates 2025-01-08 14:39:38 +01:00
soundmanager Fix sounds playing in the wrong places of the map 2025-01-04 23:18:46 +01:00
third_party Ignore cast warning in mongoose 2024-12-05 09:51:27 +01:00
tools Update supported languages for the NSI installer 2025-01-28 19:30:34 +01:00
main.cpp Catch all std::exception when loading a map 2025-01-01 22:23:38 +01:00
test_setup.cpp Make the TaskManager a automatic livetime object 2024-11-17 18:03:49 +01:00