[ULOGD PATCH 6/8] Duplicate message to all existing instance of NFLOG.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A specific 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 <eric@xxxxxx>
---
 input/packet/ulogd_inppkt_NFLOG.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index e0e8554..166e048 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -370,7 +370,15 @@ 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;
+
+	/* ok let's feed the bird (other instance) */
+	llist_for_each_entry(npi, &upi->plist, plist) {
+		ret = interp_packet(npi, nfa);
+		if (ret != 0)
+			return ret;
+	}
 	return interp_packet(upi, nfa);
 }
 
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux