From e165af32ae26f7a2a3a5f2847d265ebd7a0a8aad Mon Sep 17 00:00:00 2001 From: Self-Hosting-Group <155233284+Self-Hosting-Group@users.noreply.github.com> Date: Sat, 13 Jan 2024 10:10:13 +0100 Subject: [PATCH] upnpc: Show hint to use IPv6 (option -6) for pinhole commands Control points that have not been authenticated and authorized as defined in IGDv2 SHOULD use their IPv6 GUA when calling this action. http://upnp.org/specs/gw/UPnP-gw-WANIPv6FirewallControl-v1-Service.pdf --- miniupnpc/src/upnpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/miniupnpc/src/upnpc.c b/miniupnpc/src/upnpc.c index d0ea938..2c65f28 100644 --- a/miniupnpc/src/upnpc.c +++ b/miniupnpc/src/upnpc.c @@ -691,6 +691,10 @@ int main(int argc, char ** argv) return 1; } + if(ipv6 == 0 && (command == 'A' || command == 'D' || command == 'U' || command == 'K' || command == 'C' || command == 'G')) { + printf("Use IPv6 (option -6) GUA address to ensure UPnP IGDv2 pinholes are allowed\n\n"); + } + if( rootdescurl || (devlist = upnpDiscover(2000, multicastif, minissdpdpath, localport, ipv6, ttl, &error)))