From 7a42932439162be1f263986cdc7bbef78840a71a Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Fri, 1 May 2015 14:53:42 +0000 Subject: [PATCH 2/2] Disable unnecessary features The following features are disabled: * monitor-mode sniffing of wireless interfaces on Linux, via libnl * building shared libraries * Bluetooth support * canusb support * CAN support * dbus capture support --- libpcap/configure.ac | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libpcap/configure.ac b/libpcap/configure.ac index ec87283..ad2e437 100644 --- a/libpcap/configure.ac +++ b/libpcap/configure.ac @@ -450,10 +450,10 @@ linux) # Do we have libnl? # AC_ARG_WITH(libnl, - AC_HELP_STRING([--without-libnl],[disable libnl support @<:@default=yes, on Linux, if present@:>@]), + AC_HELP_STRING([--without-libnl],[disable libnl support @<:@default=disabled@:>@]), with_libnl=$withval,,) - if test x$with_libnl != xno ; then + if test x$with_libnl = xyes ; then have_any_nl="no" incdir=-I/usr/include/libnl3 @@ -1301,8 +1301,8 @@ solaris*) esac AC_ARG_ENABLE(shared, -AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=yes, if support available@:>@])) -test "x$enable_shared" = "xno" && DYEXT="none" +AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=no@:>@])) +test "x$enable_shared" != "xyes" && DYEXT="none" AC_PROG_RANLIB AC_CHECK_TOOL([AR], [ar]) @@ -1457,9 +1457,9 @@ AC_SUBST(PCAP_SUPPORT_NETFILTER) AC_SUBST(NETFILTER_SRC) AC_ARG_ENABLE([bluetooth], -[AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=no@:>@])], [], - [enable_bluetooth=ifsupportavailable]) + [enable_bluetooth=no]) if test "x$enable_bluetooth" != "xno" ; then dnl check for Bluetooth sniffing support @@ -1536,9 +1536,9 @@ if test "x$enable_bluetooth" != "xno" ; then fi AC_ARG_ENABLE([canusb], -[AC_HELP_STRING([--enable-canusb],[enable canusb support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-canusb],[enable canusb support @<:@default=no@:>@])], [], - [enable_canusb=ifsupportavailable]) + [enable_canusb=no]) if test "x$enable_canusb" != "xno" ; then dnl check for canusb support @@ -1582,9 +1582,9 @@ if test "x$enable_canusb" != "xno" ; then fi AC_ARG_ENABLE([can], -[AC_HELP_STRING([--enable-can],[enable CAN support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-can],[enable CAN support @<:@default=no@:>@])], [], - [enable_can=ifsupportavailable]) + [enable_can=no]) if test "x$enable_can" != "xno" ; then dnl check for CAN sniffing support @@ -1619,9 +1619,9 @@ if test "x$enable_can" != "xno" ; then fi AC_ARG_ENABLE([dbus], -[AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=no@:>@])], [], - [enable_dbus=ifavailable]) + [enable_dbus=no]) if test "x$enable_dbus" != "xno"; then if test "x$enable_dbus" = "xyes"; then -- 1.9.1 commit e79d124eed3951184e812ea95609a0cefb855b01 Author: Daniel Miller Date: Tue Jul 17 19:36:10 2018 +0000 libpcap: Disable unnecessary features The following features are disabled: * monitor-mode sniffing of wireless interfaces on Linux, via libnl * building shared libraries * Bluetooth support * usb support * dbus capture support diff --git a/libpcap/configure.ac b/libpcap/configure.ac index 4300866..21e2b5f 100644 --- a/libpcap/configure.ac +++ b/libpcap/configure.ac @@ -485,10 +485,10 @@ linux) # Do we have libnl? # AC_ARG_WITH(libnl, - AC_HELP_STRING([--without-libnl],[disable libnl support @<:@default=yes, on Linux, if present@:>@]), + AC_HELP_STRING([--without-libnl],[disable libnl support @<:@default=disabled@:>@]), with_libnl=$withval,,) - if test x$with_libnl != xno ; then + if test x$with_libnl = xyes ; then have_any_nl="no" incdir=-I/usr/include/libnl3 @@ -1390,8 +1390,8 @@ solaris*) esac AC_ARG_ENABLE(shared, -AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=yes, if support available@:>@])) -test "x$enable_shared" = "xno" && DYEXT="none" +AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=no@:>@])) +test "x$enable_shared" != "xyes" && DYEXT="none" AC_PROG_RANLIB AC_CHECK_TOOL([AR], [ar]) @@ -1429,9 +1429,9 @@ AC_SUBST(MAN_FILE_FORMATS) AC_SUBST(MAN_MISC_INFO) AC_ARG_ENABLE([usb], -[AC_HELP_STRING([--enable-usb],[enable nusb support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-usb],[enable nusb support @<:@default=no@:>@])], [], - [enable_usb=yes]) + [enable_usb=no]) if test "xxx_only" = yes; then # User requested something-else-only pcap, so they don't @@ -1556,9 +1556,9 @@ AC_SUBST(PCAP_SUPPORT_NETFILTER) AC_SUBST(NETFILTER_SRC) AC_ARG_ENABLE([bluetooth], -[AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=no@:>@])], [], - [enable_bluetooth=ifsupportavailable]) + [enable_bluetooth=no]) if test "xxx_only" = yes; then # User requested something-else-only pcap, so they don't @@ -1641,9 +1641,9 @@ if test "x$enable_bluetooth" != "xno" ; then fi AC_ARG_ENABLE([dbus], -[AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=yes, if support available@:>@])], +[AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=no@:>@])], [], - [enable_dbus=ifavailable]) + [enable_dbus=no]) if test "xxx_only" = yes; then # User requested something-else-only pcap, so they don't