diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2018-11-03 01:22:59 +0100 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2018-11-03 02:36:24 +0100 |
commit | 900005ee75754ba62972ed8da6eba2d6b47e1b7f (patch) | |
tree | b32cfae94eba0f587b4a5de7e7a63800c2e86102 /package/network/utils/iperf/patches/0003-fix-non-ipv6-builds.patch | |
parent | 0411813c6f0520dea23a1c4f58f5956c504bf129 (diff) | |
download | upstream-900005ee75754ba62972ed8da6eba2d6b47e1b7f.tar.gz upstream-900005ee75754ba62972ed8da6eba2d6b47e1b7f.tar.bz2 upstream-900005ee75754ba62972ed8da6eba2d6b47e1b7f.zip |
iperf: allow non-ipv6 builds
Add configure argument --disable-ipv6 when ipv6 is deselected.
Add fix-non-ipv6-builds.patch as long there is no new upstream
release.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'package/network/utils/iperf/patches/0003-fix-non-ipv6-builds.patch')
-rw-r--r-- | package/network/utils/iperf/patches/0003-fix-non-ipv6-builds.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/package/network/utils/iperf/patches/0003-fix-non-ipv6-builds.patch b/package/network/utils/iperf/patches/0003-fix-non-ipv6-builds.patch new file mode 100644 index 0000000000..9d96c1919a --- /dev/null +++ b/package/network/utils/iperf/patches/0003-fix-non-ipv6-builds.patch @@ -0,0 +1,22 @@ +Index: iperf-2.0.12/src/Listener.cpp +=================================================================== +--- iperf-2.0.12.orig/src/Listener.cpp ++++ iperf-2.0.12/src/Listener.cpp +@@ -670,6 +670,7 @@ int Listener::L2_setup (void) { + + // 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,6 +683,9 @@ int Listener::L2_setup (void) { + WARN_errno( rc == SOCKET_ERROR, "l2 v4in6 connect ip bpf"); + } + } else { ++#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"); + } |