Building and testing:
Handle some Autoconf/make errors better.
Fix "make releasetar" on AIX and Solaris.
+ Mend "make check" on Solaris 9 with Autoconf.
Wednesday, June 9, 2021 by gharris
Summary for 4.99.1 tcpdump release
/* Define to 1 if you have the <net/pfvar.h> header file. */
#undef HAVE_NET_PFVAR_H
+/* Define to 1 if printf(3) does not support the z length modifier. */
+#undef HAVE_NO_PRINTF_Z
+
/* Define to 1 if you have the `openat' function. */
#undef HAVE_OPENAT
fi
+#
+# Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
+# depend on %zu.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf(3) supports the z length modifier" >&5
+$as_echo_n "checking whether printf(3) supports the z length modifier... " >&6; }
+if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+ char buf[100];
+ snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
+ return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define HAVE_NO_PRINTF_Z 1" >>confdefs.h
+
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
$as_echo_n "checking for main in -lrpc... " >&6; }
if ${ac_cv_lib_rpc_main+:} false; then :
AC_CHECK_FUNC(snprintf,,
AC_MSG_ERROR([snprintf() is required but wasn't found]))
+#
+# Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
+# depend on %zu.
+#
+AC_MSG_CHECKING([whether printf(3) supports the z length modifier])
+AC_RUN_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+ char buf[100];
+ snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
+ return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
+}
+ ]])
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE(HAVE_NO_PRINTF_Z, 1,
+ [Define to 1 if printf(3) does not support the z length modifier.])
+ ]
+)
+
AC_CHECK_LIB(rpc, main) dnl It's unclear why we might need -lrpc
dnl Some platforms may need -lnsl for getrpcbynumber.
mpls-over-udp-v mpls-over-udp.pcap mpls-over-udp-v.out -v
# OSPF tests
-ospf-gmpls ospf-gmpls.pcap ospf-gmpls.out -v
-ospf-nssa-bitnt ospf-nssa-bitnt.pcap ospf-nssa-bitnt.out -v
-ospf3_ah-vv OSPFv3_with_AH.pcap ospf3_ah-vv.out -v -v
+# In printf_z.tests:
+# ospf-gmpls
+# ospf-nssa-bitnt
+# ospf3_ah-vv
+# ospf3_bc-vv
+# ospf3_mp-vv
+# ospf3_nbma-vv
+# ospf2-seg-fault-1-v (fuzzed pcap)
ospf3_auth-vv ospf3_auth.pcapng ospf3_auth-vv.out -v -v
-ospf3_bc-vv OSPFv3_broadcast_adjacency.pcap ospf3_bc-vv.out -v -v
-ospf3_mp-vv OSPFv3_multipoint_adjacencies.pcap ospf3_mp-vv.out -v -v
-ospf3_nbma-vv OSPFv3_NBMA_adjacencies.pcap ospf3_nbma-vv.out -v -v
-# fuzzed pcap
-ospf2-seg-fault-1-v ospf2-seg-fault-1.pcapng ospf2-seg-fault-1-v.out -v
# IKEv2 tests
ikev2four ikev2four.pcap ikev2four.out -v
# M3UA tests
m3ua isup.pcap isup.out
-m3ua-vv isup.pcap isupvv.out -vv
+# In printf_z.tests:
+# m3ua-vv
# NFLOG test case
nflog-e nflog.pcap nflog-e.out -e
isis_sid isis_sid.pcap isis_sid.out -v
# RSVP tests
-rsvp_infloop-v rsvp-infinite-loop.pcap rsvp_infloop-v.out -v
+# In printf_z.tests:
+# rsvp_infloop-v
rsvp_cap rsvp_cap.pcap rsvp_cap.out -v
# fuzzed pcap
rsvp-inf-loop-2-v rsvp-inf-loop-2.pcapng rsvp-inf-loop-2-v.out -v
hdlc4 hdlc_slarp.pcapng hdlc4.out
# DECnet test case
-decnet DECnet_Phone.pcap decnet.out
+# In printf_z.tests:
+# decnet
# RADIUS tests
radius-v RADIUS.pcap radius-v.out -v
icmp-cksum-oobr-4 icmp-cksum-oobr-4.pcapng icmp-cksum-oobr-4.out -vvv -e
tok2str-oobr-1 tok2str-oobr-1.pcap tok2str-oobr-1.out -vvv -e
tok2str-oobr-2 tok2str-oobr-2.pcap tok2str-oobr-2.out -vvv -e
-eigrp-tlv-oobr eigrp-tlv-oobr.pcap eigrp-tlv-oobr.out -vvv -e
+# In printf_z.tests:
+#eigrp-tlv-oobr
zephyr-oobr zephyr-oobr.pcap zephyr-oobr.out -vvv -e
isakmp-no-none-np isakmp-no-none-np.pcapng isakmp-no-none-np.out -vvv -e
telnet-iac-check-oobr telnet-iac-check-oobr.pcap telnet-iac-check-oobr.out -vvv -e
resp_4_infiniteloop resp_4_infiniteloop.pcapng resp_4_infiniteloop.out -vvv -e
dns_fwdptr dns_fwdptr.pcap dns_fwdptr.out -vvv -e
-isis-areaaddr-oobr-1 isis-areaaddr-oobr-1.pcap isis-areaaddr-oobr-1.out -vvv -e
-isis-areaaddr-oobr-2 isis-areaaddr-oobr-2.pcap isis-areaaddr-oobr-2.out -vvv -e
+# In printf_z.tests:
+# isis-areaaddr-oobr-1
+# isis-areaaddr-oobr-2
isis-extd-ipreach-oobr isis-extd-ipreach-oobr.pcap isis-extd-ipreach-oobr.out -vvv -e
lldp-infinite-loop-1 lldp-infinite-loop-1.pcap lldp-infinite-loop-1.out -vvv -e
lldp-infinite-loop-2 lldp-infinite-loop-2.pcap lldp-infinite-loop-2.out -vvv -e
# bad packets from Yannick Formaggio
l2tp-avp-overflow l2tp-avp-overflow.pcap l2tp-avp-overflow.out -v
-pktap-heap-overflow pktap-heap-overflow.pcap pktap-heap-overflow.out -v
+# In printf_z.tests:
+# pktap-heap-overflow
wb-oobr wb-oobr.pcap wb-oobr.out -v
# bad packets from Bhargava Shastry
#
# See http://marc.info/?l=tcpdump-workers&m=95552439022555
#
-dns-zlip-1 dns-zlip-1.pcap dns-zlip-1.out
-dns-zlip-2 dns-zlip-2.pcap dns-zlip-2.out
-dns-zlip-3 dns-zlip-3.pcap dns-zlip-3.out
+# In printf_z.tests:
+# dns-zlip-1
+# dns-zlip-2
+# dns-zlip-3
# NTP tests
ntp ntp.pcap ntp.out
huge-tipc-messages huge-tipc-messages.pcap huge-tipc-messages.out
# CVE-2018-10105 bad packets from Luis Rocha
-sflow_print-segv sflow_print-segv.pcap sflow_print-segv.out -v
+# In printf_z.tests:
+# sflow_print-segv
# two more in smb.tests
#ptp tests
--- /dev/null
+# -*- perl -*-
+
+$testlist = [
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf-gmpls',
+ input => 'ospf-gmpls.pcap',
+ output => 'ospf-gmpls.out',
+ args => '-v'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf-nssa-bitnt',
+ input => 'ospf-nssa-bitnt.pcap',
+ output => 'ospf-nssa-bitnt.out',
+ args => '-v'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf3_ah-vv',
+ input => 'OSPFv3_with_AH.pcap',
+ output => 'ospf3_ah-vv.out',
+ args => '-vv'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf3_bc-vv',
+ input => 'OSPFv3_broadcast_adjacency.pcap',
+ output => 'ospf3_bc-vv.out',
+ args => '-vv'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf3_mp-vv',
+ input => 'OSPFv3_multipoint_adjacencies.pcap',
+ output => 'ospf3_mp-vv.out',
+ args => '-vv'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf3_nbma-vv',
+ input => 'OSPFv3_NBMA_adjacencies.pcap',
+ output => 'ospf3_nbma-vv.out',
+ args => '-vv'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'ospf2-seg-fault-1-v',
+ input => 'ospf2-seg-fault-1.pcapng',
+ output => 'ospf2-seg-fault-1-v.out',
+ args => '-v'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'm3ua-vv',
+ input => 'isup.pcap',
+ output => 'isupvv.out',
+ args => '-vv'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'rsvp_infloop-v',
+ input => 'rsvp-infinite-loop.pcap',
+ output => 'rsvp_infloop-v.out',
+ args => '-v'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'decnet',
+ input => 'DECnet_Phone.pcap',
+ output => 'decnet.out',
+ args => ''
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'eigrp-tlv-oobr',
+ input => 'eigrp-tlv-oobr.pcap',
+ output => 'eigrp-tlv-oobr.out',
+ args => '-vvv -e'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'isis-areaaddr-oobr-1',
+ input => 'isis-areaaddr-oobr-1.pcap',
+ output => 'isis-areaaddr-oobr-1.out',
+ args => '-vvv -e'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'isis-areaaddr-oobr-2',
+ input => 'isis-areaaddr-oobr-2.pcap',
+ output => 'isis-areaaddr-oobr-2.out',
+ args => '-vvv -e'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'pktap-heap-overflow',
+ input => 'pktap-heap-overflow.pcap',
+ output => 'pktap-heap-overflow.out',
+ args => '-v'
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'dns-zlip-1',
+ input => 'dns-zlip-1.pcap',
+ output => 'dns-zlip-1.out',
+ args => ''
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'dns-zlip-2',
+ input => 'dns-zlip-2.pcap',
+ output => 'dns-zlip-2.out',
+ args => ''
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'dns-zlip-3',
+ input => 'dns-zlip-3.pcap',
+ output => 'dns-zlip-3.out',
+ args => ''
+ },
+ {
+ config_unset => 'HAVE_NO_PRINTF_Z',
+ name => 'sflow_print-segv',
+ input => 'sflow_print-segv.pcap',
+ output => 'sflow_print-segv.out',
+ args => '-v'
+ },
+];
+
+1;