fix IGDv2 WANIPConnection XML service description for AddAnyPortMapping

out argument is NewReservedPort, not NewExternalPort.

Changelog + check precisely lenth of 12
This commit is contained in:
Thomas Bernard 2024-02-25 01:40:25 +01:00
parent f79e20d17d
commit 55e650b125
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
$Id: Changelog.txt,v 1.510 2024/01/17 00:05:12 nanard Exp $
2024/02/25:
fix IGDv2 WANIPConnection XML service description for AddAnyPortMapping
out argument is NewReservedPort, not NewExternalPort
2024/01/17:
default path for miniupnpd.conf is /etc/miniupnpd/miniupnpd.conf
under linux

View File

@ -1124,7 +1124,7 @@ genServiceDesc(int * len, const struct serviceDesc * s, int force_igd1)
#ifdef IGD_V2
} else if(plen >= 11 && 0 == memcmp(p, "A_ARG_TYPE_", 11)) {
str = strcat_str(str, len, &tmplen, p + 11);
} else if(plen >= 12 && 0 == memcmp(p, "ExternalPort", 12)
} else if(plen == 12 && 0 == memcmp(p, "ExternalPort", 12)
&& args[j].dir == 2
&& 0 == memcmp(acts[i].name, "AddAnyPortMapping", 18)) {
str = strcat_str(str, len, &tmplen, "ReservedPort");