Skip to content

Misc improvements and bugfixes

Eric Leblond netfilter-devel 1 version Applied

Status from this message: Applied. Thanks Eric. BTW, an early impression, would it be possible to

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 18 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14Fix SQL reconnection algorithm.include/ulogd/db.h util/db.c+9 -21 reply
2/14Suppress ip_as_string configuration variable.include/ulogd/db.h util/db.c+3 -193 replies
3/14Fix type of raw.mac_len key in NFLOG.input/packet/ulogd_inppkt_NFLOG.c+1 -11 reply
4/14Fix type of raw.mac_len key in ULOG.input/packet/ulogd_inppkt_ULOG.c+1 -11 reply
5/14New MAC2STR plugin for hwmac address conversion.filter/Makefile.am filter/ulogd_filter_MAC2STR.c+116 -11 reply
6/14MAC address handling in MySQL output plugin.doc/mysql-ulogd2.sql+13 -183 replies
7/14MAC address handling in PgSQL output plugin.doc/pgsql-ulogd2.sql+19 -41 reply
8/14Add state option to NFLOG input plugin.input/packet/ulogd_inppkt_NFLOG.c+21 -322 replies
9/14Add state support to MySQL schema.doc/mysql-ulogd2.sql+34 -170 replies
10/14Add state option to ULOG input plugin.input/packet/ulogd_inppkt_ULOG.c+17 -10 replies
11/14Add hook output to ULOG input module.input/packet/ulogd_inppkt_ULOG.c+13 -00 replies
12/14Add state support to PGSQL output module.doc/pgsql-ulogd2.sql+34 -60 replies
13/14Update default configuration to fit last changesulogd.conf.in+8 -20 replies
14/14Fix computation of length of mac address.util/printpkt.c+1 -11 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/14] Misc improvements and bugfixes

Hello,

This patchset contains some code cleaning and two structural changes.

The first four patches are code cleaning:
* Fix SQL reconnection algorithm.
* Suppress ip_as_string configuration variable.
* Fix type of raw.mac_len key in NFLOG.
* Fix type of raw.mac_len key in ULOG.

The next set is more interesting as it introduces handling of MAC address via a dedicated module named MAC2STR. Source hardware address is now stored in a dedicated table of the MySQL and pgSQL databases.

Patches which implement this modification are:
* New MAC2STR plugin for hwmac address conversion.
* MAC address handling in MySQL output plugin.
* MAC address handling in PgSQL output plugin.

The next set of patches try to solve a classical netfilter logging problem. As logging is not a verdict, it is not possible to know in userspace if a packet has been accepted or dropped. A frequent workaround is to use the prefix of the ULOG or NFLOG target to indicate the decision taken on the packet.

The idea behind this patchset is to dedicate a group (and a plugin instance in ulogd2) to accepted packets and an other instance to dropped packets. To differentiate the instances a new option, state, has been added to NFLOG and ULOG plugins. Default value of the option is 0 which is NF_DROP value.

The value of the option is sent to the output module as "raw.state" key. This value is stored in a dedicated table of the PgSQL and MySQL output modules.

This modification is implemented in the following patches:
* Add state option to NFLOG input plugin.
* Add state support to MySQL schema.
* Add state option to ULOG input plugin.
* Add state support to PGSQL output module.

The remaining patches are :
* Add hook output to ULOG input module.
* Update default configuration to fit last changes.
* Fix computation of length of mac address.

Patchset statistics :

 doc/mysql-ulogd2.sql              |   78 +++++++++++++++-----------
 doc/pgsql-ulogd2.sql              |   59 +++++++++++++++++---
 filter/Makefile.am                |    6 ++-
 filter/ulogd_filter_MAC2STR.c     |  111 +++++++++++++++++++++++++++++++++++++
 include/ulogd/db.h                |   13 ++---
 input/packet/ulogd_inppkt_NFLOG.c |   26 +++++++-
 input/packet/ulogd_inppkt_ULOG.c  |   33 ++++++++++-
 ulogd.conf.in                     |   10 +++-
 util/db.c                         |   20 ++----
 util/printpkt.c                   |    2 +-
 10 files changed, 286 insertions(+), 72 deletions(-)

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