1 |
commit: 0bf6e057a254ef89f7372c7fb8ebaa0a2dceb47c |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 1 12:32:05 2018 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 1 12:32:11 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bf6e057 |
7 |
|
8 |
net-misc/iperf: Fix USE=-ipv6 |
9 |
|
10 |
Fixes: https://bugs.gentoo.org/659324 |
11 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
12 |
|
13 |
net-misc/iperf/files/iperf-2.0.12-ipv6.patch | 23 +++++++++++++++++++++++ |
14 |
net-misc/iperf/iperf-2.0.12.ebuild | 3 +++ |
15 |
2 files changed, 26 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/iperf/files/iperf-2.0.12-ipv6.patch b/net-misc/iperf/files/iperf-2.0.12-ipv6.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..cd189f62108 |
20 |
--- /dev/null |
21 |
+++ b/net-misc/iperf/files/iperf-2.0.12-ipv6.patch |
22 |
@@ -0,0 +1,23 @@ |
23 |
+--- a/src/Listener.cpp |
24 |
++++ b/src/Listener.cpp |
25 |
+@@ -670,6 +670,7 @@ |
26 |
+ |
27 |
+ // Now optimize packet flow up the raw socket |
28 |
+ // Establish the flow BPF to forward up only "connected" packets to this raw socket |
29 |
++#ifdef HAVE_IPV6 |
30 |
+ if (l->sa_family == AF_INET6) { |
31 |
+ struct in6_addr *v6peer = SockAddr_get_in6_addr(&server->peer); |
32 |
+ struct in6_addr *v6local = SockAddr_get_in6_addr(&server->local); |
33 |
+@@ -682,9 +683,12 @@ |
34 |
+ WARN_errno( rc == SOCKET_ERROR, "l2 v4in6 connect ip bpf"); |
35 |
+ } |
36 |
+ } else { |
37 |
++#endif |
38 |
+ 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); |
39 |
+ WARN_errno( rc == SOCKET_ERROR, "l2 connect ip bpf"); |
40 |
++#ifdef HAVE_IPV6 |
41 |
+ } |
42 |
++#endif |
43 |
+ if (rc < 0) |
44 |
+ return -1; |
45 |
+ else |
46 |
|
47 |
diff --git a/net-misc/iperf/iperf-2.0.12.ebuild b/net-misc/iperf/iperf-2.0.12.ebuild |
48 |
index 3eab1882277..95f3d7dca14 100644 |
49 |
--- a/net-misc/iperf/iperf-2.0.12.ebuild |
50 |
+++ b/net-misc/iperf/iperf-2.0.12.ebuild |
51 |
@@ -13,6 +13,9 @@ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86- |
52 |
IUSE="ipv6 threads debug" |
53 |
|
54 |
DOCS="INSTALL README" |
55 |
+PATCHES=( |
56 |
+ "${FILESDIR}"/${PN}-2.0.12-ipv6.patch |
57 |
+) |
58 |
|
59 |
src_configure() { |
60 |
econf \ |