summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* sync-mode: add abstract layer to make daemon independent of multicastPablo Neira Ayuso2009-03-1216-349/+596
| | | | | | | | | This patch reworks conntrackd to make it independent of the protocol used to propagate state-changes. This patch adds the channel layer abstraction, this layer allows you to add support for different protocols like unicast UDP or TIPC. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* sync-mode: rename mcast_iface structure to interfacePablo Neira Ayuso2009-03-092-14/+14
| | | | | | | | | This patch renames the mcast_iface to interface since this nlif handler is not related with multicast itself, but to monitor the link interface used to propagate state-changes. This patch is a cleanup. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* sync-mode: rename mcast_send_sync() to sync_send()Pablo Neira Ayuso2009-03-091-7/+7
| | | | | | | | This patch is a cleanup. It renames the function mcast_send_sync() to sync_send() since the function itself is not related to multicast anymore (it enqueues state-changes to the upper layer). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: remove debian/ directoryPablo Neira Ayuso2009-03-067-56/+0
| | | | | | | This patch removes the debian directory. According to the debian policy, this directory should not be in source tree. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* extensions: remove use of old libnetfilter API flagsPablo Neira Ayuso2009-03-064-36/+102
| | | | | | | This patch removes the use of the obsolete old libnetfilter protocol flags. This patch also improves error reporting in TCP and UDP. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: fix broken link to ulogd2 in the manualPablo Neira Ayuso2009-02-231-1/+1
| | | | | Reported-by: Ralf <rm@amitrader.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: add m4 directoryJan Engelhardt2009-02-211-0/+2
| | | | | | | | | Since 4dd73e4e34b57685d8a85e041f6a0b4a65200e30, the "m4" directory is missing because git stores no empty directories. Add the appropriate .gitignore file and the problem resolves itself. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: fix compilation issue in gentoo due to missing include limits.hPablo Neira Ayuso2009-02-212-0/+2
| | | | | | | | | This patch adds include limits.h to mcast.c and sync-mode.c. Why Gentoo maintainers did not report me the problem? :( http://bugs.gentoo.org/show_bug.cgi?id=256497 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: bump version to 0.9.11conntrack-tools-0.9.11Pablo Neira Ayuso2009-02-211-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netlink: use u8 getter for TCP statesPablo Neira Ayuso2009-02-211-1/+1
| | | | | | | | This patch replace nfct_get_attr_u32 by nfct_get_attr_u8 which is the correct size of a TCP state. Set also the CLOSE_INIT flag for CLOSE TCP state (as nf_conntrack_proto_tcp allows). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* config: add NetlinkBufferSize and NetlinkBufferSizeMaxGrowthPablo Neira Ayuso2009-02-215-11/+13
| | | | | | | | This patch adds two alias that removes an inconsistency in the configuration file names. Now, the clauses that refers to Netlink starts by the prefix "Netlink". Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* mcast: fix compilation warning due missing headerPablo Neira Ayuso2009-02-211-0/+1
| | | | | | | This patch includes libnfnetlink.h header in mcast.c to remove a compilation warning due to missing prototype declaration. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: revert primary-backup-2.6.29-and-higher.sh scriptPablo Neira Ayuso2009-02-212-111/+0
| | | | | | | | | | This patch reverts primary-backup-2.6.29-and-higher.sh. This script is not safe for production enviroments until the commit phase guarantees that the state-change propagation over netlink is reliable. This script should be ready for 2.6.30 if the appropriate kernel patches go into mainline in time. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: remove obsolete debug() and debug_ct() callsPablo Neira Ayuso2009-02-209-52/+8
| | | | | | | This patch removes debug() and debug_ct(), I haven't use the debugging information that these functions provide in years. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* sync-mode: change current link if message is correctPablo Neira Ayuso2009-02-201-3/+10
| | | | | | | This patch makes conntrackd change the current dedicated link if the message is correct, ie. neither malformed nor out-of-sync. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* network: fix endianess issue in acknowledgment network headerPablo Neira Ayuso2009-02-201-0/+7
| | | | | | | | This patch fixes an endianess issue in the acknowledgment network header. This breaks backward compatibility if different conntrackd versions are used. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* network: fix endianess issue in synchronization network headerPablo Neira Ayuso2009-02-201-0/+7
| | | | | | | | This patch fixes an endianess issue in the synchronization network header. This breaks backward compatibility if different conntrackd versions are used. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* headers: don't use NFCT_DIR_MAX in statistics structurePablo Neira Ayuso2009-02-202-10/+11
| | | | | | | | | This patch removes the use of NFCT_DIR_MAX. This constant is part of the old libnetfilter_conntrack API which has been removed from the git tree. It was introduced in the early days of conntrackd, thus, the use of this constant. Unfortunately, I did not notice until now. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: add bulk update to primary-script.sh scriptPablo Neira Ayuso2009-02-151-0/+11
| | | | | | | | | | | | This patch updates the script to remark the fact that it should be used with Linux kernel < 2.6.29. Moreover, it adds a bulk-update command after the commit in the primary path to avoid any race condition (the backup may request a resync while this primary is still committing the entries with an empty internal cache). This is hackish, but I think that this is the best way to do this for systems running a Linux kernel < 2.6.29. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: add new primary-backup.sh script for >= 2.6.29Pablo Neira Ayuso2009-02-151-0/+109
| | | | | | | | This patch adds a new primary-backup.sh script for Linux kernels >= 2.6.29. This script takes advantage of the user-space event reporting that ctnetlink does since this kernel version. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: unset ACKWindowSize in example configuration filesPablo Neira Ayuso2009-02-151-2/+2
| | | | | | | This patch unset ACKWindowSize since it already sets the clause to its default value. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* conntrackd: don't initialize logging for client requestPablo Neira Ayuso2009-02-151-6/+6
| | | | | | | This patch removes the logging initialization for client requests which is of any use for them. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* conntrackd: display help information with `-h'Pablo Neira Ayuso2009-02-152-1/+11
| | | | | | This patch also adds missing `-v' information to the manpage. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* conntrackd: add `-f internal' and `-f external' optionsPablo Neira Ayuso2009-02-155-4/+36
| | | | | | | | This patch allows flushing the internal and/or the external cache. The `-f' with no extra parameters still works to flush both the internal and the external cache. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* stats-mode: fix polling based loggingPablo Neira Ayuso2009-02-141-0/+1
| | | | | | This patch fixes statistics logging based on polling. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: use resync handler for polling instead of dump handlerPablo Neira Ayuso2009-02-142-33/+34
| | | | | | | | This patch moves the polling logic into the resync handler. The dump handler action depended on the daemon working mode (polling or event-driven) resulting in an inconsistent behaviour. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* cache_iterators: fix wrong printf format in commit-time messagePablo Neira Ayuso2009-02-131-1/+1
| | | | | | | This patch uses the appropriate printf format to display the commit time taken (it was using %llu instead of %lu). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* config: nl_overrun must be signed int instead of unsignedPablo Neira Ayuso2009-02-131-1/+1
| | | | | | | This patch fixes the disabling on NetlinkOverrunResync, which was broken. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add Nice clause to set the nice valuePablo Neira Ayuso2009-02-088-2/+46
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* conntrack: allow use of --state with -DPablo Neira Ayuso2009-02-081-1/+1
| | | | | | | With this patch, you can use -p tcp --state to delete based on the protocol state. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* sync-mode: flush also internal cache after reset PurgeTimeoutPablo Neira Ayuso2009-02-081-0/+1
| | | | | | | | | | Currently, the daemon sends a flush request to the kernel-space. With lots of entries and NetlinkOverrunResync disabled, the daemon remains in an inconsistent state due to an overrun produced by the flush report to userspace. With this patch, the daemon also flush its internal cache after the kernel flush request. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netlink: add new option NetlinkOverrunResyncPablo Neira Ayuso2009-02-087-5/+67
| | | | | | | | This patch adds NetlinkOverrunResync. This option can be used to set the amount of time after which the daemon resynchronizes itself with the kernel state-table if it detects a Netlink overrun. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: re-work polling strategyPablo Neira Ayuso2009-02-064-40/+83
| | | | | | | | This patch improves the polling support included in 0.9.10. The polling now consists of getting the state table, wait for PollSecs, then purge obsolete entries, and so on. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netlink: refactorize several nl_init_*_handler() functionsPablo Neira Ayuso2009-02-053-42/+5
| | | | | | | | | | This patch removes: * nl_init_dump_handler() * nl_init_request_handler() * nl_init_resync_handler() since they all look very similar. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: conntrack-tools >= 0.9.10 requires libnfnetlink >= 0.0.40Pablo Neira Ayuso2009-02-041-1/+1
| | | | | | | This patch fixes a compilation breakage when compiling the conntrack-tools against a libnfnetlink library < 0.0.40. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: replace INCLUDES by AM_CPPFLAGS according to autoreconfPablo Neira Ayuso2009-01-261-1/+1
| | | | | | | This patch replaces INCLUDES by AM_CPPFLAGS according to a suggestion from autoreconf. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: upgrade build systemJan Engelhardt2009-01-263-18/+7
| | | | | | | | | | | | | - add .gitignore files - replace outdated autoconf macros by new constructs, including autogen.sh - and use AC_CONFIG_MACRO_DIR as suggested by libtool2: libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: bump version to 0.9.10conntrack-tools-0.9.10Pablo Neira Ayuso2009-01-251-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: increase hashtable bucket size and limits in example filesPablo Neira Ayuso2009-01-253-15/+27
| | | | | | | This patch details a bit more the hashtable parameters. Moreover, it increases the default size of the hashtable. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: use 'From' instead of 'from' in the example configfilesPablo Neira Ayuso2009-01-253-3/+3
| | | | | | | | This patch fixes a wrong use of 'from' instead of 'From' in the example configuration files. Reported-by: Yoann Juet <yoann.juet@univ-nantes.fr> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: unset CommitTimeout by defaultPablo Neira Ayuso2009-01-253-12/+30
| | | | | | | This patch disables CommitTimeout by default. The daemon now uses the approximate timeout calculation by default. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netlink: set IP_CT_TCP_FLAG_CLOSE_INIT for TIME_WAIT statesPablo Neira Ayuso2009-01-251-0/+13
| | | | | | | | | This patch sets IP_CT_TCP_FLAG_CLOSE_INIT if the entry is in TCP TIME_WAIT state. This patch is a workaround, the daemon should propagate the internal TCP flags to make it fully independent of possible changes in the TCP tracking code. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: increase default PurgeTimeout valuePablo Neira Ayuso2009-01-254-20/+17
| | | | | | | | | This patch increases the default PurgeTimeout value to 60 seconds. The former 15 seconds provides good real-time reaction in terms of user-side expected behaviour, but it is too small if you trigger random failure in a firewall cluster. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add support for approximate timeout calculation during commitPablo Neira Ayuso2009-01-256-8/+27
| | | | | | | | | | During the commit phase, the entries in the external cache entries are inserted in the kernel conntrack table. Currently, we use a fixed timeout that is specified in the config file. With this patch, if you don't specify the fixed timeout value via CommitTimeout, the daemon calculates the real timeout value during the commit phase. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* cache: move lifetime feature to main cache codePablo Neira Ayuso2009-01-259-80/+18
| | | | | | | | The lifetime feature is used by all working modes, it is useful to know how long it has been an entry living in the cache. This patch moves the lifetime feature to the main caching code. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: change behaviour of `-t' optionPablo Neira Ayuso2009-01-254-52/+20
| | | | | | | | | | With this patch, the `-t' option adds an alarm that will flush the cache after CONFIG(purge_timeout) seconds specified in the config file. This looks much cleaner and more performance that looping on the entire conntrack table to set the new timeout of every single entry. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: don't clone when calling nl_*_conntrack functionsPablo Neira Ayuso2009-01-252-25/+9
| | | | | | | | | This patch removes the clone conntrack objects created before calling nl_*_conntrack functions since they are not required anymore (the previous patch guarantees that objects passed as parameter are not modified). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* cache: mangle timeout inside nl_*_conntrack() functionsPablo Neira Ayuso2009-01-254-17/+19
| | | | | | This patch moves the timeout mangling inside nl_*_conntrack(). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* cache: remove nl_exist_conntrack() functionPablo Neira Ayuso2009-01-253-15/+3
| | | | | | | This function is a synonimous of nl_get_conntrack(), use the get function instead. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* cache_iterators: start a clean session if commit finds an entryPablo Neira Ayuso2009-01-252-49/+12
| | | | | | | | The current commit code updates an entry it still exists in the kernel. With this patch, we delete the entry and create a new one to make sure that we start a clean session. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>