Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
dhtnet
Commits
45b50697
Unverified
Commit
45b50697
authored
1 year ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
UPnP: workaround invalid action returned by some routers
Change-Id: I5db532611b48916b599d81515a37664a61830d20
parent
18d344dc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/upnp/protocol/pupnp/pupnp.cpp
+7
-0
7 additions, 0 deletions
src/upnp/protocol/pupnp/pupnp.cpp
with
7 additions
and
0 deletions
src/upnp/protocol/pupnp/pupnp.cpp
+
7
−
0
View file @
45b50697
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment