From c9e5ac541bbb4f01af0a6545fafe6c181d1eebbb Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Mon, 23 Jul 2018 23:28:24 +0100 Subject: libdnet has bugs, do not use it. The only function tcpdump used in libdnet was dnet_htoa(), which tries to translate a binary DECnet address to a nodename through a lookup in /etc/decnet.conf. The translation is slow and has a bug, so stop using the function and remove the dependency on libdnet. This makes tcpdump always print DECnet addresses in numeric format, if anybody needs the translation back they are welcome to fix libdnet or (more realistically) add an implementation of dnet_htoa() to the tcpdump source code and use it. (This is a forward-port of commit 9a6eb27 from tcpdump-4.9 to master. Sadly, together with libdnet this change removes the fine work that Guy had done in the master branch in commits ebf3f19 and 4ef8d63 to put libdnet usage right whilst my original "do not use libdnet" commit was aging in the pipeline.) --- configure | 129 -------------------------------------------------------------- 1 file changed, 129 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0660441f..3b2041c9 100755 --- a/configure +++ b/configure @@ -4927,135 +4927,6 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dnet_htoa" >&5 -$as_echo_n "checking for library containing dnet_htoa... " >&6; } -if ${ac_cv_search_dnet_htoa+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_htoa (); -int -main () -{ -return dnet_htoa (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dnet; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_dnet_htoa=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_dnet_htoa+:} false; then : - break -fi -done -if ${ac_cv_search_dnet_htoa+:} false; then : - -else - ac_cv_search_dnet_htoa=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dnet_htoa" >&5 -$as_echo "$ac_cv_search_dnet_htoa" >&6; } -ac_res=$ac_cv_search_dnet_htoa -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -$as_echo "#define HAVE_DNET_HTOA 1" >>confdefs.h - - # - # OK, we have dnet_htoa(). Do we have netdnet/dnetdb.h? - # - for ac_header in netdnet/dnetdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netdnet/dnetdb.h" "ac_cv_header_netdnet_dnetdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdnet_dnetdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETDNET_DNETDB_H 1 -_ACEOF - -fi - -done - - if test "$ac_cv_header_netdnet_dnetdb_h" = "yes"; then - # - # Yes. Does it declare dnet_htoa()? - # - ac_fn_c_check_decl "$LINENO" "dnet_htoa" "ac_cv_have_decl_dnet_htoa" " -$ac_includes_default -#include - -" -if test "x$ac_cv_have_decl_dnet_htoa" = xyes; then : - - # Yes. - -$as_echo "#define NETDNET_DNETDB_H_DECLARES_DNET_HTOA /**/" >>confdefs.h - - -fi - - fi - - # - # Do we have netdnet/dn.h? - # - for ac_header in netdnet/dn.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netdnet/dn.h" "ac_cv_header_netdnet_dn_h" "$ac_includes_default" -if test "x$ac_cv_header_netdnet_dn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETDNET_DN_H 1 -_ACEOF - -fi - -done - - if test "$ac_cv_header_netdnet_dn_h" = "yes"; then - # - # Yes. Does it declare struct dn_naddr? - # - ac_fn_c_check_type "$LINENO" "struct dn_naddr" "ac_cv_type_struct_dn_naddr" " -#include - -" -if test "x$ac_cv_type_struct_dn_naddr" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_DN_NADDR 1 -_ACEOF - - -fi - - fi - -fi - - ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" if test "x$ac_cv_func_strlcat" = xyes; then : $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h -- cgit v1.2.1