From 837747610f4c8046889aacd3f29f1f63049015cc Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org" Date: Mon, 31 Oct 2005 04:20:58 +0000 Subject: Special thanks to Deti Fiegl from the Leibniz Supercomputing Centre in Munich, Germany for providing the "fast" hardware to reproduce spurious bugs ;) List of changes: o Replace misleading flag NFCT_ANY_GROUP by NFCT_ALL_GROUPS o Update test file to use NFCT_ALL_GROUPS o Add missing check of CTA_PROTOINFO_TCP that resulted in a segfault in conjuction with events. o Fix ICMP conntracks output o Add missing prototype definition of nfct_default_expect_display_id in libnetfilter_conntrack.h --- utils/ctnl_test.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/ctnl_test.c b/utils/ctnl_test.c index 360e118..a1462af 100644 --- a/utils/ctnl_test.c +++ b/utils/ctnl_test.c @@ -73,7 +73,7 @@ int main(int argc, char **argv) goto end; } - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) { fprintf(stderr, "Can't open handler\n"); errors++; @@ -118,6 +118,18 @@ int main(int argc, char **argv) if (ret < 0) errors++; + nfct_close(cth); + + /* Now open a handler that is subscribed to all possible events */ + cth = nfct_open(CONNTRACK, NFCT_ALL_GROUPS); + if (!cth) { + fprintf(stderr, "Can't open handler\n"); + errors++; + ret = -ENOENT; + nfct_conntrack_free(ct); + goto end; + } + fprintf(stdout, "TEST 7: Waiting for 10 conntrack events\n"); signal(SIGINT, event_sighandler); nfct_register_callback(cth, event_counter); -- cgit v1.2.3