diff options
author | Hervé Boisse <admin@netgeek.ovh> | 2023-01-17 10:43:35 +0100 |
---|---|---|
committer | Hervé Boisse <admin@netgeek.ovh> | 2023-01-17 12:15:51 +0100 |
commit | 19979c4541ddcc817c64ea911a309ee71a8cc250 (patch) | |
tree | a5049ee8ea83d7eb642171006a3aec0dcc1102fc /configure.ac | |
parent | 8e8e0f71162ef33b045bf424bb1bd83411a9ac6a (diff) | |
download | libnet-19979c4541ddcc817c64ea911a309ee71a8cc250.tar.gz |
Remove support for SOCK_PACKET sockets
The current code has a build-time check to verify that PF_PACKET sockets
are supported on Linux systems and if not, fallback on SOCK_PACKET sockets.
The test implementation relies on FTM (Feature Test Macros) to detect
glibc and its version to include correct headers.
But, some libc such as the musl libc do not have such macros, making the
test program compilation fail and libnet fallback on SOCK_PACKET.
Since PF_PACKET support is present in kernel for more than 20 years now,
the simplest solution and safe choice is to just drop support for
SOCK_PACKET and assume PF_PACKET is always available on any Linux system.
Signed-off-by: Hervé Boisse <admin@netgeek.ovh>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b0a5e93..f1c592e 100644 --- a/configure.ac +++ b/configure.ac @@ -77,7 +77,6 @@ AC_MSG_RESULT($have_socklen_t) # AC_LIBNET_ENDIAN_CHECK AC_SUBST(ENDIANESS) -AC_SUBST(HAVE_PACKET_SOCKET) AC_SUBST(ADDITIONAL_LIBS) AC_SUBST(PKG_CONFIG_DEFINES) AC_SUBST(PKG_CONFIG_LIBS) @@ -105,7 +104,6 @@ AS_IF([test -n "${with_link_layer}"], [ [win32], [AC_LIBOBJ([libnet_link_win32])], [none], [AC_LIBOBJ([libnet_link_none])], [linux], [AC_LIBOBJ([libnet_link_linux]) - AC_LIBNET_CHECK_PF_PACKET AC_LIBNET_LINUX_PROCFS], [AC_MSG_ERROR([Invalid link type "${with_link_layer}"])]) AC_MSG_RESULT(user selected link layer ${with_link_layer})], @@ -131,7 +129,6 @@ AS_IF([test -n "${with_link_layer}"], [ [test "${ac_cv_header_linux_socket_h}" = "yes"], [ AC_LIBOBJ([libnet_link_linux]) AC_MSG_RESULT(found link layer linux) - AC_LIBNET_CHECK_PF_PACKET AC_LIBNET_LINUX_PROCFS], [test "${cross_compiling}" != "yes" -a -c /dev/bpf0], [ # check again in case not readable |