]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
An instance of NFLOG can now be use in multiple stacks. This is done
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>
Tue, 25 Mar 2008 10:01:34 +0000 (10:01 +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>
Tue, 25 Mar 2008 10:01:34 +0000 (10:01 +0000)
by duplicating the interpretation of the message.

Signed-off-by: Eric Leblond <eric@inl.fr>
input/packet/ulogd_inppkt_NFLOG.c

index e0e85547eec2a59f3d4b5d1406591b8c1177d5c5..802e4174e4d7eb19e8da5152f7686e8d6053529b 100644 (file)
@@ -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);
 }