diff options
author | Jeroen Roovers <jer@gentoo.org> | 2018-09-01 14:32:05 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2018-09-01 14:32:11 +0200 |
commit | 0bf6e057a254ef89f7372c7fb8ebaa0a2dceb47c (patch) | |
tree | 2b13bcd784360cde0ef46d132965decaf69e388e /net-misc/iperf | |
parent | dev-lang/gprolog: do not write outside of sandbox during tests (diff) | |
download | gentoo-0bf6e057a254ef89f7372c7fb8ebaa0a2dceb47c.tar.gz gentoo-0bf6e057a254ef89f7372c7fb8ebaa0a2dceb47c.tar.bz2 gentoo-0bf6e057a254ef89f7372c7fb8ebaa0a2dceb47c.zip |
net-misc/iperf: Fix USE=-ipv6
Fixes: https://bugs.gentoo.org/659324
Package-Manager: Portage-2.3.48, Repoman-2.3.10
Diffstat (limited to 'net-misc/iperf')
-rw-r--r-- | net-misc/iperf/files/iperf-2.0.12-ipv6.patch | 23 | ||||
-rw-r--r-- | net-misc/iperf/iperf-2.0.12.ebuild | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/net-misc/iperf/files/iperf-2.0.12-ipv6.patch b/net-misc/iperf/files/iperf-2.0.12-ipv6.patch new file mode 100644 index 000000000000..cd189f62108b --- /dev/null +++ b/net-misc/iperf/files/iperf-2.0.12-ipv6.patch @@ -0,0 +1,23 @@ +--- a/src/Listener.cpp ++++ b/src/Listener.cpp +@@ -670,6 +670,7 @@ + + // Now optimize packet flow up the raw socket + // Establish the flow BPF to forward up only "connected" packets to this raw socket ++#ifdef HAVE_IPV6 + if (l->sa_family == AF_INET6) { + struct in6_addr *v6peer = SockAddr_get_in6_addr(&server->peer); + struct in6_addr *v6local = SockAddr_get_in6_addr(&server->local); +@@ -682,9 +683,12 @@ + WARN_errno( rc == SOCKET_ERROR, "l2 v4in6 connect ip bpf"); + } + } else { ++#endif + rc = SockAddr_v4_Connect_BPF(server->mSock, ((struct sockaddr_in *)(l))->sin_addr.s_addr, ((struct sockaddr_in *)(p))->sin_addr.s_addr, ((struct sockaddr_in *)(l))->sin_port, ((struct sockaddr_in *)(p))->sin_port); + WARN_errno( rc == SOCKET_ERROR, "l2 connect ip bpf"); ++#ifdef HAVE_IPV6 + } ++#endif + if (rc < 0) + return -1; + else diff --git a/net-misc/iperf/iperf-2.0.12.ebuild b/net-misc/iperf/iperf-2.0.12.ebuild index 3eab18822777..95f3d7dca146 100644 --- a/net-misc/iperf/iperf-2.0.12.ebuild +++ b/net-misc/iperf/iperf-2.0.12.ebuild @@ -13,6 +13,9 @@ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86- IUSE="ipv6 threads debug" DOCS="INSTALL README" +PATCHES=( + "${FILESDIR}"/${PN}-2.0.12-ipv6.patch +) src_configure() { econf \ |