diff options
Diffstat (limited to 'utils/ctnl_test.c')
-rw-r--r-- | utils/ctnl_test.c | 14 |
1 files changed, 13 insertions, 1 deletions
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); |