Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Open.Nat/Upnp/UpnpConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ internal static class UpnpConstants
{
public const int InvalidArguments = 402;
public const int ActionFailed = 501;
public const int ArgumentValueOutOfRange = 601;
public const int Unathorized = 606;
public const int SpecifiedArrayIndexInvalid = 713; public const int NoSuchEntryInArray = 714;
public const int WildCardNotPermittedInSourceIp = 715;
Expand Down
8 changes: 6 additions & 2 deletions Open.Nat/Upnp/UpnpNatDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ public override async Task<IEnumerable<Mapping>> GetAllMappingsAsync()
// DD-WRT Linux base router (and others probably) fails with 402-InvalidArgument when index is out of range
|| e.ErrorCode == UpnpConstants.InvalidArguments
// LINKSYS WRT1900AC AC1900 it returns errocode 501-PAL_UPNP_SOAP_E_ACTION_FAILED
|| e.ErrorCode == UpnpConstants.ActionFailed)
|| e.ErrorCode == UpnpConstants.ActionFailed
// LINKSYS EA8300 fails with 601:"Argument Value Out of Range" when index is out of range
|| e.ErrorCode == UpnpConstants.ArgumentValueOutOfRange)
{
NatDiscoverer.TraceSource.LogWarn("Router failed with {0}-{1}. No more mappings is assumed.", e.ErrorCode, e.ErrorText);
break;
Expand Down Expand Up @@ -458,7 +460,9 @@ public override async Task<Mapping> GetSpecificMappingAsync (Protocol protocol,
// DD-WRT Linux base router (and others probably) fails with 402-InvalidArgument when index is out of range
|| e.ErrorCode == UpnpConstants.InvalidArguments
// LINKSYS WRT1900AC AC1900 it returns errocode 501-PAL_UPNP_SOAP_E_ACTION_FAILED
|| e.ErrorCode == UpnpConstants.ActionFailed)
|| e.ErrorCode == UpnpConstants.ActionFailed
// LINKSYS EA8300 fails with 601:"Argument Value Out of Range" when index is out of range
|| e.ErrorCode == UpnpConstants.ArgumentValueOutOfRange)
{
NatDiscoverer.TraceSource.LogWarn("Router failed with {0}-{1}. No more mappings is assumed.", e.ErrorCode, e.ErrorText);
return null;
Expand Down