summaryrefslogtreecommitdiff
path: root/src/stats-mode.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-05-23 12:54:51 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-05-23 12:54:51 +0200
commitef047d03613bf9fa105db009773136817e2ec4c6 (patch)
tree7bdeaa64da5ebe1aeb79bdfaa8c24fa8de2cfad7 /src/stats-mode.c
parent0374398fd14bf587d80d9d31e361e266e69387c8 (diff)
downloadconntrack-tools-ef047d03613bf9fa105db009773136817e2ec4c6.tar.gz
conntrack-tools-ef047d03613bf9fa105db009773136817e2ec4c6.zip
conntrackd: detect where the events comes from
Since Linux kernel 2.6.29, ctnetlink reports the changes that have been done using ctnetlink. With this patch, conntrackd can recognize who is the origin of the event messages. For example, this is interesting to avoid a messy implicit bulk send during the commit of entries. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/stats-mode.c')
-rw-r--r--src/stats-mode.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stats-mode.c b/src/stats-mode.c
index af1c136..b84c7a1 100644
--- a/src/stats-mode.c
+++ b/src/stats-mode.c
@@ -141,7 +141,8 @@ static int purge_stats(void)
return 0;
}
-static void event_new_stats(struct nf_conntrack *ct)
+static void
+event_new_stats(struct nf_conntrack *ct, int origin)
{
int id;
struct cache_object *obj;
@@ -162,13 +163,15 @@ static void event_new_stats(struct nf_conntrack *ct)
return;
}
-static void event_update_stats(struct nf_conntrack *ct)
+static void
+event_update_stats(struct nf_conntrack *ct, int origin)
{
nfct_attr_unset(ct, ATTR_TIMEOUT);
cache_update_force(STATE_STATS(cache), ct);
}
-static int event_destroy_stats(struct nf_conntrack *ct)
+static int
+event_destroy_stats(struct nf_conntrack *ct, int origin)
{
int id;
struct cache_object *obj;