summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* config: add file option for NACCT pluging to the example config filePablo Neira Ayuso2011-02-241-0/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: use compile/link information from pkgconfigJan Engelhardt2011-02-012-5/+8
| | | | | | | This is important for when the libraries are in a non-default path. Also, libs must be listed in LDADD/LIBADD, not LDFLAGS. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: use appropriate location for program modulesJan Engelhardt2011-02-0113-38/+39
| | | | | | | Modules - since they are dependent on the executable - generally go to libexec/. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: avoid use of LIBS variableJan Engelhardt2011-02-019-8/+8
| | | | | | | The variable contains global libraries linked into every possible object, which is unwanted. Clean up things. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* ulogd: fix double call of stop for reused input pluginsPablo Neira Ayuso2011-01-072-2/+14
| | | | | | | | | | | This patch adds reference counting for plugins. This is used to fix a double stop for input plugins that are reused. This problem was reported by Salih Gonullu <sag@open.ch>: http://marc.info/?l=netfilter&m=129439584700693&w=2 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: fix bug in polling modePablo Neira Ayuso2010-12-091-0/+6
| | | | | | | | | This closes the following bug: http://bugzilla.netfilter.org/show_bug.cgi?id=684 This problem was introduced with the XML output plugin. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* filter/HWHDR: remove redundant sizeof(char)Jan Engelhardt2010-11-051-1/+1
| | | | | | It is 1 by definition. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: no need for error message in PKG_CHECK_MODULESJan Engelhardt2010-11-051-10/+3
| | | | | | | PKG_CHECK_MODULES already produces its own (and more verbose) messsage when a module cannot be found. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: propagate global CFLAGSJan Engelhardt2010-11-0513-3/+14
| | | | | | | | | We must not override CFLAGS, because that will break when the user overrides CFLAGS again at make time (which he is entitled to). So, name our CFLAGS regular_CFLAGS, and also include that across all Makefiles so that they are actually uesd for all the code. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: default to not building static librariesJan Engelhardt2010-11-051-0/+1
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* output/LOGEMU: resolve build warningJan Engelhardt2010-11-051-1/+1
| | | | | | | ulogd_output_LOGEMU.c:37:2: warning: #warning this libc does not define HOST_NAME_MAX Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: remove unused $(all_includes)Jan Engelhardt2010-11-0513-13/+13
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: remove -fPIC flagJan Engelhardt2010-11-053-4/+2
| | | | | | libtool automatically adds PIC flags as needed. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: remove statements without obvious effectJan Engelhardt2010-11-051-4/+0
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: move global automake options into configure.acJan Engelhardt2010-11-052-2/+1
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* Add helper script pcap2ulogPierre Chifflier2010-10-231-0/+166
| | | | | | | This script uses the Net::Pcap Perl library to parse an pcap file and send packets to ulogd2 throught the UNIXSOCK input module. Signed-off-by: Pierre Chifflier <chifflier@edenwall.com>
* Add new input plugin UNIXSOCKPierre Chifflier2010-10-233-1/+837
| | | | | | | | | This input plugins creates a unix socket which can be used to log packets. Scripts or applications can connect to the socket (only one client allowed per socket) and send data in a Key-Length-Value format (including the payload). Signed-off-by: Pierre Chifflier <chifflier@edenwall.com>
* DB output: fix crash in SIGHUP handlingEric Leblond2010-09-221-8/+15
| | | | | | This patch fixes the handling of SIGHUP when a SQL plugin is used. A freed structure was previoulsy used to build the request and this was leading to a crash.
* HWHDR: Fix various crashesEric Leblond2010-09-221-19/+17
| | | | | | This patch fixes the HWHDR plugin. The logic of the interaction with exiting plugin was not correctly coded and this was leading to crashes due to the lack of sanity check.
* autoconf: fix sqlite configure description message.Eric Leblond2010-09-221-2/+2
| | | | | This patch fixes configure message as pointed out by http://bugzilla.netfilter.org/show_bug.cgi?id=594
* ulogd.conf: fix mysql definition for NFCTEric Leblond2010-09-221-1/+1
| | | | Mysql definition for NFCT usage was not correct.
* Mysql schema: fix procedure declarationEric Leblond2010-09-221-2/+2
| | | | | | It seems that some version of MySQL were more delicate about comment in procedure. THis patch fixes a problem with a procedure comment and fix the inner code which was not using the correct variable.
* Mysql schema: fix delimiterEric Leblond2010-09-221-15/+25
| | | | | | | The use of delimiter was not correct in the MySQL schema. This patch fixes this issue my correctly switching from ";" to "$$" when needed. Based on a patch by Bruno Friedmann <bruno@ioda-net.ch>
* pcap: fix packet length handlingJan Andres2010-09-061-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | Currently, the PCAP output plugin uses ip.totlen to determine both the "len" and "caplen" pcap header fields, as well as the amount of packet data written to the file. There are two issues with this: - For obvious reasons it doesn't work for IPv6. - AFAICT, in case of an incompletely captured packet (--nflog-range) it will attempt to write out the whole packet, not just the part captured. This patch changes the behavior to: - Use raw.pktlen to set the "caplen" field, and the amount of data written. - Determine the "len" (original length) field from ip.totlen or ip6.payload_len if possible, default to the same value as "caplen" otherwise. Signed-off-by: Jan Andres <jandres@gmx.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove obsolete reference to debian/ dir in Makefileulogd-2.0.0beta4Pablo Neira Ayuso2010-07-161-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: bump version to 2.0.0beta4 and update dependenciesPablo Neira Ayuso2010-07-161-2/+2
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* IPFIX: remove plugin until it is usablePablo Neira Ayuso2010-06-171-4/+1
| | | | | | | | | This patch removes the IPFIX from the Makefile. Thus, we keep it in the tree in the hope that we'll have time to finish it in the future but don't compile it. This confuses users since they think that it works. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: copy the conntrack object to the plugin oncePablo Neira Ayuso2010-06-171-1/+8
| | | | | | | With this patch, we copy the conntrack object that we propagate to the output plugin instances *only once*. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* fix wrong list addition in plugin re-use logicPablo Neira Ayuso2010-06-171-1/+1
| | | | | | | | | | This patch fixes a bug that makes ulogd loops forever while propagating inputs to the output plugin. It is reproducible if you re-use three or more plugin instances. The problem is that the parameters in the list addition are in incorrect order. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: fix plugin re-use in different stacksPablo Neira Ayuso2010-06-171-4/+6
| | | | | | | | | | This patch fixes a problem in configurations that use the NFCT plugin as input in several stacks. The first plugin loaded contains the hashtable and other important NFCT private data. Other plugin instances of NFCT are dummies that are only used to store the output keys. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* output: XML: add infix in output filePablo Neira Ayuso2010-06-171-1/+12
| | | | | | | | | | This patch adds an infix to the XML file to avoid problems if we are logging packets and flows at the same time. Thus, we create two different XML files whose filename describes the sort of logging information that it contains. It is also useful when listing files at a quick sight. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* output: XML: support reopening file via SIGHUPPablo Neira Ayuso2010-06-171-27/+63
| | | | | | This feature is useful for log-rotation. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* output: add new plugin XML to output logs in XMLPablo Neira Ayuso2010-06-175-2/+283
| | | | | | | This patch adds XML that allows to log information in XML for ulogd2. It supports packet and flow-based accounting. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* fix incorrect negative EINTR checking in main loopPablo Neira Ayuso2010-06-131-1/+1
| | | | | | | | | This patch fixes the following error that is displayed if we send SIGHUP to reopen the logfile: ulogd.c:904 select says Interrupted system call Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* LOGEMU: fix crash if output file cannot be accessedPablo Neira Ayuso2010-06-031-1/+1
| | | | | | This patch fixes a crash if the output file was not correctly opened. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: use ARRAY_SIZE to calculate the array size of keysPablo Neira Ayuso2010-04-022-2/+2
| | | | | | | This patch is a cleanup to use ARRAY_SIZE in NFLOG and ULOG input plugins. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* IP2BIN: fix missing protocol keyChristophe Fish2010-04-021-0/+5
| | | | | | | | | | | | | | | | | ulogd2 from git won't start using filter IP2BIN. It gives the following error message in the log: <1> ulogd.c:670 traversing plugin `IP2BIN' <1> ulogd.c:627 log4(NFLOG) <1> ulogd.c:733 assigning `oob.family(?)' as source for IP2BIN(oob.family) <7> ulogd.c:727 cannot find key `' in stack <1> ulogd.c:863 destroying stack Filling up ip2bin_inp[] declaration with missing section in filter/ulogd_filter_IP2BIN.c solves the problem: Signed-off-by: Christophe Fish <christophe.fish@free.fr> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: fix reset counters via SIGUSR2 signalPablo Neira Ayuso2010-01-171-3/+52
| | | | | | | This patch fixes a feature that allows to force the logging of the existing entries and reset the counters. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: fix number of options (missing one)Pablo Neira Ayuso2010-01-171-1/+1
| | | | | | | This patch fixes the number of options in NFCT that is actually 8, not 7. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: split event handler if hashtable is used or notPablo Neira Ayuso2010-01-171-28/+39
| | | | | | | | | This patch splits event_handler into two functions: event_handler_hashtable and event_handler_no_hashtable. Thus, we register the appropriate handler during the initialization time. This patch is a cleanup. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: use new hashtable implementation for better performancePablo Neira Ayuso2010-01-173-169/+152
| | | | | | | | This patch replaces the existing hashtable implementation with a newer that provide better performance since it reduces the number of hash computations. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: change `pollinterval' behaviourPablo Neira Ayuso2010-01-172-8/+121
| | | | | | | | | | | | | | | This patch adds support for poll-based logging. Basically, ulogd polls from the kernel periodically to log entries. You can use the `pollinterval' option in the configuration file to set the polling period. This patch changes the current behaviour of `pollinterval' that allowed to mix both the event-driven logging with polling periodically from the kernel. I have tried to look for anyone in google (and asking Eric Leblond) using this feature but I found noone. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: cleanup constructor and destructor functionsPablo Neira Ayuso2010-01-111-41/+67
| | | | | | | | This patch cleans up the destructor and the destructor functions in the NFCT plugin. I know, this patch isn't easy to review because it includes too many changes in one. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Fix wrong definition of views in flat DB schemaPierre Chifflier2009-09-172-12/+12
| | | | | | Create views using the ip_protocol field (and not the oob_family). Signed-off-by: Pierre Chifflier <chifflier@inl.fr>
* Remove debian directoryPierre Chifflier2009-09-1710-86/+0
| | | | | | | Remove Debian packaging files, it is easier to maintain the packaging files outside of the sources. Signed-off-by: Pierre Chifflier <chifflier@inl.fr>
* IPFIX: preliminary fixes, yet unusablePablo Neira Ayuso2009-07-291-9/+5
| | | | | | | | | This patch is a preliminary fix for the yet-unfinished IPFIX support. This patch resolves a couple of bugs that made ulogd crash and a couple of missing symbols that didn't allow to use this plugin in the configuration file. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove -lpthread from MakefilePablo Neira Ayuso2009-07-221-1/+1
| | | | | | | This patch remove -lpthread that was introduced time ago to workaround a problem in gdb. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: avoid spamming report about netlink overrunsPablo Neira Ayuso2009-07-221-1/+9
| | | | | | | This patch reduces the verbosity of the log messages that report netlink overruns. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: add configurable option to set the value of the resynchronization timerPablo Neira Ayuso2009-07-222-8/+16
| | | | | | | | | This patch adds `netlink_resync_timeout' that allows you to set the number of seconds that we wait to perform a resynchronization due to a netlink overrun. This patch changes the default timeout from 2 to 60 seconds (less agressive). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* NFCT: improve netlink overrun handlingPablo Neira Ayuso2009-07-221-12/+12
| | | | | | | | | | With this patch, we schedule one resynchronization against the kernel conntrack table that will occur in two seconds (still we need a patch to make this configurable). Before this, we scheduled a resynchronization for every overrun, that is very bad in a scenario in which overruns occurs very frequently. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>