]> git.ipfire.org Git - thirdparty/ulogd2.git/log
thirdparty/ulogd2.git
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

17 years agoSends one message for each connection event instead of two
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 16:04:48 +0000 (16:04 +0000)] 
Sends one message for each connection event instead of two

Signed-off-by: Eric Leblond <eric@inl.fr>
17 years agoThis patch adds a sample configuration for logging with ebtables through nflog out...
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 10:59:23 +0000 (10:59 +0000)] 
This patch adds a sample configuration for logging with ebtables through nflog out to LOGEMU and SYSLOG. It also fixes a config bug with ipv6 (log2)

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agoadds AF_BRIDGE support to IP2STR
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 10:56:41 +0000 (10:56 +0000)] 
adds AF_BRIDGE support to IP2STR

This patch make the ip address string converter AF_BRIDGE compatible and add ip address ARP keys in order to make them also convert.

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agoThis patch adds support for AF_BRIDGE to the PRINTPKT plugin, which allows to form...
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 01:02:26 +0000 (01:02 +0000)] 
This patch adds support for AF_BRIDGE to the PRINTPKT plugin, which allows to form log lines for packets coming from ebtables. Currently it supports IPv4, IPv6 and ARP.

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agoAdds AF_BRIDGE and ARP header interpreter to BASE plugin
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Tue, 19 Feb 2008 00:46:15 +0000 (00:46 +0000)] 
Adds AF_BRIDGE and ARP header interpreter to BASE plugin

This patch adds an AF_BRIDGE interpreter to ulogd_raw2packet_BASE plugin, which allows to log packets coming from ebtables. It also adds an ARP header decoder.

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agorevert r7369 until clarified
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Thu, 14 Feb 2008 15:24:06 +0000 (15:24 +0000)] 
revert r7369 until clarified

17 years agoAdds AF_BRIDGE and ARP header interpreter to BASE plugin
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Thu, 14 Feb 2008 15:07:24 +0000 (15:07 +0000)] 
Adds AF_BRIDGE and ARP header interpreter to BASE plugin

This patch adds an AF_BRIDGE interpreter to
ulogd_raw2packet_BASE plugin, which allows to log
packets coming from ebtables.
It also adds an ARP header decoder.

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agoAdds input key enumeration in order to address the fields
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Thu, 14 Feb 2008 14:48:28 +0000 (14:48 +0000)] 
Adds input key enumeration in order to address the fields
with symbols instead of numbers.
Shortens the lines by the use of GET_VALUE()

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agoEric Leblond <eric@inl.fr>:
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 10 Feb 2008 02:08:42 +0000 (02:08 +0000)] 
Eric Leblond <eric@inl.fr>:
Document the difference between IPv4 and IPv6 logging.

17 years agorevert r7348
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 10 Feb 2008 02:07:42 +0000 (02:07 +0000)] 
revert r7348

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:44:30 +0000 (17:44 +0000)] 
From: Eric Leblond <eric@inl.fr>
Add UID display to PRINTPKT filter.

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:43:32 +0000 (17:43 +0000)] 
From: Eric Leblond <eric@inl.fr>
Add support for UID dumping to NFLOG input plugin.

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr> and Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:38:24 +0000 (17:38 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr> and Eric Leblond <eric@inl.fr>
Add Icmpv6 support to SQL schema.

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:34:00 +0000 (17:34 +0000)] 
From: Eric Leblond <eric@inl.fr>
Some macros were defined several time. This was the case of GET_VALUE,
pp_is_valid. This patch puts the definition in ulogd.h and fixes the
definition of pp_is_valid which was wrong (causing segfault by acessing to
fields at NULL).

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:30:38 +0000 (17:30 +0000)] 
From: Eric Leblond <eric@inl.fr>
The treatment of the return of some functions from libnetfilter_log API was wrong and this was preventing some fields to be propagated through the stack.

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:25:51 +0000 (17:25 +0000)] 
From: Eric Leblond <eric@inl.fr>

This patch adds some examples of stack to the configuration file.
It also fixes some comments to avoid confusion. IP2BIN has been
added to the list of loaded modules.

17 years agoFrom: Eric Leblond <eric@inl.fr>:
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:24:41 +0000 (17:24 +0000)] 
From: Eric Leblond <eric@inl.fr>:
Fix a crash in ulogd2 when dealing with default value given as string.

17 years agoFrom: Eric Leblond <eric@inl.fr>:
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sat, 9 Feb 2008 17:23:16 +0000 (17:23 +0000)] 
From: Eric Leblond <eric@inl.fr>:

