From 9f1b4b2d028129966f7e6f23cec6ac0712c2b1b6 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Sun, 20 May 2007 21:13:06 +0000 Subject: - introduce cache_iterate - empty debug_ct function if DEBUG_CT is not set - revisit overrun handler: this is a hard battle, just try to do our best here, call Patrick :) - explicit warning message when netlink_buffer_max_growth is reached - fix silly bug in stats-mode when dumping in XML format - fix UDP handler for conntrack --- include/cache.h | 1 + include/conntrackd.h | 4 +--- include/debug.h | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/cache.h b/include/cache.h index 7d9559a..e755dbe 100644 --- a/include/cache.h +++ b/include/cache.h @@ -82,6 +82,7 @@ int cache_test(struct cache *c, struct nf_conntrack *ct); void cache_stats(struct cache *c, int fd); struct us_conntrack *cache_get_conntrack(struct cache *, void *); void *cache_get_extra(struct cache *, void *); +void cache_iterate(struct cache *c, void *data, int (*iterate)(void *data1, void *data2)); /* iterators */ void cache_dump(struct cache *c, int fd, int type); diff --git a/include/conntrackd.h b/include/conntrackd.h index a5f7a3a..76b9747 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -102,11 +102,9 @@ struct ct_general_state { struct ignore_pool *ignore_pool; struct nfnl_handle *event; /* event handler */ - struct nfnl_handle *sync; /* sync handler */ struct nfnl_handle *dump; /* dump handler */ struct nfnl_subsys_handle *subsys_event; /* events */ - struct nfnl_subsys_handle *subsys_sync; /* resync */ struct nfnl_subsys_handle *subsys_dump; /* dump */ /* statistics */ @@ -159,7 +157,7 @@ struct ct_mode { int (*local)(int fd, int type, void *data); void (*kill)(void); void (*dump)(struct nf_conntrack *ct, struct nlmsghdr *nlh); - void (*overrun)(struct nf_conntrack *ct, struct nlmsghdr *nlh); + void (*overrun)(void); void (*event_new)(struct nf_conntrack *ct, struct nlmsghdr *nlh); void (*event_upd)(struct nf_conntrack *ct, struct nlmsghdr *nlh); int (*event_dst)(struct nf_conntrack *ct, struct nlmsghdr *nlh); diff --git a/include/debug.h b/include/debug.h index 67f2c71..4d1f44f 100644 --- a/include/debug.h +++ b/include/debug.h @@ -11,8 +11,11 @@ #include #include +#undef DEBUG_CT + static inline void debug_ct(struct nf_conntrack *ct, char *msg) { +#ifdef DEBUG_CT struct in_addr addr, addr2, addr3, addr4; debug("----%s (%p) ----\n", msg, ct); @@ -48,6 +51,7 @@ static inline void debug_ct(struct nf_conntrack *ct, char *msg) inet_ntoa(addr4), ntohs(nfct_get_attr_u16(ct, ATTR_REPL_PORT_DST))); debug("-------------------------\n"); +#endif } #endif -- cgit v1.2.3