Opened 6 years ago

#513 new defect

libpcap detection on Debian GNU/Linux, Ubuntu and maybe other distributions broken

Reported by: noel Owned by: aturner
Priority: low Milestone:
Component: tcpreplay Version: 3.4.4
Keywords: Cc:
Operating System: Linux Add to FAQ?: no
Hardware: All
Output of tcpreplay -V: $ tcpreplay -V tcpreplay version: 3.4.4 (build 2450) (debug) Copyright 2000-2010 by Aaron Turner <aturner at synfin dot net> Cache file supported: 04 Not compiled with libdnet. Compiled against libpcap: 1.3.0 64 bit packet counters: enabled Verbose printing via tcpdump: enabled Packet editing: disabled Fragroute engine: disabled Injection method: PF_PACKET send()

Description

Hello,

configure just checks in /usr/lib and /usr/lib64 for the libpcap files. The problem are these missing lines which isn't a patch because its not for all architectures:

--- tcpreplay-3.4.4/configure.ac.orig 2010-04-05 02:58:05.000000000 +0200
+++ tcpreplay-3.4.4/configure.ac 2012-07-06 23:27:29.000000000 +0200
@@ -355,6 +356,8 @@

LPCAPLIB="-L${testdir}/lib64 -lpcap"

elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then

LPCAPLIB="-L${testdir}/lib -lpcap"

+ elif test -f "${testdir}/lib/x86_64-linux-gnu/libpcap${shrext_cmds}" ; then
+ LPCAPLIB="-L${testdir}/lib/x86_64-linux-gnu/lib -lpcap"

else

AC_ERROR([Unable to find libpcap in ${testdir}])

fi

@@ -364,6 +367,9 @@

LPCAPLIB="${testdir}/lib/libpcap.${libext}"

elif test -f "${testdir}/lib/libwpcap.${libext}" ; then

LPCAPLIB="${testdir}/lib/libwpcap.${libext}"

+ elif test -f "${testdir}/lib/x86_64-linux-gnu/libpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib/x86_64-linux-gnu/libpcap.${libext}"
+

AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap??])

else

AC_ERROR([Unable to find matching library for header file in ${testdir}])

We are using this patch but it's based on a Debian specific program to have a general patch for all our architectures:

--- tcpreplay-3.4.4/configure.ac.orig 2010-04-05 02:58:05.000000000 +0200
+++ tcpreplay-3.4.4/configure.ac 2012-07-06 23:27:29.000000000 +0200
@@ -39,6 +39,7 @@

AC_SUBST(host)
AC_SUBST(build)
AC_SUBST(target)

+MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)

have_cygwin=no
AC_MSG_CHECKING([for cygwin development environment])

@@ -355,6 +356,8 @@

LPCAPLIB="-L${testdir}/lib64 -lpcap"

elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then

LPCAPLIB="-L${testdir}/lib -lpcap"

+ elif test -f "${testdir}/lib/$MULTIARCH/libpcap${shrext_cmds}" ; then
+ LPCAPLIB="-L${testdir}/lib/$MULTIARCH/lib -lpcap"

else

AC_ERROR([Unable to find libpcap in ${testdir}])

fi

@@ -364,6 +367,9 @@

LPCAPLIB="${testdir}/lib/libpcap.${libext}"

elif test -f "${testdir}/lib/libwpcap.${libext}" ; then

LPCAPLIB="${testdir}/lib/libwpcap.${libext}"

+ elif test -f "${testdir}/lib/$MULTIARCH/libpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib/$MULTIARCH/libpcap.${libext}"
+

AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap??])

else

AC_ERROR([Unable to find matching library for header file in ${testdir}])

Change History (0)

Note: See TracTickets for help on using tickets.