From 55e650b125a8329f06c6d589b5b71f40911898ef Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sun, 25 Feb 2024 01:40:25 +0100 Subject: [PATCH] fix IGDv2 WANIPConnection XML service description for AddAnyPortMapping out argument is NewReservedPort, not NewExternalPort. Changelog + check precisely lenth of 12 --- miniupnpd/Changelog.txt | 4 ++++ miniupnpd/upnpdescgen.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 9de5ec5..519829b 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -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 diff --git a/miniupnpd/upnpdescgen.c b/miniupnpd/upnpdescgen.c index ce97770..cc02a71 100644 --- a/miniupnpd/upnpdescgen.c +++ b/miniupnpd/upnpdescgen.c @@ -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");