summaryrefslogtreecommitdiff
path: root/net-analyzer/tcpreplay
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/tcpreplay
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/tcpreplay')
-rw-r--r--net-analyzer/tcpreplay/Manifest9
-rw-r--r--net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch19
-rw-r--r--net-analyzer/tcpreplay/files/tcpreplay-4.1.2-CVE-2017-6429.patch27
-rw-r--r--net-analyzer/tcpreplay/metadata.xml24
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-4.1.2-r1.ebuild77
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-4.2.6.ebuild74
6 files changed, 230 insertions, 0 deletions
diff --git a/net-analyzer/tcpreplay/Manifest b/net-analyzer/tcpreplay/Manifest
new file mode 100644
index 000000000000..0e74b21006b6
--- /dev/null
+++ b/net-analyzer/tcpreplay/Manifest
@@ -0,0 +1,9 @@
+AUX tcpreplay-4.1.0-enable-pcap_findalldevs.patch 601 SHA256 b25a3bb306fc6a4375c5e340836de2a03802fa8f43aa0cc96bc69f74ae8d5394 SHA512 6aa44d082e068de90a431071d94e4351257e5074f1b36617c1d7226ed18c5a6e76f06a0e9f20f41772e1d33af72ea23cbaa29a4dcf3018a567412a0d0fac72de WHIRLPOOL 23158c734f69a4afc30ba5174923138de9e0d4e0dbea1220574d7f84f8f33dbe0bace9897bee691e38f586372bde4b080f3d1a2512fcca718c35839550ac4ba3
+AUX tcpreplay-4.1.2-CVE-2017-6429.patch 858 SHA256 a45572a46bd63e79556b0f55fd3c7cafc83566e0350cb8750b40c8a2fcd09416 SHA512 934a42f9b70c882780a4a2fe3c9621b8a8380199ea63056291d27cbce006afcddc7331f9b73c8c244e89229c8526c55d2f534bedba50fb3d28ec3b873f700e3f WHIRLPOOL cf7a3a61df5a86a1095d83045dad1c8ef2e33e76e516fcbd47ff8d3f01626e70809b5d6dd1e75c19357f5e3725c61a2b8e7ebdbdda244039ebf13aeb908d7bc6
+DIST tcpreplay-4.1.2.tar.gz 2162175 SHA256 da483347e83a9b5df0e0dbb0f822a2d37236e79dda35f4bc4e6684fa827f25ea SHA512 3a7d125f38fe15070d666eacb4a5ef026a73ff850adec7ef3592966f38d1d155002792c5d5ac2476aa034d71be5f31b9dacd5be34af01a336149af3a42cad360 WHIRLPOOL e5ca80234655b3614eebd400954b53d958d08dbe91cf123db07935e5bebfb34ad40cd41a7a25a8d8ee684dbcaeda41c75a18503172830141dca022713b7814d6
+DIST tcpreplay-4.2.6.tar.gz 3494827 SHA256 043756c532dab93e2be33a517ef46b1341f7239278a1045ae670041dd8a4531d SHA512 a46846b29e3cd7fbc635faee9c4be90db0d346c0d0f291ac8e007e1fbf614289094e14480c1c5b40feb5a175d3cbad018e2dd4d1a5762b7d31a4325af6102e7e WHIRLPOOL 97502778faee6dd27516c0323b6f4589b30a621e0380c579a68bd75744e03e1ec542e45b86427bff9482145dacae4d98d4a2025436c6411cb25f0fec306acc8f
+EBUILD tcpreplay-4.1.2-r1.ebuild 2020 SHA256 da13bfb804f5263d5768c4e4915ec1616a74311fc93b3743e237a98ba5087f03 SHA512 f39b594d93adf778e7432fc0770ac4e3328fea9cb082169fe426e09034e997ddbff43b5b2678ed8324e7d0a95fb05513384c6bcdc94816711b05e2bff561c67b WHIRLPOOL b224d077dfdfa8877d248b1b46f2a28287baef61b20f905a724e85d2807a374feb703ff6ede09e7fcf60bed641ff78a75ebf37957ec4da5dafdd693c16429f74
+EBUILD tcpreplay-4.2.6.ebuild 1923 SHA256 8b847b18577fc5552549f363df610ce96274c597b74689becd0d0e1ded58faa4 SHA512 a9d31e3a2db7b7ec12c68a3229c7f0137daaaf6acf35808f7f797f11c025263c3f533c528d5bc763fe8f490ae24aa72f2351a5c2ef9154f96e347bf9c1486752 WHIRLPOOL f9f2c53fc16c0aa0ef7cefb8fe75f99212647e60b26ec0c0110ac0bfb45f3b46bf95ffc0d975f776963f12cb827832de17ddfc1f1d6b54ed603a13aba6fb00c4
+MISC ChangeLog 4836 SHA256 2cf48e634a002228b5769f0789b8e9f2298a0d9bd79ff3f9fa2990697b9875ba SHA512 d51648eff360637f5644e1420bb64eefa71c43fb25211779d0f742d1c3e7ce9007a130c936bbc8220054904c3ff85bb2dd844d771548e425210bcabc58c96e2e WHIRLPOOL 7077be307e6861c5178e41bedf353116911dad37f4c1973437d1f15ce2729be1fec0e00e74fd849a9d46137abbd368791c649c2cf849d24deabcab242028da0f
+MISC ChangeLog-2015 10263 SHA256 e4e73c4d2313866c04941c53076fff8eea1c12f5c303da7d434a69aa027182d8 SHA512 0c51391a412c593abfd71037463e012477f21ac0501bc04eceb61353bc105c488403038e2500b47a2f36442a42d2fae76e00a8a75b8bd73b11722e61fd58280f WHIRLPOOL 66f5c88a453f0641f4027d08d7bc3c51a597dca9e6cf52cd9b6277e1cef14d5dcffc3a6768d77ddf492e57ce98deb0ddea7407a33b5a7821b48f4d880812730b
+MISC metadata.xml 1116 SHA256 28c7a3895300c6912e12a56cc5d9d72ff620426813ad39f6cf8cc69f9136c742 SHA512 58cb13a648ba7b9f9fd8c7a7cdfd37d56f0d7b957824a55d63001a8708f93d529b29e52df051bdce0c87eb672d24c7b2c35ee8a1e94ba062e2a1e12dd0d0ee1b WHIRLPOOL 6a9ad176ccb7e9654d3ea6992d97441ab54a7232844251afb075b6248a8f12c1196f03ac66d8c5f4a205d87857a3f2e56b8883e95835d172e97e692245fe67d4
diff --git a/net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch b/net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch
new file mode 100644
index 000000000000..f45d14cd1da1
--- /dev/null
+++ b/net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1499,6 +1499,8 @@
+ AC_MSG_WARN(Unable to do tests when cross-compiling)
+ fi
+
++disable_pcap_findalldevs=no
++
+ dnl Allows user to choose which nic to use for testing purposes
+ AC_ARG_WITH(testnic,
+ AC_HELP_STRING([--with-testnic=NIC], [Select which network card to use for testing]),
+@@ -1509,7 +1511,6 @@
+
+ dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC to disassociate
+ dnl so under OSX we disable the interface list feature
+-disable_pcap_findalldevs=no
+
+ osx_frameworks=no
+ dnl these need to be dynamic based on OS
diff --git a/net-analyzer/tcpreplay/files/tcpreplay-4.1.2-CVE-2017-6429.patch b/net-analyzer/tcpreplay/files/tcpreplay-4.1.2-CVE-2017-6429.patch
new file mode 100644
index 000000000000..42c74d650712
--- /dev/null
+++ b/net-analyzer/tcpreplay/files/tcpreplay-4.1.2-CVE-2017-6429.patch
@@ -0,0 +1,27 @@
+--- a/src/tcpcapinfo.c
++++ b/src/tcpcapinfo.c
+@@ -281,6 +281,15 @@ main(int argc, char *argv[])
+ caplen = pcap_ph.caplen;
+ }
+
++ if (caplentoobig) {
++ printf("\n\nCapture file appears to be damaged or corrupt.\n"
++ "Contains packet of size %u, bigger than snap length %u\n",
++ caplen, pcap_fh.snaplen);
++
++ close(fd);
++ break;
++ }
++
+ /* check to make sure timestamps don't go backwards */
+ if (last_sec > 0 && last_usec > 0) {
+ if ((pcap_ph.ts.tv_sec == last_sec) ?
+@@ -306,7 +315,7 @@ main(int argc, char *argv[])
+ }
+
+ close(fd);
+- continue;
++ break;
+ }
+
+ /* print the frame checksum */
diff --git a/net-analyzer/tcpreplay/metadata.xml b/net-analyzer/tcpreplay/metadata.xml
new file mode 100644
index 000000000000..e53da7185c86
--- /dev/null
+++ b/net-analyzer/tcpreplay/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <longdescription>
+ Tcpreplay is a suite of utilities for UNIX systems for editing and replaying
+ network traffic which was previously captured by tools like tcpdump and
+ ethereal/wireshark. The goal of tcpreplay is to provide the means for
+ providing reliable and repeatible means for testing a variety of network
+ devices such as switches, router, firewalls, network intrusion detection and
+ prevention systems (IDS and IPS).
+ </longdescription>
+ <use>
+ <flag name="pcapnav">Enable if you want the jump to byte offset feature via <pkg>net-libs/libpcapnav</pkg></flag>
+ <flag name="tcpdump">Use <pkg>net-analyzer/tcpdump</pkg> for packet decoding feature </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">appneta/tcpreplay</remote-id>
+ <remote-id type="sourceforge">tcpreplay</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tcpreplay/tcpreplay-4.1.2-r1.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.1.2-r1.ebuild
new file mode 100644
index 000000000000..abd2c47ceca8
--- /dev/null
+++ b/net-analyzer/tcpreplay/tcpreplay-4.1.2-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools flag-o-matic
+
+DESCRIPTION="utilities for editing and replaying previously captured network traffic"
+HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay"
+LICENSE="BSD GPL-3"
+SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86"
+IUSE="debug pcapnav +tcpdump"
+
+DEPEND="
+ >=sys-devel/autogen-5.18.4[libopts]
+ dev-libs/libdnet
+ >=net-libs/libpcap-0.9
+ tcpdump? ( net-analyzer/tcpdump )
+ pcapnav? ( net-libs/libpcapnav )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+ docs/{CHANGELOG,CREDIT,HACKING,TODO}
+)
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.1.0-enable-pcap_findalldevs.patch
+ "${FILESDIR}"/${PN}-4.1.2-CVE-2017-6429.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's|-O3||g' \
+ -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
+ configure.ac || die
+ sed -i \
+ -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \
+ src/common/sendpacket.c || die
+ sed -i \
+ -e 's|@\([A-Z_]*\)@|$(\1)|g' \
+ -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \
+ -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \
+ src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # By default it uses static linking. Avoid that, bug 252940
+ econf \
+ $(use_enable debug) \
+ $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \
+ $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \
+ --disable-local-libopts \
+ --enable-dynamic-link \
+ --enable-shared \
+ --with-libdnet \
+ --with-testnic2=lo \
+ --with-testnic=lo
+}
+
+src_test() {
+ if [[ ! ${EUID} -eq 0 ]]; then
+ ewarn "Some tests were disabled due to FEATURES=userpriv"
+ ewarn "To run all tests issue the following command as root:"
+ ewarn " # make -C ${S}/test"
+ emake -j1 -C test tcpprep || die "self test failed - see ${S}/test/test.log"
+ else
+ emake -j1 test || {
+ ewarn "Note, that some tests require eth0 iface to be UP." ;
+ die "self test failed - see ${S}/test/test.log" ; }
+ fi
+}
diff --git a/net-analyzer/tcpreplay/tcpreplay-4.2.6.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.2.6.ebuild
new file mode 100644
index 000000000000..ee0ea9dffd4b
--- /dev/null
+++ b/net-analyzer/tcpreplay/tcpreplay-4.2.6.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools flag-o-matic
+
+DESCRIPTION="utilities for editing and replaying previously captured network traffic"
+HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay"
+LICENSE="BSD GPL-3"
+SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV/_/-}/${P/_/-}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="debug pcapnav +tcpdump"
+
+DEPEND="
+ >=sys-devel/autogen-5.18.4[libopts]
+ dev-libs/libdnet
+ >=net-libs/libpcap-0.9
+ tcpdump? ( net-analyzer/tcpdump )
+ pcapnav? ( net-libs/libpcapnav )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+ docs/{CHANGELOG,CREDIT,HACKING,TODO}
+)
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.1.0-enable-pcap_findalldevs.patch
+)
+
+S=${WORKDIR}/${P/_/-}
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \
+ src/common/sendpacket.c || die
+ sed -i \
+ -e 's|@\([A-Z_]*\)@|$(\1)|g' \
+ -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \
+ -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \
+ src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # By default it uses static linking. Avoid that, bug 252940
+ econf \
+ $(use_enable debug) \
+ $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \
+ $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \
+ --disable-local-libopts \
+ --enable-dynamic-link \
+ --enable-shared \
+ --with-libdnet \
+ --with-testnic2=lo \
+ --with-testnic=lo
+}
+
+src_test() {
+ if [[ ! ${EUID} -eq 0 ]]; then
+ ewarn "Some tests were disabled due to FEATURES=userpriv"
+ ewarn "To run all tests issue the following command as root:"
+ ewarn " # make -C ${S}/test"
+ emake -j1 -C test tcpprep || die "self test failed - see ${S}/test/test.log"
+ else
+ emake -j1 test || {
+ ewarn "Note, that some tests require eth0 iface to be UP." ;
+ die "self test failed - see ${S}/test/test.log" ; }
+ fi
+}