From cbf07cbdc9bd4976c525c83c52f966d957ffe55b Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 25 Mar 2008 10:01:34 +0000 Subject: 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 --- input/packet/ulogd_inppkt_NFLOG.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'input/packet/ulogd_inppkt_NFLOG.c') 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); } -- cgit v1.2.3