Skip to content

Allow reuse of plugin instance (and misc fixes)

Eric Leblond netfilter-devel 1 version Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8Add hook to list of fields in database for packet logging.doc/mysql-ulogd2.sql doc/pgsql-ulogd2.sql+23 -141 reply
2/8Introduce RAWSTR type to avoid confusion in future developement.filter/ulogd_filter_IP2BIN.c include/ulogd/ulogd.h util/db.c+11 -71 reply
3/8Fix indentation in ulogd_inppkt_NFLOG.cinput/packet/ulogd_inppkt_NFLOG.c+1 -11 reply
4/8Don't call start function multiple time for a single plugin instance.src/ulogd.c+28 -51 reply
5/8Add a list of used plugininstance.include/ulogd/ulogd.h src/ulogd.c+4 -01 reply
6/8Duplicate message to all existing instance of NFLOG.input/packet/ulogd_inppkt_NFLOG.c+9 -11 reply
7/8Add code for duplication of message in ULOGinput/packet/ulogd_inppkt_ULOG.c+5 -01 reply
8/8Duplication of message in NFCT input plugininput/flow/ulogd_inpflow_NFCT.c+7 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [ULOGD PATCH 0/8] Allow reuse of plugin instance (and misc fixes)

Hello,

This patchset starts with some cleaning:
- Add hook to list of fields in database for packet logging.
- Introduce RAWSTR type to avoid confusion in future developement.
- Fix indentation in ulogd_inppkt_NFLOG.c

Latest patches introduce a modification of plugin behaviour. It was not possible with existing code to reuse a plugin instance. For example, it is not possible to do :
stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu2:LOGEMU

This kind of setup is useful to be able to log in a file and in a database for example. To be able to have such a setup it is necessary:
- Not to call twice or more start function to avoid problem (it is not possible to listen to the same nfgroup more than once)
- Duplicate the message in the INPUT module.
This patchset contains ulogd necessary modifications and modifications of NFLOG, ULOG and NFCT INPUT plugins.

The patches are :
- Don't call start function multiple time for a single plugin instance.
- Add a list of used plugininstance.
- Duplicate message to all existing instance of NFLOG.
- Add code for duplication of message in ULOG
- Duplication of message in NFCT input plugin

Global stats:

 doc/mysql-ulogd2.sql              |   17 +++++++++++------
 doc/pgsql-ulogd2.sql              |   20 ++++++++++++--------
 filter/ulogd_filter_IP2BIN.c      |   12 ++++++------
 include/ulogd/ulogd.h             |    3 +++
 input/flow/ulogd_inpflow_NFCT.c   |    7 +++++++
 input/packet/ulogd_inppkt_NFLOG.c |   12 ++++++++++--
 input/packet/ulogd_inppkt_ULOG.c  |    5 +++++
 src/ulogd.c                       |   35 ++++++++++++++++++++++++++++++-----
 util/db.c                         |    5 ++++-
 9 files changed, 88 insertions(+), 28 deletions(-)

BR,
--
Eric Leblond
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/