]> git.ipfire.org Git - thirdparty/ulogd2.git/log
thirdparty/ulogd2.git
17 years agodoc: update ulogd SGML documentation
Eric Leblond [Thu, 11 Sep 2008 11:15:44 +0000 (13:15 +0200)] 
doc: update ulogd SGML documentation

This patch updates the SGML documentation to be in sync with the latest
version of the code.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoNFLOG: remove unused option
Eric Leblond [Thu, 11 Sep 2008 11:09:52 +0000 (13:09 +0200)] 
NFLOG: remove unused option

This patch suppresses the "rmem" configuration variable which was
inherited from the original ULOG plugin and which is unused in the
NFLOG plugin.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agodoc: update ulogd man-page
Pablo Neira Ayuso [Thu, 11 Sep 2008 11:06:32 +0000 (13:06 +0200)] 
doc: update ulogd man-page

This patch updates ulogd man page to add information about
the new features.

Based on one Eric Leblond's patch.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agodistrib: fix distcheck magic ulogd-2.0.0beta2
Pablo Neira Ayuso [Fri, 15 Aug 2008 19:44:22 +0000 (21:44 +0200)] 
distrib: fix distcheck magic

This patch fixes the `make distcheck' magic

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocompilation: set -Wno-ununused-parameter in CFLAGS
Eric Leblond [Fri, 1 Aug 2008 08:32:13 +0000 (10:32 +0200)] 
compilation: set -Wno-ununused-parameter in CFLAGS

This patch adds the "-Wno-unused-parameter" option to CFLAGS. This
suppress gcc warning that can not be fixed due to the usage of generic system
like callback where function definition has to be standardized.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix warning due to lack of parenthesis
Eric Leblond [Thu, 31 Jul 2008 08:49:08 +0000 (10:49 +0200)] 
cleanup: fix warning due to lack of parenthesis

Fix gcc warning related to the lack of parenthesis.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix inappropriate initializations in ulogd.c
Eric Leblond [Thu, 31 Jul 2008 08:47:55 +0000 (10:47 +0200)] 
cleanup: fix inappropriate initializations in ulogd.c

This patch fixes some improper initialization in ulogd.c.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix redefinition of TCP_URG key in printpkt
Eric Leblond [Thu, 31 Jul 2008 08:46:56 +0000 (10:46 +0200)] 
cleanup: fix redefinition of TCP_URG key in printpkt

This patch fixes a multiple definition of the key TCP_URG.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix warning about integer format
Eric Leblond [Thu, 31 Jul 2008 08:45:27 +0000 (10:45 +0200)] 
cleanup: fix warning about integer format

This patch uses PRIu64 and PRId64 macros from inttypes.h to have a correct
definition of 64 bit integer format for 64bits and 32bits arch.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix compilation warning about lack of parenthesis
Eric Leblond [Thu, 31 Jul 2008 08:44:15 +0000 (10:44 +0200)] 
cleanup: fix compilation warning about lack of parenthesis

This patch adds parenthesis around an expression to avoid confusion
between order preference of && and || operators.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix compilation warnings related to pointer comparisons
Eric Leblond [Thu, 31 Jul 2008 08:43:08 +0000 (10:43 +0200)] 
cleanup: fix compilation warnings related to pointer comparisons

This patch cast to (char *) some (void *) to avoid a gcc warning in
string format parsing.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org
17 years agocleanup: fix compilation warning related to signed and unsigned comparisons
Eric Leblond [Thu, 31 Jul 2008 08:41:57 +0000 (10:41 +0200)] 
cleanup: fix compilation warning related to signed and unsigned comparisons

This patch fixes the warning related to signed and unsigned comparaison.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agocleanup: remove unused timeout parameter in function
Eric Leblond [Thu, 31 Jul 2008 08:40:55 +0000 (10:40 +0200)] 
cleanup: remove unused timeout parameter in function

The function ipulog_read had a timeout parameter which was not
used in the code.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agosyslog: cleanly stops syslog
Eric Leblond [Thu, 31 Jul 2008 08:39:31 +0000 (10:39 +0200)] 
syslog: cleanly stops syslog

This patch adds a stop function to the module which closes the
connection to the log system.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoDB: update schemas to integrate the link layer information
Eric Leblond [Tue, 29 Jul 2008 13:16:56 +0000 (15:16 +0200)] 
DB: update schemas to integrate the link layer information

This patch adds support for logging the destination mac address and
raw header in the SQL databases.

In case of an ethernet header, a tuple (mac_saddr,mac_daddr,mac_proto)
is logged only once.

Signed-off-by: Pierre Chifflier <chifflier@inl.fr>
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agocleanup: fix gcc warnings
Eric Leblond [Tue, 29 Jul 2008 10:24:18 +0000 (12:24 +0200)] 
cleanup: fix gcc warnings

This patch fixes some gcc warnings:
 * Unused variables
 * Functions with wrong return (or without return)

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoNFLOG: minor cleanup
Pablo Neira Ayuso [Tue, 29 Jul 2008 10:12:13 +0000 (12:12 +0200)] 
NFLOG: minor cleanup

break lines at 80 char columns

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoMAC2STR: Rename it to HWHDR
Eric Leblond [Tue, 29 Jul 2008 10:11:21 +0000 (12:11 +0200)] 
MAC2STR: Rename it to HWHDR

Use a more appropriate name for this filter.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoMAC2STR: add support for the new RAW MAC keys
Eric Leblond [Tue, 29 Jul 2008 10:08:19 +0000 (12:08 +0200)] 
MAC2STR: add support for the new RAW MAC keys

This patch modifies MAC2STR to use the new MAC keys that gives us more
accurate information to parse the link layer header. This patch also
does some probing based on the header and field size in the case of
ULOG (since we do not have enough information to perform accurate
parsing).

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoNFLOG: get full link layer header (requires >= 2.6.27)
Eric Leblond [Tue, 29 Jul 2008 09:49:24 +0000 (11:49 +0200)] 
NFLOG: get full link layer header (requires >= 2.6.27)

This patch modifies the key structure of NFLOG. It solves the conflict
between ULOG and NFLOG by ensuring that keys have the same meaning:
 * raw.mac is the full hardware header
 * raw.mac.saddr is the source hardware address
Following Patrick suggestion, it adds a new key "raw.type" which is
used to store the type of hardware.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoFix a trivial typo
Eric Leblond [Wed, 23 Jul 2008 12:56:31 +0000 (14:56 +0200)] 
Fix a trivial typo

This patch fixes a trivial typo.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoFix wrong casting warning during compilation
Eric Leblond [Wed, 23 Jul 2008 12:55:44 +0000 (14:55 +0200)] 
Fix wrong casting warning during compilation

This patch cast a expression to avoid a warning.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoMinor IPFIX fixes
Eric Leblond [Wed, 23 Jul 2008 12:54:25 +0000 (14:54 +0200)] 
Minor IPFIX fixes

IPFIX needs some huge work. This patch fixes some basic logic errors.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoModify CFLAGS to have useful gcc warnings
Eric Leblond [Wed, 23 Jul 2008 12:53:04 +0000 (14:53 +0200)] 
Modify CFLAGS to have useful gcc warnings

This patch modifies CFLAGS to add -Wall and -Wextra flags to gcc
compilation flag. This will help to detect some stupid problems.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agoFix computation of allocated size for query
Eric Leblond [Thu, 10 Jul 2008 06:31:55 +0000 (08:31 +0200)] 
Fix computation of allocated size for query

This patch fixes the computation of the allocation size for the query.
It was not taking into account the length of the name of the procedure.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoRemove obsolete dist-hook for svn
Eric Leblond [Thu, 10 Jul 2008 06:28:55 +0000 (08:28 +0200)] 
Remove obsolete dist-hook for svn

This patch suppress a dist-hook in Makefile.am which was related
to the suppression of some subversion related files.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agorevert commit 3178606785161296dc5a1bd4d42d965db8b3e2cd
Pablo Neira Ayuso [Sat, 28 Jun 2008 10:43:59 +0000 (12:43 +0200)] 
revert commit 3178606785161296dc5a1bd4d42d965db8b3e2cd

We already check for latest library version, this checking
is not required anymore.

Reported-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agobump libraries dependencies to lastest release
Pablo Neira Ayuso [Fri, 27 Jun 2008 14:03:57 +0000 (16:03 +0200)] 
bump libraries dependencies to lastest release

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 years agosuppress useless debugging message in the ULOG input plugin
Eric Leblond [Mon, 23 Jun 2008 14:45:39 +0000 (16:45 +0200)] 
suppress useless debugging message in the ULOG input plugin

17 years agostructure initialization cleanup
Eric Leblond [Mon, 23 Jun 2008 14:22:08 +0000 (16:22 +0200)] 
structure initialization cleanup

17 years agowhitespace cleanup
Eric Leblond [Mon, 23 Jun 2008 14:21:08 +0000 (16:21 +0200)] 
whitespace cleanup

17 years agoThis patch is a backport of Jaap Keuter fix for PCAP output module.
Eric Leblond [Wed, 18 Jun 2008 15:41:23 +0000 (17:41 +0200)] 
This patch is a backport of Jaap Keuter fix for PCAP output module.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoFix warning in compilation due to missing include
Eric Leblond [Wed, 18 Jun 2008 15:40:48 +0000 (17:40 +0200)] 
Fix warning in compilation due to missing include

strerror function was used without inclusion of string.h. This patch
adds the include and fixes the warning.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoFix NFCT/NFLOG plugin compilation when libraries use non-standard prefix.
Eric Leblond [Wed, 18 Jun 2008 15:39:37 +0000 (17:39 +0200)] 
Fix NFCT/NFLOG plugin compilation when libraries use non-standard prefix.

Fixes compilation of NFLOG and NFCT plugin when libnetfilter libraries
are installed under a non standard prefix. Include path and libs path
for libnetfilter_conntrack and libnetfilter_log were not correctly set even
if pkg-config found them.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoStore MAC in SQL databases only once
Pierre Chifflier [Thu, 12 Jun 2008 09:45:28 +0000 (11:45 +0200)] 
Store MAC in SQL databases only once

This patch modifies the SQL schema for MySQL and PostgreSQL to store
the mac address only once (instead of duplicating the mac address for
each packet). This is done by using a shared reference to the entry
containing the tuple (mac_address,mac_protocol).

Signed-off-by: Pierre Chifflier <chifflier@inl.fr>
17 years agoCleanup: fix error messages and indentation
Eric Leblond [Thu, 12 Jun 2008 09:17:03 +0000 (11:17 +0200)] 
Cleanup: fix error messages and indentation

This patch fixes some messages in the NFCT and NFLOG input
plugin (end of line before quote). It also fixes indenting by
suppressing some spaces on empty line and replacing spaces by tab.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoUpdate configfile for MARK module
Eric Leblond [Thu, 12 Jun 2008 09:15:58 +0000 (11:15 +0200)] 
Update configfile for MARK module

Add stack example for MARK and update some wrong stacks.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoUse ULOGD_IRET_* as return for all interpreters
Eric Leblond [Thu, 12 Jun 2008 09:15:14 +0000 (11:15 +0200)] 
Use ULOGD_IRET_* as return for all interpreters

This patch modifies plugins to use the already defined but not used
define. This also fixes some weird behaviours in error treatment (like
not stopping after OOM).

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoFix hexadecimal parsing in config file
Eric Leblond [Thu, 12 Jun 2008 09:10:58 +0000 (11:10 +0200)] 
Fix hexadecimal parsing in config file

The config file parsing was not able to parse integer given in hex notation.
This patch modify the parsing of configfile to be able to use different
integers notation.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoNew MARK-based filter
Eric Leblond [Thu, 12 Jun 2008 09:08:31 +0000 (11:08 +0200)] 
New MARK-based filter

This module filters message by using the mark to decide wether or not a
packet or a flow has to be logged. It takes a mark and a mask option. It
demonstrates the usage of ULOGD_IRET_STOP which can be used to abort
iteration through the stack.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoFix the propagation through the stack
Eric Leblond [Thu, 12 Jun 2008 09:06:28 +0000 (11:06 +0200)] 
Fix the propagation through the stack

When a plugin returns ULOGD_IRET_STOP, the propagation should
stop. This was not the case as break was used to do so but it was called
inside a switch and thus apply to the switch instruction and not to
the llist iteration.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agofix crash when SIGHUP is received.
Hugo Mildenberger [Thu, 5 Jun 2008 22:47:15 +0000 (00:47 +0200)] 
fix crash when SIGHUP is received.

crash due to ulogd_logfile set to a string allocated on stack by config_parse_file

17 years agoFix crash when using NFCT with hash_enable=0.
regit [Wed, 4 Jun 2008 13:19:05 +0000 (15:19 +0200)] 
Fix crash when using NFCT with hash_enable=0.

This patch fixes NFCT when hash_enable is 0. Limitation of treatment to
NFCT_DESTROY message type causes usage of the hashtable function and
hence a crash because it is not initiated.

Signed-off-by: regit <regit@ghlodit.inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agoSource and destination addresses were put in ptr field of the target structure
Eric Leblond [Mon, 2 Jun 2008 00:02:09 +0000 (02:02 +0200)] 
Source and destination addresses were put in ptr field of the target structure
instead of being put in the new type ui128. The result was an improper value
of the IPv6 source add destination addresses.

17 years agoadds some examples to the configuration file
Eric Leblond [Sun, 1 Jun 2008 23:44:26 +0000 (01:44 +0200)] 
adds some examples to the configuration file

17 years agoModify the code by activating overrun handling if and only if the local hash is used...
Eric Leblond [Sun, 1 Jun 2008 23:44:09 +0000 (01:44 +0200)] 
Modify the code by activating overrun handling if and only if the local hash is used (hash_enable=1 which is the default)

17 years agoThis patch adds a new function which insert or update connection tracking
Eric Leblond [Sun, 1 Jun 2008 23:42:44 +0000 (01:42 +0200)] 
This patch adds a new function which insert or update connection tracking
entries depending on the event type parameter.

17 years agoSync SQL fields with NFCT keys
Eric Leblond [Sun, 1 Jun 2008 23:41:45 +0000 (01:41 +0200)] 
Sync SQL fields with NFCT keys

17 years agoFill every possible timestamp. It fills START timestamp for NEW packet and STOP times...
Eric Leblond [Sun, 1 Jun 2008 23:41:18 +0000 (01:41 +0200)] 
Fill every possible timestamp. It fills START timestamp for NEW packet and STOP timestamp for DESTROY packet

17 years agoSet timestamp in NFLOG for INPUT and OUTPUT
Eric Leblond [Sun, 1 Jun 2008 23:40:41 +0000 (01:40 +0200)] 
Set timestamp in NFLOG for INPUT and OUTPUT

17 years agocheck for required libraries for compilation in configure.in
Pablo Neira Ayuso [Sun, 1 Jun 2008 23:39:17 +0000 (01:39 +0200)] 
check for required libraries for compilation in configure.in

17 years agoimprove overrun handling NFLOG
Pablo Neira Ayuso [Sun, 1 Jun 2008 23:38:52 +0000 (01:38 +0200)] 
improve overrun handling NFLOG

This patch improves the overrun handling. The NFLOG plugin duplicates the
netlink buffer size if the size does not goes after the upper boundary.
This patch also introduces two new clauses, the netlink_socket_buffer_size
and netlink_socket_buffer_maxsize that set the size of the netlink socket
buffer.

17 years agocleanup for key builder and fix IPv6 support and introduce 128-bits type
Pablo Neira Ayuso [Sun, 1 Jun 2008 23:38:33 +0000 (01:38 +0200)] 
cleanup for key builder and fix IPv6 support and introduce 128-bits type

This patch cleans up the key building by breaking lines at 80 columns and
it fixes the IPv6 support (use of a pointer after free) by introducing a new
128 bit type.

17 years agoimprove netlink overrun handling of NFCT
Pablo Neira Ayuso [Sun, 1 Jun 2008 23:37:24 +0000 (01:37 +0200)] 
improve netlink overrun handling of NFCT

This patch improves the overrun handling. The logic behind this patch
consists of two steps:

1) duplicate the netlink buffer size if the size does not goes after the
upper boundary.
2) scheduling a resynchronization (in two seconds) with the kernel conntrack
table if we hit ENOBUFS. During the resynchronization, the NFCT plugin dumps
the current table and purges the objects that do not exist anymore.

This patch also introduces two new clauses, the netlink_socket_buffer_size
and netlink_socket_buffer_maxsize that set the size of the netlink socket
buffer.

17 years agorework NFCT to use a generic hashtable
Pablo Neira Ayuso [Sun, 1 Jun 2008 23:36:48 +0000 (01:36 +0200)] 
rework NFCT to use a generic hashtable

This patch introduces a generic hashtable to store the nf_conntrack objects.
The objects are identified by the original and reply tuples instead of the
conntrack ID which is not dumped in the event message of linux kernel < 2.6.25.
This patch also fixes the NFCT_MSG_* by NFCT_T_* which is the appropriate
message type tag.

17 years agoThis patchset adds support for the "numeric_label" option. For instance, it
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 29 Apr 2008 14:34:30 +0000 (14:34 +0000)] 
This patchset adds support for the "numeric_label" option. For instance, it
can be used to determine if the packet has been dropped, rejected or accepted.
The meaning of label is completely user-defined.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds oob.hook to the list of output key sof ULOG input plugin.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 27 Apr 2008 08:01:48 +0000 (08:01 +0000)] 
This patch adds oob.hook to the list of output key sof ULOG input plugin.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoUpdate PostgreSQL schema to add the insert procedure for conntrack
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 27 Apr 2008 07:54:56 +0000 (07:54 +0000)] 
Update PostgreSQL schema to add the insert procedure for conntrack
connections.

Signed-off-by: Pierre Chifflier <chifflier@inl.fr>
17 years agoIntroduce function to convert binary data to printable strings.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 27 Apr 2008 07:54:05 +0000 (07:54 +0000)] 
Introduce function to convert binary data to printable strings.
Update view_tcp_quad and view_udp_quad.

Signed-off-by: Pierre Chifflier <chifflier@inl.fr>
17 years agoAdd function INSERT_CT for conntrack
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 27 Apr 2008 07:52:49 +0000 (07:52 +0000)] 
Add function INSERT_CT for conntrack

17 years agoFix a bug in definition of seq_global_ce macro.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 27 Apr 2008 07:49:33 +0000 (07:49 +0000)] 
Fix a bug in definition of seq_global_ce macro.
Signed-off-by: Eric Leblond <eric@inl.fr>
17 years ago[ULOGD PATCH, RFC] Modify NFLOG to be able to use it with older libnetfilter_log
/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net [Tue, 22 Apr 2008 05:09:55 +0000 (05:09 +0000)] 
[ULOGD PATCH, RFC] Modify NFLOG to be able to use it with older libnetfilter_log

NFLOG has been modified to support GID display. There is a problem as this
feature is only available in latest subversion of libnetfilter_log. This
patch made this feature optional:
 * It detects if system support the nflog_get_gid() function
 * Compilation of nflog_get_gid() related code is conditional

17 years agoFix missing chunk for GID logging
/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net [Mon, 21 Apr 2008 12:46:04 +0000 (12:46 +0000)] 
Fix missing chunk for GID logging

17 years agoPrint GID/MARK in printpkt.c
/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net [Mon, 21 Apr 2008 12:40:06 +0000 (12:40 +0000)] 
Print GID/MARK in printpkt.c

17 years agoFix "PROTO=KEY_TCP"/"PROTO=KEY_UDP"
/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net [Mon, 21 Apr 2008 12:39:20 +0000 (12:39 +0000)] 
Fix "PROTO=KEY_TCP"/"PROTO=KEY_UDP"

I have no idea what the intention behind this change was, but it
seems bogus, the output format should (mostly) match ipt_LOG.

17 years ago[ULOGD PATCH] Fix multiple usage of DB output plugin.
/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net [Mon, 21 Apr 2008 12:21:23 +0000 (12:21 +0000)] 
[ULOGD PATCH] Fix multiple usage of DB output plugin.

Due to the modifications done to be able to use multiple time the SOURCE
plugin, a single instance of database output plugin could not anymore be
used in separate stack. This patch fixes this by limiting the effect of
the previous modification on SOURCE plugin.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoexample for logging IPv6 packet to PGsql after a collect via NFLOG
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 13 Apr 2008 01:37:02 +0000 (01:37 +0000)] 
example for logging IPv6 packet to PGsql after a collect via NFLOG

Signed-off-by: Anton Vazir <anton.vazir@gmail.com>
17 years agofix PGSql types
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 12 Apr 2008 11:55:53 +0000 (11:55 +0000)] 
fix PGSql types

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds some example to the default configuration file. It modify
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 9 Apr 2008 13:58:36 +0000 (13:58 +0000)] 
This patch adds some example to the default configuration file. It modify
some stack to take my latest patches into account.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoFix an inconsistency of field naming among the different tables and
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 9 Apr 2008 13:55:11 +0000 (13:55 +0000)] 
Fix an inconsistency of field naming among the different tables and
accross the stack NFCT IP2BIN MYSQL.In fact IP2BIN out .bin suffixed
fields.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoNACCT was IPv4 only and was heavily dependant of the order of NFCT keys.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 9 Apr 2008 13:53:45 +0000 (13:53 +0000)] 
NACCT was IPv4 only and was heavily dependant of the order of NFCT keys.
This patch introduces a explicit list of input keys and obtains IPv6
compliance by using IP2STR output as input for IP address.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoadd missing ulogd_filter_MAC2STR
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 9 Apr 2008 11:06:50 +0000 (11:06 +0000)] 
add missing ulogd_filter_MAC2STR

17 years agoThis patch suppress a now unused option. Each database module
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Mon, 7 Apr 2008 23:59:30 +0000 (23:59 +0000)] 
This patch suppress a now unused option. Each database module
have now to be used with a defined IP storage type.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoDESTROY event were not correctly displayed due to a problem in event type
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:54:51 +0000 (15:54 +0000)] 
DESTROY event were not correctly displayed due to a problem in event type
detection.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch is a port to the new libnetfilter_conntrack API of the NFCT
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:45:50 +0000 (15:45 +0000)] 
This patch is a port to the new libnetfilter_conntrack API of the NFCT
plugin. To be able to send IP addresses to the IP2STR and IP2BIN module
oob.family and oob.protocol keys have been added.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThe PRINTFLOW module had its own code for string conversion of IPv6 address.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:44:03 +0000 (15:44 +0000)] 
The PRINTFLOW module had its own code for string conversion of IPv6 address.
This patch change the input key of the module to use conversion made by the
IP2STR module.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch fixes a typo in an error message.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:41:02 +0000 (15:41 +0000)] 
This patch fixes a typo in an error message.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoAn error in the type of an argument in the call to inet_ntop was causing IPv6
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:40:05 +0000 (15:40 +0000)] 
An error in the type of an argument in the call to inet_ntop was causing IPv6
address to be transformed in a string not really related to the real Ipv6
address.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoArp related key have to be optionnal to be able to use the IP2STR module
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:39:09 +0000 (15:39 +0000)] 
Arp related key have to be optionnal to be able to use the IP2STR module
for flow display.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoLength of MAC address was set to big and thus display was wrong. This
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:04:49 +0000 (15:04 +0000)] 
Length of MAC address was set to big and thus display was wrong. This
misbehaviour was also causing to read datas out of the correct range.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds MAC address handling to the postgresql output plugin.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:00:50 +0000 (15:00 +0000)] 
This patch adds MAC address handling to the postgresql output plugin.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds MAC address handling to the postgresql output plugin. This
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 15:00:23 +0000 (15:00 +0000)] 
This patch adds MAC address handling to the postgresql output plugin. This
patch also removes mac_daddr which does not provide any interesting
logging information.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch introduces a new plugin MAC2STR which is in charge
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 14:43:43 +0000 (14:43 +0000)] 
This patch introduces a new plugin MAC2STR which is in charge
of conversion to string of MAC address. It is used by database
output plugin to store MAC related information.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoType of the raw.mac_len key was set to string but this is an unsigned
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 14:39:56 +0000 (14:39 +0000)] 
Type of the raw.mac_len key was set to string but this is an unsigned
interger. This patch fix this in the ULOG module.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoType of the raw.mac_len key was set to string but this is an unsigned
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 14:39:01 +0000 (14:39 +0000)] 
Type of the raw.mac_len key was set to string but this is an unsigned
interger. This patch fix this in the NFLOG module.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch fixes a problem in SQL reconnection algorithm which is managed in
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 5 Apr 2008 14:02:56 +0000 (14:02 +0000)] 
This patch fixes a problem in SQL reconnection algorithm which is managed in
the db.c file for PgSQL and MySQL. In case of problem during request execution
a new connection to the database was immediatly started without closing the
previous one. The consequence was to block the database by having too much
simultaneous open connections.

This patch fixes the problem by disconnectinng from the database after a
request failure and trying to reconnect after a delay which is by default
of 2 secondes. This delay can be customized via the reconnect configuration
variable in the database configuration section.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds support of event type display in printflow filter. This is used
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 26 Mar 2008 09:42:20 +0000 (09:42 +0000)] 
This patch adds support of event type display in printflow filter. This is used
to display event type in textual output modules. Here's an output example:

[DESTROY] ORIG: SRC=192.168.1.2 DST=192.168.1.255 PROTO=UDP SPT=631 DPT=631 \\
PKTS=1 BYTES=197 , REPLY: SRC=192.168.1.255 DST=192.168.1.2 \\
PROTO=UDP SPT=631 DPT=631 PKTS=0 BYTES=0

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch contains two linked modifications in NFCT input plugin:
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 26 Mar 2008 09:40:05 +0000 (09:40 +0000)] 
This patch contains two linked modifications in NFCT input plugin:
- event mask is now configurable though the event_mask configuration variable
- event type is now stored in the ct.event output key. This can be used to
  display the information or to use it to implement some tracking algorithm in
  userspace.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch updates included configuration file example by adding some plugins
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Wed, 26 Mar 2008 00:39:10 +0000 (00:39 +0000)] 
This patch updates included configuration file example by adding some plugins
loading and stack example.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds support for duplication of the message to be
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 10:09:06 +0000 (10:09 +0000)] 
This patch adds support for duplication of the message to be
able to use multiple time the same instance of NFCT.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoA specific instance of NFLOG can now be use in multiple stacks. This is done
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 10:06:15 +0000 (10:06 +0000)] 
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@inl.fr>
17 years agoAn instance of NFLOG can now be use in multiple stacks. This is done
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 10:01:34 +0000 (10:01 +0000)] 
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 <eric@inl.fr>
17 years agoThis patch adds plist a linked list to the pluginstance
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 09:57:12 +0000 (09:57 +0000)] 
This patch adds plist a linked list to the pluginstance
structure. It can be used by input modules to duplicate an
entry. This solves the issue of not being able to use the same
plugin instance twice.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoWhen a plugin instance is used in multiple stack it is not necessary to
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 08:56:08 +0000 (08:56 +0000)] 
When a plugin instance is used in multiple stack it is not necessary to
call the start function for each stack.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoMinor indentation fix in ulogd_inppkt_NFLOG.c.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 08:50:57 +0000 (08:50 +0000)] 
Minor indentation fix in ulogd_inppkt_NFLOG.c.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoIP2BIN filter convert IP address from host storage to a "binary" string which
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 08:49:21 +0000 (08:49 +0000)] 
IP2BIN filter convert IP address from host storage to a "binary" string which
can be use by MySQL. This is not strictly speaking raw data but it was of type
RAW.

Following remark from Hugo Mildenberger, I introduce in this patch a dedicated
type ULOGD_RET_RAWSTR. The main reason not to use a ULOGD_RET_STRING parameter
is that the paramater is not human readable.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds oob.hook to the list of fields export to the databases. This
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 25 Mar 2008 08:46:01 +0000 (08:46 +0000)] 
This patch adds oob.hook to the list of fields export to the databases. This
adds the capability to know where the packet has been logged and will be used
to make a link between connection and logged packets.

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoadd missing timer.h
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Fri, 22 Feb 2008 00:29:23 +0000 (00:29 +0000)] 
add missing timer.h

17 years agoImprove fd_sets handling. Based on a previous patch from Holger Eitzenberger.
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 19:46:12 +0000 (19:46 +0000)] 
Improve fd_sets handling. Based on a previous patch from Holger Eitzenberger.

17 years ago- implement a synchronous timer framework
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 18:53:07 +0000 (18:53 +0000)] 
- implement a synchronous timer framework
- fix crash when enabling pollinterval clause in flow-based accounting