diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-03-25 10:09:06 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-03-25 10:09:06 +0000 |
commit | 54bf2527439d0fdff53a8076e7a305f6603ceca0 (patch) | |
tree | 0745bc7f38ca2e1a63cecd3ebebf9e4a8a729b2c | |
parent | d68f1f0afc23cde92a4940e9f6aec26dedc1c4b3 (diff) |
This patch adds support for duplication of the message to be
able to use multiple time the same instance of NFCT.
Signed-off-by: Eric Leblond <eric@inl.fr>
-rw-r--r-- | input/flow/ulogd_inpflow_NFCT.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/input/flow/ulogd_inpflow_NFCT.c b/input/flow/ulogd_inpflow_NFCT.c index 7d3aa91..fbe9858 100644 --- a/input/flow/ulogd_inpflow_NFCT.c +++ b/input/flow/ulogd_inpflow_NFCT.c @@ -559,8 +559,10 @@ static int event_handler(void *arg, unsigned int flags, int type, { struct nfct_conntrack *ct = arg; struct ulogd_pluginstance *upi = data; + struct ulogd_pluginstance *npi = NULL; struct nfct_pluginstance *cpi = (struct nfct_pluginstance *) upi->private; + int ret = 0; if (type == NFCT_MSG_NEW) { if (usehash_ce(upi->config_kset).u.value != 0) @@ -571,6 +573,14 @@ static int event_handler(void *arg, unsigned int flags, int type, if (usehash_ce(upi->config_kset).u.value != 0) ts = ct_hash_get(cpi->ct_active, ct->id); + /* since we support the re-use of one instance in + * several different stacks, we duplicate the message + * to let them know */ + llist_for_each_entry(npi, &upi->plist, plist) { + ret = propagate_ct(npi, ct, flags, ts); + if (ret != 0) + return ret; + } return propagate_ct(upi, ct, flags, ts); } return 0; |