From: /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org Date: Tue, 25 Mar 2008 10:01:34 +0000 (+0000) Subject: An instance of NFLOG can now be use in multiple stacks. This is done X-Git-Tag: ulogd-2.0.0beta2~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf07cbdc9bd4976c525c83c52f966d957ffe55b;p=thirdparty%2Fulogd2.git An instance of NFLOG can now be use in multiple stacks. This is done by duplicating the interpretation of the message. Signed-off-by: Eric Leblond --- diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c index e0e8554..802e417 100644 --- a/input/packet/ulogd_inppkt_NFLOG.c +++ b/input/packet/ulogd_inppkt_NFLOG.c @@ -370,7 +370,16 @@ static int msg_cb(struct nflog_g_handle *gh, struct nfgenmsg *nfmsg, struct nflog_data *nfa, void *data) { struct ulogd_pluginstance *upi = data; - + struct ulogd_pluginstance *npi = NULL; + int ret = 0; + + /* 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 = interp_packet(npi, nfa); + if (ret != 0) + return ret; + } return interp_packet(upi, nfa); }