miniupnpd: GetExternalIPAddress(): Instead of invalid IP address 0.0.0.0 returns error 501
IP address 0.0.0.0 is filled when it is not possible to retrieve IP address. According to specification, GetExternalIPAddress() can return error 501 when action failed.
This commit is contained in:
parent
8c97654d70
commit
c1472ffe4e
|
@ -359,6 +359,11 @@ GetExternalIPAddress(struct upnphttp * h, const char * action, const char * ns)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
if (strcmp(ext_ip_addr, "0.0.0.0") == 0)
|
||||
{
|
||||
SoapError(h, 501, "Action Failed");
|
||||
return;
|
||||
}
|
||||
bodylen = snprintf(body, sizeof(body), resp,
|
||||
action, ns, /*SERVICE_TYPE_WANIPC,*/
|
||||
ext_ip_addr, action);
|
||||
|
|
Loading…
Reference in New Issue