Deny secure mode violation with 606 action not authorized if supported
606 was added in IGDv2. closes #677
This commit is contained in:
parent
d995a37598
commit
1e608d8fd5
|
@ -2,7 +2,7 @@
|
||||||
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
||||||
* MiniUPnP project
|
* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
||||||
* (c) 2006-2023 Thomas Bernard
|
* (c) 2006-2024 Thomas Bernard
|
||||||
* This software is subject to the conditions detailed
|
* This software is subject to the conditions detailed
|
||||||
* in the LICENCE file provided within the distribution */
|
* in the LICENCE file provided within the distribution */
|
||||||
|
|
||||||
|
@ -479,7 +479,11 @@ AddPortMapping(struct upnphttp * h, const char * action, const char * ns)
|
||||||
syslog(LOG_INFO, "Client %s tried to redirect port to %s",
|
syslog(LOG_INFO, "Client %s tried to redirect port to %s",
|
||||||
inet_ntoa(h->clientaddr), int_ip);
|
inet_ntoa(h->clientaddr), int_ip);
|
||||||
ClearNameValueList(&data);
|
ClearNameValueList(&data);
|
||||||
|
#ifdef IGD_V2
|
||||||
|
SoapError(h, 606, "Action not authorized");
|
||||||
|
#else
|
||||||
SoapError(h, 718, "ConflictInMappingEntry");
|
SoapError(h, 718, "ConflictInMappingEntry");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -912,8 +916,11 @@ DeletePortMapping(struct upnphttp * h, const char * action, const char * ns)
|
||||||
{
|
{
|
||||||
if(h->clientaddr.s_addr != int_ip_addr.s_addr)
|
if(h->clientaddr.s_addr != int_ip_addr.s_addr)
|
||||||
{
|
{
|
||||||
|
#ifdef IGD_V2
|
||||||
SoapError(h, 606, "Action not authorized");
|
SoapError(h, 606, "Action not authorized");
|
||||||
/*SoapError(h, 714, "NoSuchEntryInArray");*/
|
#else
|
||||||
|
SoapError(h, 714, "NoSuchEntryInArray");
|
||||||
|
#endif
|
||||||
ClearNameValueList(&data);
|
ClearNameValueList(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue