From 5f5a034d217e6beec837b3aafdb6afbb669f648b Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 23 Aug 2011 11:48:06 -0700 Subject: Presence of linux's PF_PACKET sockets is now detected. The acinclude.m4 merged in from packetfactory's 1.1.3-rc branch mysteriously assumed that that there was no PF_PACKET if the target OS was linux, which is the opposite of what we want. --- libnet/acinclude.m4 | 15 ++++----------- libnet/configure.in | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/libnet/acinclude.m4 b/libnet/acinclude.m4 index 0913021..064b582 100644 --- a/libnet/acinclude.m4 +++ b/libnet/acinclude.m4 @@ -39,17 +39,10 @@ dnl AC_DEFUN([AC_LIBNET_CHECK_PF_PACKET], [ - AC_MSG_CHECKING(for packet socket (PF_SOCKET)) + AC_MSG_CHECKING(for packet socket (PF_PACKET)) AC_CACHE_VAL(libnet_cv_have_packet_socket, - [case "$target_os" in - - linux*) - libnet_cv_have_packet_socket=no - AC_MSG_RESULT(no) - ;; - *) - + [ cat > pf_packet-test.c << EOF #include #include @@ -110,8 +103,8 @@ EOF fi rm -f pf_packet-test* core core.pf_packet-test - ;; - esac]) + + ]) if test $libnet_cv_have_packet_socket = yes -o $libnet_cv_have_packet_socket = probably; then AC_DEFINE(HAVE_PACKET_SOCKET, 1, diff --git a/libnet/configure.in b/libnet/configure.in index 9015696..7d57601 100644 --- a/libnet/configure.in +++ b/libnet/configure.in @@ -84,7 +84,7 @@ if test -n "${with_link_layer}"; then none) AC_LIBOBJ([libnet_link_none]) ;; *) AC_MSG_ERROR([Invalid link type "${with_link_layer}"]) ;; esac - AC_MSG_RESULT(forced link layer to ${with_link_layer}) + AC_MSG_RESULT(user selected link layer ${with_link_layer}) elif test "${cross_compiling}" != "yes" -a -r /dev/bpf0 ; then AC_LIBOBJ([libnet_link_bpf]) AC_MSG_RESULT(found link layer bpf) -- cgit v1.2.1