summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <steils@gentoo.org>2024-06-24 16:14:57 +0200
committerStefan Strogin <steils@gentoo.org>2024-06-24 14:17:02 +0000
commitbc250091db4bbc7b446ca0a816fba4035e6a6d3c (patch)
treed18d5583dde304d4362ddbca59d1a7a65f4bec05 /net-vpn
parentapp-backup/duplicity: drop 2.1.1 (diff)
downloadgentoo-bc250091db4bbc7b446ca0a816fba4035e6a6d3c.tar.gz
gentoo-bc250091db4bbc7b446ca0a816fba4035e6a6d3c.tar.bz2
gentoo-bc250091db4bbc7b446ca0a816fba4035e6a6d3c.zip
net-vpn/i2pd: add patch for miniupnp-2.2.8
Closes: https://bugs.gentoo.org/934058 Signed-off-by: Stefan Strogin <steils@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/i2pd/files/i2pd-2.52.0-miniupnp.patch37
-rw-r--r--net-vpn/i2pd/i2pd-2.52.0.ebuild2
2 files changed, 39 insertions, 0 deletions
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 <stefan@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"