When using NFLOG or ULOG, obb.family (protocol IPv4 or IPv6) has
to be setup manually in ulogd.conf configuration file. This is
used by the BASE filter to properly parse the packet. This
patch suppress oob.family as output keys of NFLOG and ULOG and let
the BASE filter determine the family of the packet by itself (by
parsing the raw header).

A good side effect is to be able to log in IPv6 and IPv4 in the
same group. Before that, two loggers have to be setup separatly.

17 years agoFrom Eric Leblond <eric@inl.fr>:
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Thu, 7 Feb 2008 06:47:11 +0000 (06:47 +0000)] 
From Eric Leblond <eric@inl.fr>:
This patch modify ulogd_filter_IFINDEX to use libnfnetlink for index to
interface name mapping instead of using local version. This requires at least
libnfnetlink 0.0.30. This dependancy is checked in configure (thanks to
Sebastien Tricaud for his patch).

17 years agoremove old mysql and pgsql definitions
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:39:20 +0000 (12:39 +0000)] 
remove old mysql and pgsql definitions

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:31:30 +0000 (12:31 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr>

This patch fixes the type of some fields in the SQL schema to sync
with datatype of the corresponding ulogd2 keys.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:30:04 +0000 (12:30 +0000)] 
From: Eric leblond <eric@inl.fr>

Description of ULOGD_RET_IPADDR was incorrect in information display mode.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:29:05 +0000 (12:29 +0000)] 
From: Eric leblond <eric@inl.fr>

This patch adds an state extension to SQL schema. This can be used to store
the information about the packet being dropped or accepted.

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:26:32 +0000 (12:26 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr>

SQL standard says a function has to be called with SELECT and not CALL.
This patch modify code accordingly.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:26:01 +0000 (12:26 +0000)] 
From: Eric leblond <eric@inl.fr>

This patch fixes some small typo in MySQL schema.

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:24:50 +0000 (12:24 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr>
This patch adds oob_family to the schema. Thus it is now possible to easily select IPv4 or IPv6 entries in the database. This patch also explicitly selects fields to create view.

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:24:08 +0000 (12:24 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr>

Change from procedure to function in mysql schema adds the need to free MySQL
result after request.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:23:10 +0000 (12:23 +0000)] 
From: Eric leblond <eric@inl.fr>
With this patch, BASE filter module is able fill oob_family when parsing IPv6
address.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:13:54 +0000 (12:13 +0000)] 
From: Eric leblond <eric@inl.fr>
OOB_FAMILY output was not set by NFLOG because the key was not set as valid.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:11:44 +0000 (12:11 +0000)] 
From: Eric leblond <eric@inl.fr>
Fix a bug in IPv4 output of IP2BIN module.

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:10:48 +0000 (12:10 +0000)] 
From: Eric Leblond <eric@inl.fr>
MySQL need no to be able to print RAW data to be able to display
IP addresses.

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:08:23 +0000 (12:08 +0000)] 
From: Eric Leblond <eric@inl.fr>
Fix description and indenting (cleanups)

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:06:23 +0000 (12:06 +0000)] 
From: Eric leblond <eric@inl.fr>
This module convert IP from internal notation to a string in binary notation
which is used by the MySQL output plugin.

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:03:21 +0000 (12:03 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr>
Mark ID as inactive (sequence in pg schema)

17 years agoFrom: Pierre Chifflier <chifflier@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 12:02:20 +0000 (12:02 +0000)] 
From: Pierre Chifflier <chifflier@inl.fr>
Fix incorrect options for PGsql module.

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 11:59:47 +0000 (11:59 +0000)] 
From: Eric leblond <eric@inl.fr>
- This patch suppress key relative to IPv6 address because IPv4 and IPv6 can be stored in the same key.
- Add missing IP2STR line to ulogd.conf.in

17 years agoFrom: Eric leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 11:57:24 +0000 (11:57 +0000)] 
From: Eric leblond <eric@inl.fr>

This module is a generic module which is used to convert an IP from internal representation to string representation. This is a task needed by several modules like printpkt or pgsql. This module factorizes the code.

17 years agoFrom: Eric Leblond <eric@inl.fr>
/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org [Sun, 3 Feb 2008 11:46:58 +0000 (11:46 +0000)] 
From: Eric Leblond <eric@inl.fr>
MySQL client library does not reconnect automatically since 5.0.