commit: bc250091db4bbc7b446ca0a816fba4035e6a6d3c Author: Stefan Strogin <steils <AT> gentoo <DOT> org> AuthorDate: Mon Jun 24 14:14:57 2024 +0000 Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> CommitDate: Mon Jun 24 14:17:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc250091
net-vpn/i2pd: add patch for miniupnp-2.2.8 Closes: https://bugs.gentoo.org/934058 Signed-off-by: Stefan Strogin <steils <AT> gentoo.org> net-vpn/i2pd/files/i2pd-2.52.0-miniupnp.patch | 37 +++++++++++++++++++++++++++ net-vpn/i2pd/i2pd-2.52.0.ebuild | 2 ++ 2 files changed, 39 insertions(+) diff --git a/net-vpn/i2pd/files/i2pd-2.52.0-miniupnp.patch b/net-vpn/i2pd/files/i2pd-2.52.0-miniupnp.patch new file mode 100644 index 000000000000..5c9ef9231351 --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.52.0-miniupnp.patch @@ -0,0 +1,37 @@ +commit 192e9ad7f6a6995ecb843fbbefe5425d0b37f6ee +Author: Stefan Strogin <ste...@steils.org> +Date: Mon Jun 17 17:10:23 2024 +0000 + + Support miniupnp-2.2.8 (fixes #2071) + + Use UPNP_GetValidIGD for getting external IP. + +diff --git a/daemon/UPnP.cpp b/daemon/UPnP.cpp +index 043d935e..7885578e 100644 +--- a/daemon/UPnP.cpp ++++ b/daemon/UPnP.cpp +@@ -115,10 +115,16 @@ namespace transport + return; + } + ++#if (MINIUPNPC_API_VERSION >= 18) ++ err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr), ++ m_externalIPAddress, sizeof (m_externalIPAddress)); ++#else + err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr)); ++#endif + m_upnpUrlsInitialized=err!=0; + if (err == UPNP_IGD_VALID_CONNECTED) + { ++#if (MINIUPNPC_API_VERSION < 18) + err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress); + if(err != UPNPCOMMAND_SUCCESS) + { +@@ -126,6 +132,7 @@ namespace transport + return; + } + else ++#endif + { + LogPrint (eLogError, "UPnP: Found Internet Gateway Device ", m_upnpUrls.controlURL); + if (!m_externalIPAddress[0]) diff --git a/net-vpn/i2pd/i2pd-2.52.0.ebuild b/net-vpn/i2pd/i2pd-2.52.0.ebuild index 0346c80cb527..504fce8a853d 100644 --- a/net-vpn/i2pd/i2pd-2.52.0.ebuild +++ b/net-vpn/i2pd/i2pd-2.52.0.ebuild @@ -27,6 +27,8 @@ CMAKE_USE_DIR="${WORKDIR}/${P}/build" DOCS=( ../README.md ../contrib/i2pd.conf ../contrib/tunnels.conf ) +PATCHES=( "${FILESDIR}/${P}-miniupnp.patch" ) + pkg_pretend() { if use i2p-hardening && ! tc-is-gcc; then die "i2p-hardening requires gcc"