Skip to content
Snippets Groups Projects
Unverified Commit 45b50697 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

UPnP: workaround invalid action returned by some routers

Change-Id: I5db532611b48916b599d81515a37664a61830d20
parent 18d344dc
No related branches found
No related tags found
No related merge requests found
......@@ -1157,6 +1157,13 @@ PUPnP::actionIsIgdConnected(const UPnPIGD& igd)
nullptr,
action.get(),
&response_container_ptr);
if (upnp_err == 401) {
// YET ANOTHER UPNP HACK: MiniUpnp on some routers seems to not recognize this action, sending a 401: Invalid Action.
// So even if mapping succeeds, the router was considered as not connected.
// Returning true here works around this issue.
// E.g. https://community.tp-link.com/us/home/forum/topic/577840
return true;
}
if (not response_container_ptr or upnp_err != UPNP_E_SUCCESS) {
if (logger_) logger_->warn("PUPnP: Failed to send GetStatusInfo action -> {}", UpnpGetErrorMessage(upnp_err));
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment