[Bug 280298] net/miniupnpc: in 2.2.8 changed API for UPNP_GetValidIGD: build error net-p2p/transmission-components and other
Date: Fri, 19 Jul 2024 16:30:30 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280298 --- Comment #50 from Vladimir Druzenko <vvd@FreeBSD.org> --- For example net-p2p/monero-cli use it: result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); freeUPNPDevlist(deviceList); if (result > 0) { if (result == 1) { std::ostringstream portString; portString << port; // Delete the port mapping before we create it, just in case we have dangling port mapping from the daemon not being shu t down correctly UPNP_DeletePortMapping(urls.controlURL, igdData.first.servicetype, portString.str().c_str(), "TCP", 0); int portMappingResult; portMappingResult = UPNP_AddPortMapping(urls.controlURL, igdData.first.servicetype, portString.str().c_str(), portString .str().c_str(), lanAddress, CRYPTONOTE_NAME, "TCP", 0, "0"); if (portMappingResult != 0) { LOG_ERROR("UPNP_AddPortMapping failed, error: " << strupnperror(portMappingResult)); } else { MLOG_GREEN(el::Level::Info, "Added IGD port mapping."); } } else if (result == 2) { MWARNING("IGD was found but reported as not connected."); } else if (result == 3) { MWARNING("UPnP device was found but not recognized as IGD."); } else { MWARNING("UPNP_GetValidIGD returned an unknown result code."); } But this was changed: https://github.com/miniupnp/miniupnp/commit/c0a50ce33e3b99ce8a96fd43049bb5b53ffac62f#diff-5a0d7cff00628c2c64a617edb347c0f283e3a75e7df910e7e8438fc6db23f610L108 Also better to check upstream patches/issues and get or post patch. -- You are receiving this mail because: You are the assignee for the bug.