mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
net-vpn/tinc: fix upnp issue
Closes: https://bugs.gentoo.org/935718 Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
18
net-vpn/tinc/files/tinc-1.1_pre18-fix-upnp.patch
Normal file
18
net-vpn/tinc/files/tinc-1.1_pre18-fix-upnp.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff --git a/src/upnp.c b/src/upnp.c
|
||||
index 553630e..fd2b30b 100644
|
||||
--- a/src/upnp.c
|
||||
+++ b/src/upnp.c
|
||||
@@ -124,8 +124,12 @@ static void upnp_refresh() {
|
||||
struct IGDdatas data;
|
||||
|
||||
char myaddr[64];
|
||||
-
|
||||
+#if (MINIUPNPC_API_VERSION >= 18)
|
||||
+ char wnaddr[64];
|
||||
+ int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr), wnaddr, sizeof(wnaddr));
|
||||
+#else
|
||||
int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr));
|
||||
+#endif
|
||||
|
||||
if(result <= 0) {
|
||||
logger(DEBUG_PROTOCOL, LOG_WARNING, "[upnp] No IGD found");
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
MY_P=${PN}-${MY_PV}
|
||||
@@ -13,6 +13,7 @@ HOMEPAGE="https://www.tinc-vpn.org/"
|
||||
|
||||
SRC_URI="https://www.tinc-vpn.org/packages/${MY_P}.tar.gz"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
@@ -25,15 +26,15 @@ DEPEND="
|
||||
lzo? ( dev-libs/lzo:2 )
|
||||
ncurses? ( sys-libs/ncurses:= )
|
||||
readline? ( sys-libs/readline:= )
|
||||
upnp? ( net-libs/miniupnpc )
|
||||
upnp? ( net-libs/miniupnpc:= )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}
|
||||
vde? ( net-misc/vde )"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/tinc-1.1_pre16-r1-fix-paths.patch #560528
|
||||
"${FILESDIR}"/${PN}-1.1-tinfo.patch #621868
|
||||
"${FILESDIR}"/${P}-fix-upnp.patch #935718
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@@ -45,7 +46,7 @@ src_prepare() {
|
||||
sed -i "6d" configure.ac || die
|
||||
sed -i "6iAC_INIT([tinc], ${PVR})" configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
Reference in New Issue
Block a user