summaryrefslogtreecommitdiff
path: root/net/tcpreplay
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2017-12-04 09:32:01 +0000
committerhe <he@pkgsrc.org>2017-12-04 09:32:01 +0000
commit098174928d8067d172f1d144efc356df2d6a4029 (patch)
tree5b1cf61ada4730f53391192eb0ab0fdc499efcc3 /net/tcpreplay
parent9ebb7469ce9e042564a5d94dda01d79be5545faa (diff)
downloadpkgsrc-098174928d8067d172f1d144efc356df2d6a4029.tar.gz
Update tcpreplay to version 4.2.6.
This catches up with the project which has apparently moved to github.com. With it comes fixes for two known CVEs (CVE-2016-6160, CVE-2017-6429). There is otherwise a large set of changes, see the release history on github for the details. The license changed to gnu-gpl-v3, LICENSE setting added.
Diffstat (limited to 'net/tcpreplay')
-rw-r--r--net/tcpreplay/Makefile10
-rw-r--r--net/tcpreplay/PLIST4
-rw-r--r--net/tcpreplay/distinfo21
-rw-r--r--net/tcpreplay/patches/patch-aa34
-rw-r--r--net/tcpreplay/patches/patch-ab60
-rw-r--r--net/tcpreplay/patches/patch-lib_Makefile.in14
-rw-r--r--net/tcpreplay/patches/patch-libopts_makeshell.c44
-rw-r--r--net/tcpreplay/patches/patch-src_common_Makefile.in22
-rw-r--r--net/tcpreplay/patches/patch-src_common_cidr.c14
-rw-r--r--net/tcpreplay/patches/patch-src_common_get.c15
-rw-r--r--net/tcpreplay/patches/patch-src_common_mac.c24
-rw-r--r--net/tcpreplay/patches/patch-src_common_tcpdump.c14
-rw-r--r--net/tcpreplay/patches/patch-src_defines.h.in14
-rw-r--r--net/tcpreplay/patches/patch-src_tcpprep.c14
14 files changed, 100 insertions, 204 deletions
diff --git a/net/tcpreplay/Makefile b/net/tcpreplay/Makefile
index ca81dc8c6ad..7acd055e7e9 100644
--- a/net/tcpreplay/Makefile
+++ b/net/tcpreplay/Makefile
@@ -1,12 +1,14 @@
-# $NetBSD: Makefile,v 1.22 2013/10/31 02:25:16 minskim Exp $
+# $NetBSD: Makefile,v 1.23 2017/12/04 09:32:01 he Exp $
-DISTNAME= tcpreplay-3.4.4
+VERSION= 4.2.6
+DISTNAME= tcpreplay-${VERSION}
CATEGORIES= net
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcpreplay/}
+MASTER_SITES= ${MASTER_SITE_GITHUB:=appneta/tcpreplay/releases/download/v${VERSION}/}
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://tcpreplay.synfin.net/
+HOMEPAGE= http://tcpreplay.appneta.com/wiki/installation.html
COMMENT= Replay saved tcpdump or snoop files
+LICENSE= gnu-gpl-v3
BUILDLINK_API_DEPENDS.libpcap+= libpcap>=0.8.0
diff --git a/net/tcpreplay/PLIST b/net/tcpreplay/PLIST
index 4f8cbdb6f10..629fc365ebf 100644
--- a/net/tcpreplay/PLIST
+++ b/net/tcpreplay/PLIST
@@ -1,9 +1,11 @@
-@comment $NetBSD: PLIST,v 1.5 2009/05/02 17:35:43 minskim Exp $
+@comment $NetBSD: PLIST,v 1.6 2017/12/04 09:32:01 he Exp $
+bin/tcpcapinfo
bin/tcpbridge
bin/tcpprep
bin/tcpreplay
bin/tcpreplay-edit
bin/tcprewrite
+man/man1/tcpcapinfo.1
man/man1/tcpbridge.1
man/man1/tcpprep.1
man/man1/tcpreplay.1
diff --git a/net/tcpreplay/distinfo b/net/tcpreplay/distinfo
index e227068e8a2..53bb49e2202 100644
--- a/net/tcpreplay/distinfo
+++ b/net/tcpreplay/distinfo
@@ -1,14 +1,9 @@
-$NetBSD: distinfo,v 1.12 2015/11/04 00:35:40 agc Exp $
+$NetBSD: distinfo,v 1.13 2017/12/04 09:32:01 he Exp $
-SHA1 (tcpreplay-3.4.4.tar.gz) = 9e4cca81cfbfb919f8759e1a27ce1b3b963ff3b8
-RMD160 (tcpreplay-3.4.4.tar.gz) = 672812755ff39b284044b08cba32c574ab2b7e70
-SHA512 (tcpreplay-3.4.4.tar.gz) = b129f14689d73905fa3238090de397bf845d6764e73411738a82bdf39c3d4605ad9a64e55dfca88035716704015a1cfc8b4fe097e019e30f84379f4126700cc8
-Size (tcpreplay-3.4.4.tar.gz) = 947179 bytes
-SHA1 (patch-aa) = 377cd7e829b00df9aff0aeed4c4136317602334a
-SHA1 (patch-ab) = 54bd9c0a3e07eef3a3e4cfccc87c8351090301c1
-SHA1 (patch-lib_Makefile.in) = 9a59f2652c08efb87944e132998a3c0778a5b5a7
-SHA1 (patch-src_common_Makefile.in) = 7cd6878eecd94d735e314768a0302298ac415ffc
-SHA1 (patch-src_common_cidr.c) = 77694f71876916e9e77a0257ce91bf7bb2f140a2
-SHA1 (patch-src_common_tcpdump.c) = f46d713dc57db02845173dc92c4f2ec94c158298
-SHA1 (patch-src_defines.h.in) = 58fa82a29f997662d5e793461f4d3cfccd593eb0
-SHA1 (patch-src_tcpprep.c) = 2c5ce09986c4e215230472791a99c4c183223c85
+SHA1 (tcpreplay-4.2.6.tar.gz) = 8f7b91534d7936ae534d87689ad371fd4e4bb059
+RMD160 (tcpreplay-4.2.6.tar.gz) = afdbd71573d04afbe7f6594778e9dd1223b64ff0
+SHA512 (tcpreplay-4.2.6.tar.gz) = a46846b29e3cd7fbc635faee9c4be90db0d346c0d0f291ac8e007e1fbf614289094e14480c1c5b40feb5a175d3cbad018e2dd4d1a5762b7d31a4325af6102e7e
+Size (tcpreplay-4.2.6.tar.gz) = 3494827 bytes
+SHA1 (patch-libopts_makeshell.c) = 1da67df9acb4ac7972ed72db5b113bfee054aeae
+SHA1 (patch-src_common_get.c) = 71685be82d53faa5f1e73afcddb540506055e41e
+SHA1 (patch-src_common_mac.c) = e667846485bb1d07065f98cc685a318ee04873ec
diff --git a/net/tcpreplay/patches/patch-aa b/net/tcpreplay/patches/patch-aa
deleted file mode 100644
index dcc607610a2..00000000000
--- a/net/tcpreplay/patches/patch-aa
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2013/10/31 02:25:17 minskim Exp $
-
---- configure.ac.orig 2010-04-05 00:58:05.000000000 +0000
-+++ configure.ac
-@@ -351,9 +351,9 @@ for testdir in $trypcapdir /usr/local /o
- LPCAPINC="${testdir}/include/pcap.h"
- LPCAPINCDIR="${testdir}/include"
- if test $dynamic_link = yes; then
-- if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
-+ if test -e "${testdir}/lib64/libpcap${shrext_cmds}" ; then
- LPCAPLIB="-L${testdir}/lib64 -lpcap"
-- elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
-+ elif test -e "${testdir}/lib/libpcap${shrext_cmds}" ; then
- LPCAPLIB="-L${testdir}/lib -lpcap"
- else
- AC_ERROR([Unable to find libpcap in ${testdir}])
-@@ -810,7 +810,7 @@ libdnet_version=
- enable_fragroute=no
- trydnetdir=/usr/local
-
--if test $have_cygwin == no ; then
-+if test $have_cygwin = no ; then
- AC_MSG_CHECKING(for libdnet)
- AC_ARG_WITH(libdnet,
- AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]),
-@@ -1161,7 +1161,7 @@ case $host in
- ;;
- esac])
-
--AM_CONDITIONAL([ENABLE_OSX_FRAMEWORKS], test "$osx_frameworks" == "yes")
-+AM_CONDITIONAL([ENABLE_OSX_FRAMEWORKS], test "$osx_frameworks" = "yes")
-
- AC_ARG_WITH(testnic2,
- AC_HELP_STRING([--with-testnic2=NIC2], [Select an optional 2nd network card to use for testing]),
diff --git a/net/tcpreplay/patches/patch-ab b/net/tcpreplay/patches/patch-ab
deleted file mode 100644
index 34e73d43015..00000000000
--- a/net/tcpreplay/patches/patch-ab
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2013/11/19 03:07:49 minskim Exp $
-
---- configure.orig 2010-04-05 00:58:26.000000000 +0000
-+++ configure
-@@ -9872,7 +9872,11 @@ darwin* | rhapsody*)
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
-- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-+ if test .$module = .yes ; then
-+ shrext_cmds=".so"
-+ else
-+ shrext_cmds=".dylib"
-+ fi
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-@@ -14675,7 +14679,11 @@ darwin* | rhapsody*)
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
-- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-+ if test .$module = .yes ; then
-+ shrext_cmds=".so"
-+ else
-+ shrext_cmds=".dylib"
-+ fi
-
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-@@ -17353,9 +17361,9 @@ for testdir in $trypcapdir /usr/local /o
- LPCAPINC="${testdir}/include/pcap.h"
- LPCAPINCDIR="${testdir}/include"
- if test $dynamic_link = yes; then
-- if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
-+ if test -e "${testdir}/lib64/libpcap${shrext_cmds}" ; then
- LPCAPLIB="-L${testdir}/lib64 -lpcap"
-- elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
-+ elif test -e "${testdir}/lib/libpcap${shrext_cmds}" ; then
- LPCAPLIB="-L${testdir}/lib -lpcap"
- else
- as_fn_error "Unable to find libpcap in ${testdir}" "$LINENO" 5
-@@ -18172,7 +18180,7 @@ libdnet_version=
- enable_fragroute=no
- trydnetdir=/usr/local
-
--if test $have_cygwin == no ; then
-+if test $have_cygwin = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdnet" >&5
- $as_echo_n "checking for libdnet... " >&6; }
-
-@@ -18751,7 +18759,7 @@ esac
- fi
-
-
-- if test "$osx_frameworks" == "yes"; then
-+ if test "$osx_frameworks" = "yes"; then
- ENABLE_OSX_FRAMEWORKS_TRUE=
- ENABLE_OSX_FRAMEWORKS_FALSE='#'
- else
diff --git a/net/tcpreplay/patches/patch-lib_Makefile.in b/net/tcpreplay/patches/patch-lib_Makefile.in
deleted file mode 100644
index 378cd710483..00000000000
--- a/net/tcpreplay/patches/patch-lib_Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-lib_Makefile.in,v 1.1 2013/10/31 02:25:17 minskim Exp $
-
---- lib/Makefile.in.orig 2010-04-05 00:58:24.000000000 +0000
-+++ lib/Makefile.in
-@@ -217,7 +217,8 @@ tcpdump_path = @tcpdump_path@
- top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--noinst_LIBRARIES = libstrl.a
-+@SYSTEM_STRLCPY_FALSE@noinst_LIBRARIES = libstrl.a
-+@SYSTEM_STRLCPY_TRUE@noinst_LIBRARIES =
- libstrl_a_SOURCES = strlcat.c strlcpy.c
- noinst_HEADERS = strlcpy.h tree.h queue.h sll.h
- MOSTLYCLEANFILES = *~ *.o *.a
diff --git a/net/tcpreplay/patches/patch-libopts_makeshell.c b/net/tcpreplay/patches/patch-libopts_makeshell.c
new file mode 100644
index 00000000000..c7375318395
--- /dev/null
+++ b/net/tcpreplay/patches/patch-libopts_makeshell.c
@@ -0,0 +1,44 @@
+$NetBSD: patch-libopts_makeshell.c,v 1.1 2017/12/04 09:32:01 he Exp $
+
+Ensure args to toxxxx() are within allowed value range.
+
+--- ./libopts/makeshell.c.orig 2017-04-27 00:56:25.000000000 +0000
++++ ./libopts/makeshell.c
+@@ -396,7 +396,7 @@ emit_usage(tOptions * opts)
+
+ /* Copy the program name into the time/name buffer */
+ for (;;) {
+- if ((*pzPN++ = (char)tolower(*pz++)) == NUL)
++ if ((*pzPN++ = (char)tolower((unsigned char)*pz++)) == NUL)
+ break;
+ }
+
+@@ -653,7 +653,7 @@ emit_match_expr(char const * name, tOptD
+ * They must not be the same. They cannot be, because it would
+ * not compile correctly if they were.
+ */
+- while (toupper(od->pz_Name[match_ct]) == toupper(name[match_ct]))
++ while (toupper((unsigned char)od->pz_Name[match_ct]) == toupper((unsigned char)name[match_ct]))
+ match_ct++;
+
+ if (match_ct > min_match_ct)
+@@ -666,8 +666,8 @@ emit_match_expr(char const * name, tOptD
+ continue;
+
+ match_ct = 0;
+- while ( toupper(od->pz_DisableName[match_ct])
+- == toupper(name[match_ct]))
++ while ( toupper((unsigned char)od->pz_DisableName[match_ct])
++ == toupper((unsigned char)name[match_ct]))
+ match_ct++;
+ if (match_ct > min_match_ct)
+ min_match_ct = match_ct;
+@@ -905,7 +905,7 @@ genshelloptUsage(tOptions * opts, int ex
+ AGDUPSTR(pz, optionParseShellOptions->pzPROGNAME, "prog name");
+ *pp = pz;
+ while (*pz != NUL) {
+- *pz = (char)tolower(*pz);
++ *pz = (char)tolower((unsigned char)*pz);
+ pz++;
+ }
+ }
diff --git a/net/tcpreplay/patches/patch-src_common_Makefile.in b/net/tcpreplay/patches/patch-src_common_Makefile.in
deleted file mode 100644
index 3f5d7e4c420..00000000000
--- a/net/tcpreplay/patches/patch-src_common_Makefile.in
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-src_common_Makefile.in,v 1.1 2013/10/31 02:25:17 minskim Exp $
-
---- src/common/Makefile.in.orig 2010-04-05 00:58:25.000000000 +0000
-+++ src/common/Makefile.in
-@@ -52,7 +52,7 @@ CONFIG_CLEAN_VPATH_FILES =
- LIBRARIES = $(noinst_LIBRARIES)
- ARFLAGS = cru
- libcommon_a_AR = $(AR) $(ARFLAGS)
--libcommon_a_DEPENDENCIES = ../../lib/libstrl.a
-+@SYSTEM_STRLCPY_FALSE@libcommon_a_DEPENDENCIES = ../../lib/libstrl.a
- am__libcommon_a_SOURCES_DIST = cidr.c err.c list.c cache.c services.c \
- get.c fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c timer.c \
- svn_version.c abort.c sendpacket.c dlt_names.c mac.c \
-@@ -238,7 +238,7 @@ libcommon_a_SOURCES = cidr.c err.c list.
- svn_version.c abort.c sendpacket.c dlt_names.c mac.c \
- interface.c rdtsc.c $(am__append_1)
- AM_CFLAGS = -I.. -I../.. $(LNAV_CFLAGS) @LDNETINC@
--libcommon_a_LIBADD = ../../lib/libstrl.a
-+@SYSTEM_STRLCPY_FALSE@libcommon_a_LIBADD = ../../lib/libstrl.a
- noinst_HEADERS = cidr.h err.h list.h cache.h services.h get.h \
- fakepcap.h fakepcapnav.h fakepoll.h xX.h utils.h \
- tcpdump.h timer.h abort.h pcap_dlt.h sendpacket.h \
diff --git a/net/tcpreplay/patches/patch-src_common_cidr.c b/net/tcpreplay/patches/patch-src_common_cidr.c
deleted file mode 100644
index 9951a295d15..00000000000
--- a/net/tcpreplay/patches/patch-src_common_cidr.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-src_common_cidr.c,v 1.1 2013/10/31 02:25:17 minskim Exp $
-
---- src/common/cidr.c.orig 2010-04-05 00:58:01.000000000 +0000
-+++ src/common/cidr.c
-@@ -34,7 +34,9 @@
- #include "config.h"
- #include "defines.h"
- #include "common.h"
-+#ifndef HAVE_STRLCPY
- #include "lib/strlcpy.h"
-+#endif
-
- #include <stdio.h>
- #include <stdlib.h>
diff --git a/net/tcpreplay/patches/patch-src_common_get.c b/net/tcpreplay/patches/patch-src_common_get.c
new file mode 100644
index 00000000000..4e2432e5ffb
--- /dev/null
+++ b/net/tcpreplay/patches/patch-src_common_get.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_common_get.c,v 1.1 2017/12/04 09:32:01 he Exp $
+
+Ensure args to toxxxx() is within allowed range.
+
+--- src/common/get.c.orig 2017-05-16 15:10:27.000000000 +0000
++++ src/common/get.c
+@@ -569,7 +569,7 @@ get_name2addr4(const char *hostname, boo
+ * We only want dots 'n decimals.
+ */
+ else {
+- if (!isdigit(hostname[0])) {
++ if (!isdigit((unsigned char)hostname[0])) {
+ warnx("Expected dotted-quad notation (%s) when DNS lookups are disabled",
+ hostname);
+ /* XXX - this is actually 255.255.255.255 */
diff --git a/net/tcpreplay/patches/patch-src_common_mac.c b/net/tcpreplay/patches/patch-src_common_mac.c
new file mode 100644
index 00000000000..ccb0205dde5
--- /dev/null
+++ b/net/tcpreplay/patches/patch-src_common_mac.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_common_mac.c,v 1.1 2017/12/04 09:32:01 he Exp $
+
+Ensure args to toxxxx() are within allowed value range.
+
+--- ./src/common/mac.c.orig 2017-05-09 14:17:52.000000000 +0000
++++ ./src/common/mac.c
+@@ -42,7 +42,7 @@ mac2hex(const char *mac, u_char *dst, in
+ if (len < 6)
+ return;
+
+- while (isspace(*mac))
++ while (isspace((unsigned char)*mac))
+ mac++;
+
+ /* expect 6 hex octets separated by ':' or space/NUL if last octet */
+@@ -50,7 +50,7 @@ mac2hex(const char *mac, u_char *dst, in
+ l = strtol(mac, &pp, 16);
+ if (pp == mac || l > 0xFF || l < 0)
+ return;
+- if (!(*pp == ':' || (i == 5 && (isspace(*pp) || *pp == '\0'))))
++ if (!(*pp == ':' || (i == 5 && (isspace((unsigned char)*pp) || *pp == '\0'))))
+ return;
+ dst[i] = (u_char) l;
+ mac = pp + 1;
diff --git a/net/tcpreplay/patches/patch-src_common_tcpdump.c b/net/tcpreplay/patches/patch-src_common_tcpdump.c
deleted file mode 100644
index f4e86f22128..00000000000
--- a/net/tcpreplay/patches/patch-src_common_tcpdump.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-src_common_tcpdump.c,v 1.1 2013/10/31 02:25:17 minskim Exp $
-
---- src/common/tcpdump.c.orig 2010-04-05 00:58:01.000000000 +0000
-+++ src/common/tcpdump.c
-@@ -59,7 +59,9 @@
- #endif
-
- #include "tcpdump.h"
-+#ifndef HAVE_STRLCPY
- #include "lib/strlcpy.h"
-+#endif
-
- #ifdef DEBUG
- extern int debug;
diff --git a/net/tcpreplay/patches/patch-src_defines.h.in b/net/tcpreplay/patches/patch-src_defines.h.in
deleted file mode 100644
index d417cd5b90f..00000000000
--- a/net/tcpreplay/patches/patch-src_defines.h.in
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-src_defines.h.in,v 1.1 2013/10/31 02:25:17 minskim Exp $
-
---- src/defines.h.in.orig 2010-04-05 00:58:02.000000000 +0000
-+++ src/defines.h.in
-@@ -26,7 +26,9 @@
-
- #include "@LPCAPINC@"
-
-+#ifndef HAVE_STRLCPY
- #include "lib/strlcpy.h"
-+#endif
- #include "common/list.h"
- #include "common/cidr.h"
-
diff --git a/net/tcpreplay/patches/patch-src_tcpprep.c b/net/tcpreplay/patches/patch-src_tcpprep.c
deleted file mode 100644
index 609c5539ca5..00000000000
--- a/net/tcpreplay/patches/patch-src_tcpprep.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-src_tcpprep.c,v 1.1 2013/10/31 02:25:17 minskim Exp $
-
---- src/tcpprep.c.orig 2010-04-05 00:58:02.000000000 +0000
-+++ src/tcpprep.c
-@@ -61,7 +61,9 @@
- #include "lib/tree.h"
- #include "tree.h"
- #include "lib/sll.h"
-+#ifndef HAVE_STRLCPY
- #include "lib/strlcpy.h"
-+#endif
-
- /*
- * global variables