]> git.ipfire.org Git - thirdparty/xtables-addons.git/log
thirdparty/xtables-addons.git
15 years agoRAWNAT: make IPv6 optional
Peter Volkov [Fri, 19 Feb 2010 11:06:00 +0000 (14:06 +0300)] 
RAWNAT: make IPv6 optional

In case the kernel is built without IPv6 support the compilation of
this module fails as it assumes IPv6. This patch makes kernel support
conditional on kernel .config.

15 years agoRAWNAT: do not build ip6table_rawpost if IPv6 is not enabled
Jan Engelhardt [Tue, 23 Feb 2010 23:31:48 +0000 (00:31 +0100)] 
RAWNAT: do not build ip6table_rawpost if IPv6 is not enabled

15 years agolength2: guard off IPv6-only functions
Jan Engelhardt [Tue, 23 Feb 2010 23:29:55 +0000 (00:29 +0100)] 
length2: guard off IPv6-only functions

15 years agodoc: a few extra words to pkgconfig overriding
Jan Engelhardt [Thu, 18 Feb 2010 12:00:38 +0000 (13:00 +0100)] 
doc: a few extra words to pkgconfig overriding

15 years agodoc: improve documentation for using non-standard location of libxtables
Jonas Berlin [Thu, 18 Feb 2010 11:43:55 +0000 (13:43 +0200)] 
doc: improve documentation for using non-standard location of libxtables

How to use PKG_CONFIG_PATH. Get rid of remaining references to
recently removed --with-xtables flag.

15 years agodoc: remove unnecessasry --with-xtables option
Jan Engelhardt [Thu, 18 Feb 2010 10:14:46 +0000 (11:14 +0100)] 
doc: remove unnecessasry --with-xtables option

15 years agobuild: remove unnecessasry --with-xtables option
Jan Engelhardt [Tue, 16 Feb 2010 21:16:28 +0000 (22:16 +0100)] 
build: remove unnecessasry --with-xtables option

Jonas Berlin notes that --with-xtables only emitted a -I parameter
and -L was absent.

On second look, we would also be missing -Wl,-rpath, and that would
all be system-dependent. The --with-xtables option is actually not
needed; one can easily specify extra include directories and linker
flags by means of overriding libxtables_CFLAGS and libxtables_LIBS
(even when there are no installed pkgconfig files for libxtables).

15 years agobuild: remove unused kinclude_CFLAGS
Jan Engelhardt [Tue, 16 Feb 2010 21:14:16 +0000 (22:14 +0100)] 
build: remove unused kinclude_CFLAGS

15 years agobuild: remove unused --with-ksource option
Jan Engelhardt [Tue, 16 Feb 2010 20:11:03 +0000 (21:11 +0100)] 
build: remove unused --with-ksource option

15 years agoECHO: update to use skb_dst
Jan Engelhardt [Wed, 3 Feb 2010 18:34:41 +0000 (19:34 +0100)] 
ECHO: update to use skb_dst

15 years agoipset: update to 4.2
Jan Engelhardt [Mon, 25 Jan 2010 10:54:34 +0000 (11:54 +0100)] 
ipset: update to 4.2

15 years agoXtables-addons 1.22 v1.22
Jan Engelhardt [Fri, 22 Jan 2010 19:10:58 +0000 (20:10 +0100)] 
Xtables-addons 1.22

15 years agobuild: fix installation when only modules in subdirs are enabled
Peter Volkov [Mon, 18 Jan 2010 09:08:36 +0000 (12:08 +0300)] 
build: fix installation when only modules in subdirs are enabled

In case only modules that are built in subdirectories of extensions
are enabled (and thus nothing is build in extensions directory itself)
installation fails with the error (only build_ACCOUNT=y in mconfig):

install -pm0755
"/vt/portage/tmp/portage/net-firewall/xtables-addons-1.21/image/
//usr/local/libexec/xtables";
install: missing destination file operand after
"/vt/portage/tmp/portage/net-firewall/xtables-addons-1.21/image/
//usr/local/libexec/xtables"
Try `install --help' for more information.
make[3]: *** [install] Error 1

15 years agodoc: update changelog
Jan Engelhardt [Thu, 31 Dec 2009 15:38:34 +0000 (16:38 +0100)] 
doc: update changelog

15 years agogeoip: use /usr/share/xt_geoip instead of /var/geoip
Jan Engelhardt [Thu, 31 Dec 2009 15:37:42 +0000 (16:37 +0100)] 
geoip: use /usr/share/xt_geoip instead of /var/geoip

15 years agoquota2: add a no-change mode
Michael Farrell [Mon, 28 Dec 2009 15:23:57 +0000 (01:53 +1030)] 
quota2: add a no-change mode

This commit adds an option to xt_quota2 called "no-change". The
effect of this option, when used, is that it will skip incrementing
or decrementing the quota counter, effectively providing a quota test
only.

The reason for implementing this is so that I could have a rule check
if quota is available for a rule in the PREROUTING tables, without
actually decrementing the amount of available quota. I only wanted to
decrement the amount of available quota in the FORWARD rule.
Otherwise, the first packet of every connection would be counted
twice.

15 years agoipset: build ip_set_setlist.ko module
Kevin Locke [Sat, 19 Dec 2009 20:50:47 +0000 (13:50 -0700)] 
ipset: build ip_set_setlist.ko module

Not sure if this was overlooked, or if it is not in a suitable state
for general use, but lets give it a shot and see how it works.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
[j.eng: it was overlooked]

15 years agoRename skb->iif to skb->skb_iif for 2.6.32+
Kevin Locke [Sat, 19 Dec 2009 20:50:46 +0000 (13:50 -0700)] 
Rename skb->iif to skb->skb_iif for 2.6.32+

The rename occurred in v2.6.32-rc7-1555-g8964be4, which will hit
mainline in 2.6.33.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
15 years agoXtables-addons 1.21 v1.21
Jan Engelhardt [Wed, 9 Dec 2009 20:24:12 +0000 (21:24 +0100)] 
Xtables-addons 1.21

15 years agoACCOUNT: avoid collision with arp_tables setsockopt numbers
Jan Engelhardt [Sun, 29 Nov 2009 19:33:21 +0000 (20:33 +0100)] 
ACCOUNT: avoid collision with arp_tables setsockopt numbers

15 years agodoc: add example usage to libxt_TEE.man
Olivier Mehani [Wed, 25 Nov 2009 10:10:12 +0000 (11:10 +0100)] 
doc: add example usage to libxt_TEE.man

15 years agodoc: fix option mismatch --gw/--gateway (2)
Olivier Mehani [Wed, 25 Nov 2009 10:10:12 +0000 (11:10 +0100)] 
doc: fix option mismatch --gw/--gateway (2)

15 years agodoc: fix option mismatch --gw/--gateway in libxt_TEE.man
Jan Engelhardt [Wed, 25 Nov 2009 09:57:23 +0000 (10:57 +0100)] 
doc: fix option mismatch --gw/--gateway in libxt_TEE.man

15 years agoXtables-addons 1.20 v1.20
Jan Engelhardt [Thu, 19 Nov 2009 11:14:26 +0000 (12:14 +0100)] 
Xtables-addons 1.20

15 years agopknock: avoid compiler warnings for !PK_CRYPTO case
Jan Engelhardt [Thu, 19 Nov 2009 11:13:12 +0000 (12:13 +0100)] 
pknock: avoid compiler warnings for !PK_CRYPTO case

xt_pknock.c: In function "update_peer":
xt_pknock.c:890:3: warning: implicit declaration of function "pass_security"
xt_pknock.c: In function "pknock_mt":
xt_pknock.c:1030:5: warning: implicit declaration of function "is_close_knock"

15 years agopknock: reverse control flow for next patch
Jan Engelhardt [Thu, 19 Nov 2009 11:11:46 +0000 (12:11 +0100)] 
pknock: reverse control flow for next patch

15 years agoipset: fast forward to v4.1
Jan Engelhardt [Sun, 15 Nov 2009 15:34:05 +0000 (16:34 +0100)] 
ipset: fast forward to v4.1

15 years agoipset/doc: clarify terms "ip" and "cidrsize"
Jan Engelhardt [Wed, 11 Nov 2009 12:52:04 +0000 (13:52 +0100)] 
ipset/doc: clarify terms "ip" and "cidrsize"

IP refers to Internet Protocol; adding "address" is therefore beneficial.
The CIDR size is better known as "prefix length".

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
15 years agoipset/doc: escape dashes in manpage
Jan Engelhardt [Wed, 11 Nov 2009 12:31:20 +0000 (13:31 +0100)] 
ipset/doc: escape dashes in manpage

(Hyphens remain unescaped.)

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
15 years agoipset/doc: make emphasis markup consistent
Jan Engelhardt [Wed, 11 Nov 2009 10:48:34 +0000 (11:48 +0100)] 
ipset/doc: make emphasis markup consistent

Consistently apply markup so that only replaceable items are italic,
and only items to be typed verbatim are bold. Also apply the command
syntax "BNF" (where and when to use [], {}) that is used in the
iptables manpages to ipset.8.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
15 years agoipset/doc: fix an unbalanced tag
Jan Engelhardt [Wed, 11 Nov 2009 10:29:44 +0000 (11:29 +0100)] 
ipset/doc: fix an unbalanced tag

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
15 years agoipset: fast forward to v4.0
Jan Engelhardt [Wed, 11 Nov 2009 13:23:29 +0000 (14:23 +0100)] 
ipset: fast forward to v4.0

15 years agoipset: do install manpage
Jan Engelhardt [Wed, 11 Nov 2009 13:00:13 +0000 (14:00 +0100)] 
ipset: do install manpage

15 years agoiptaccount: fix a compile warning
Jan Engelhardt [Mon, 9 Nov 2009 15:00:25 +0000 (16:00 +0100)] 
iptaccount: fix a compile warning

iptaccount.c: In function 'addr_to_dotted':
iptaccount.c:42: warning: implicit declaration of function 'htonl'

15 years agobuild: link to libxtables_LIBS
Jan Engelhardt [Sat, 7 Nov 2009 20:04:53 +0000 (21:04 +0100)] 
build: link to libxtables_LIBS

This should make AutoReqProv (or equivalent) do the dependencies
instead of manually having to specify it.

15 years agobuild: consolidate xtables_CFLAGS and libxtables_CFLAGS
Jan Engelhardt [Sat, 7 Nov 2009 20:03:04 +0000 (21:03 +0100)] 
build: consolidate xtables_CFLAGS and libxtables_CFLAGS

There was one variable too much around.

15 years agobuild: offer LDLIBS placeholder
Jan Engelhardt [Sat, 7 Nov 2009 19:50:57 +0000 (20:50 +0100)] 
build: offer LDLIBS placeholder

15 years agoACCOUNT: transfer table data in host order
Jan Engelhardt [Wed, 4 Nov 2009 22:37:34 +0000 (23:37 +0100)] 
ACCOUNT: transfer table data in host order

Make compatibility happy.

15 years agoACCOUNT: remove extra intrapositional negation check
Jan Engelhardt [Tue, 3 Nov 2009 19:31:49 +0000 (20:31 +0100)] 
ACCOUNT: remove extra intrapositional negation check

15 years agobuild: fix --without-kbuild semantics
Natanael Copa [Tue, 3 Nov 2009 13:54:57 +0000 (13:54 +0000)] 
build: fix --without-kbuild semantics

The --without-build option is useful when your distro has multiple
kernels and/or you want to build a common package for userspace stuff
only. Support this option properly.

15 years agoMerge branch 'ACCOUNT'
Jan Engelhardt [Fri, 30 Oct 2009 17:48:34 +0000 (18:48 +0100)] 
Merge branch 'ACCOUNT'

15 years agoACCOUNT: use more precise types and fix minor tidbits
Jan Engelhardt [Fri, 30 Oct 2009 17:48:04 +0000 (18:48 +0100)] 
ACCOUNT: use more precise types and fix minor tidbits

15 years agoACCOUNT: annotate source where BE is used
Jan Engelhardt [Fri, 30 Oct 2009 17:38:54 +0000 (18:38 +0100)] 
ACCOUNT: annotate source where BE is used

15 years agopknock: switch allocations to GFP_KERNEL
Jan Engelhardt [Fri, 16 Oct 2009 14:56:57 +0000 (16:56 +0200)] 
pknock: switch allocations to GFP_KERNEL

All allocations currently using GFP_ATOMIC happen in user context, so
GFP_KERNEL is sufficient.

15 years agoACCOUNT: correctly account for network-order addresses on BE arches
Jan Engelhardt [Fri, 23 Oct 2009 15:37:54 +0000 (17:37 +0200)] 
ACCOUNT: correctly account for network-order addresses on BE arches

15 years agoACCOUNT: move private struct declarations into .c file
Jan Engelhardt [Fri, 23 Oct 2009 16:02:25 +0000 (18:02 +0200)] 
ACCOUNT: move private struct declarations into .c file

15 years agoLOGMARK: remove non-existent options from manpage
Jan Engelhardt [Fri, 23 Oct 2009 23:14:20 +0000 (01:14 +0200)] 
LOGMARK: remove non-existent options from manpage

15 years agoipp2p: lookup optimizations, spello fix
Chris Blum [Thu, 15 Oct 2009 14:27:06 +0000 (16:27 +0200)] 
ipp2p: lookup optimizations, spello fix

15 years agoipp2p: fix Gnutella line ending detection
Chris Blum [Thu, 15 Oct 2009 14:27:06 +0000 (16:27 +0200)] 
ipp2p: fix Gnutella line ending detection

There is another mistake in the code. I have checked the Gnutella
protocol specification -- looks like the line separation is 0x0d-0x0a
and not 0x0a-0x0d (it seemed obvious but I was not sure and thought
they cannot have possibly got that wrong...). It would certainly
explain why I have never seen a match on any of my systems.

15 years agopknock: move manpage into pknock's subdirectory
Jan Engelhardt [Wed, 14 Oct 2009 19:18:08 +0000 (21:18 +0200)] 
pknock: move manpage into pknock's subdirectory

15 years agoipp2p: add more boundary checks
Chris Blum [Wed, 14 Oct 2009 15:58:47 +0000 (17:58 +0200)] 
ipp2p: add more boundary checks

15 years agoipp2p: only pass UDP payload to subfunctions
Chris Blum [Wed, 14 Oct 2009 15:58:47 +0000 (17:58 +0200)] 
ipp2p: only pass UDP payload to subfunctions

15 years agoipp2p: remove redundant local variables
Jan Engelhardt [Wed, 14 Oct 2009 10:14:00 +0000 (12:14 +0200)] 
ipp2p: remove redundant local variables

15 years agobuild: reword warning message for x_tables.h absence
Jan Engelhardt [Wed, 14 Oct 2009 13:19:57 +0000 (15:19 +0200)] 
build: reword warning message for x_tables.h absence

15 years agobuild: check for /usr/include/linux files
Jan Engelhardt [Tue, 13 Oct 2009 09:45:12 +0000 (11:45 +0200)] 
build: check for /usr/include/linux files

15 years agoXtables-addons 1.19 v1.19
Jan Engelhardt [Mon, 12 Oct 2009 16:57:08 +0000 (18:57 +0200)] 
Xtables-addons 1.19

15 years agoMerge branch 'pknock'
Jan Engelhardt [Mon, 12 Oct 2009 16:56:10 +0000 (18:56 +0200)] 
Merge branch 'pknock'

15 years agopknlusr: fix up standard errors in pknlusr
Jan Engelhardt [Mon, 12 Oct 2009 16:53:03 +0000 (18:53 +0200)] 
pknlusr: fix up standard errors in pknlusr

15 years agopknock: fix pknlusr compile warnings
Jan Engelhardt [Mon, 12 Oct 2009 16:52:02 +0000 (18:52 +0200)] 
pknock: fix pknlusr compile warnings

pknlusr.c: In function "main":
pknlusr.c:81:25: warning: cast to pointer from integer of different size
pknlusr.c:81:7: warning: cast to pointer from integer of different size

15 years agopknock: import userspace netlink listener program
Jan Rafaj [Tue, 1 Sep 2009 17:52:48 +0000 (19:52 +0200)] 
pknock: import userspace netlink listener program

15 years agopknock: manpage writing style updates
Jan Engelhardt [Thu, 1 Oct 2009 00:02:52 +0000 (02:02 +0200)] 
pknock: manpage writing style updates

15 years agopknock: add manpage for pknock
Jan Rafaj [Tue, 1 Sep 2009 17:52:48 +0000 (19:52 +0200)] 
pknock: add manpage for pknock

15 years agoMerge branch 'pknock'
Jan Engelhardt [Mon, 12 Oct 2009 16:46:53 +0000 (18:46 +0200)] 
Merge branch 'pknock'

15 years agodoc: pknock changelog
Jan Engelhardt [Mon, 12 Oct 2009 16:40:34 +0000 (18:40 +0200)] 
doc: pknock changelog

15 years agopknock: preserve time/autoclose values for rules added in arbitrary order
Jan Rafaj [Sun, 11 Oct 2009 22:01:35 +0000 (00:01 +0200)] 
pknock: preserve time/autoclose values for rules added in arbitrary order

Handle specific case when someone put a (master) --opensecret
--closesecret rule after a --checkip rule with the same name.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: check interknock time only for !ST_ALLOWED peers
Jan Rafaj [Sun, 11 Oct 2009 22:01:35 +0000 (00:01 +0200)] 
pknock: check interknock time only for !ST_ALLOWED peers

Fixes a bug whereby an ST_ALLOWED peer existing for a time greater
than gc_expir_time would be gc-deleted, because both
!has_logged_during_this_minute(peer) and
is_interknock_time_exceeded(peer, rule->max_time) would be satisfied
for ST_ALLOWED hosts.

We also no longer test for !has_logged_during_this_minute(peer) in
peer_gc(), since there is really no need for this: the anti-spoof
minute check is performed (and subsequent remove_peer(peer) called if
needed) for each passing UDP-mode peer with expired autoclose in
pknock_mt(), given that --autoclose has been specified. If autoclose
has not been set, it will be subject to reset_knock_status(peer)
called from knock_mt() upon receiving the first closing secret - so it
is still guaranteed to disappear at the closest opportunity.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: change comments and debug statements to give more appropriate help
Jan Rafaj [Sun, 11 Oct 2009 22:01:34 +0000 (00:01 +0200)] 
pknock: change comments and debug statements to give more appropriate help

Renames:
update_rule_timer() -> update_gc_rule_timer()
is_time_exceeded()  -> is_interknock_time_exceeded()

Changed some debug messages and comments to give more appropriate meanings.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: shrink struct peer
Jan Engelhardt [Mon, 12 Oct 2009 15:01:10 +0000 (17:01 +0200)] 
pknock: shrink struct peer

15 years agopknock: display only pknock mode and state relevant information in procfs
Jan Rafaj [Sun, 11 Oct 2009 22:01:33 +0000 (00:01 +0200)] 
pknock: display only pknock mode and state relevant information in procfs

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: Make non-zero time mandatory for TCP mode
Jan Rafaj [Sun, 11 Oct 2009 22:01:32 +0000 (00:01 +0200)] 
pknock: Make non-zero time mandatory for TCP mode

This avoids DDoS on the first-in-sequence TCP knockport, which would
otherwise fill up the peer table permanently - especially if the user
does not specify --autoclose - and would thus cause permanent pknock
DoS.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: remove some #ifdef PK_CRYPTO guards
Jan Engelhardt [Sun, 11 Oct 2009 23:21:26 +0000 (01:21 +0200)] 
pknock: remove some #ifdef PK_CRYPTO guards

A number of guarded places do not use any crypto functions. So the
userspace does not pass in an info with --opensecret/--closesecret
defined.

15 years agopknock: implement automatic closing
Jan Rafaj [Sun, 11 Oct 2009 22:01:31 +0000 (00:01 +0200)] 
pknock: implement automatic closing

Added the optional "--autoclose" parameter (takes minutes) that
closes the pknock-opened rule in a specified time.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: provide better help text for --time option
Jan Rafaj [Sun, 11 Oct 2009 22:01:30 +0000 (00:01 +0200)] 
pknock: provide better help text for --time option

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: remove redundant final check for any-option
Jan Engelhardt [Sun, 11 Oct 2009 22:56:55 +0000 (00:56 +0200)] 
pknock: remove redundant final check for any-option

Just below the check that was just removed, the presence of --name is
tested for, as --name is always required. That makes the (flags == 0)
check superfluous, because non-zeroness is ensured by the name check.

15 years agopknock: purge void --secure option from help text
Jan Rafaj [Sun, 11 Oct 2009 22:01:30 +0000 (00:01 +0200)] 
pknock: purge void --secure option from help text

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: use C99 initializers for pknock_mt_opts
Jan Engelhardt [Sun, 11 Oct 2009 22:50:55 +0000 (00:50 +0200)] 
pknock: use C99 initializers for pknock_mt_opts

15 years agopknock: remove redundant --chkip parameter
Jan Engelhardt [Sun, 11 Oct 2009 22:48:37 +0000 (00:48 +0200)] 
pknock: remove redundant --chkip parameter

Similar to commit v1.18-56-g35b00f8, one option for one thing
really is enough.

15 years agopknock: use kernel's get_seconds() directly instead of wrapper
Jan Rafaj [Sun, 11 Oct 2009 22:01:29 +0000 (00:01 +0200)] 
pknock: use kernel's get_seconds() directly instead of wrapper

Use kernel's get_seconds() directly instead of the
get_epoch_minute() wrapper.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: replace id_port_knocked with accepted_knock_count
Jan Rafaj [Sun, 11 Oct 2009 22:01:28 +0000 (00:01 +0200)] 
pknock: replace id_port_knocked with accepted_knock_count

Gives a better sense of the member's use.

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
15 years agopknock: avoid fillup of peer table during DDoS
Jan Rafaj [Sat, 10 Oct 2009 22:05:17 +0000 (00:05 +0200)] 
pknock: avoid fillup of peer table during DDoS

In TCP --strict mode, forget the peer which sent the wrong knock in a
sequence, rather than resetting its status to ST_INIT. This avoids
filling up the peer table (which would lead to pknock DoS) in case of
a DDoS attack performed by a set of port-scanning malicious hosts.

15 years agopknock: add CONNECTOR guards
Jan Engelhardt [Fri, 9 Oct 2009 16:15:27 +0000 (18:15 +0200)] 
pknock: add CONNECTOR guards

15 years agopknock: add Kconfig file
Jan Engelhardt [Fri, 9 Oct 2009 16:11:49 +0000 (18:11 +0200)] 
pknock: add Kconfig file

15 years agopknock: move into separate directory
Jan Engelhardt [Fri, 9 Oct 2009 15:50:05 +0000 (17:50 +0200)] 
pknock: move into separate directory

There will be a number of pknock-related tools, e.g. the trigger
programs, so move that out to its own directory.

15 years agoipp2p: try to address underflows
Jan Engelhardt [Thu, 8 Oct 2009 15:26:36 +0000 (17:26 +0200)] 
ipp2p: try to address underflows

Report by: Christian Blum <chrblum@users.sourceforge.net>

"I have found that they panic in an interrupt within xt_ipp2p, function
search_all_gnu(). It's a bounds checking problem; when I add this [a
check for plen >= 65535] at the beginning [of the function] the
servers run fine (very similar to find_all_kazaa())."

15 years agopknock: peer can never be NULL in the hash iterator
Jan Engelhardt [Wed, 7 Oct 2009 21:59:41 +0000 (23:59 +0200)] 
pknock: peer can never be NULL in the hash iterator

Given that pos is non-NULL, list_entry won't make it NULL.

15 years agopknock: reduce indent in remove_rule
Jan Engelhardt [Wed, 7 Oct 2009 21:59:05 +0000 (23:59 +0200)] 
pknock: reduce indent in remove_rule

15 years agopknock: avoid crash on memory allocation failure and fix memleak
Jan Engelhardt [Tue, 6 Oct 2009 22:59:37 +0000 (00:59 +0200)] 
pknock: avoid crash on memory allocation failure and fix memleak

If rule->peer_head==NULL due to an unsuccessful allocation, peer_gc
(and perhaps other places) may crash when they try to access it.
Since I see no deferred retry for allocation, the only option is to
fail in add_rule, clean it up, and return false instead.
Independent of that problem, it also needs to free peer_head in case
the status_proc allocation fails.

15 years agopknock: add_rule must happen after info struct checks
Jan Engelhardt [Tue, 6 Oct 2009 22:40:19 +0000 (00:40 +0200)] 
pknock: add_rule must happen after info struct checks

This avoids unnecessarily creating pknock rules if there is an error
with any of the match parameters.

15 years agopknock: remove old-style intraposition negation support
Jan Engelhardt [Tue, 6 Oct 2009 22:17:38 +0000 (00:17 +0200)] 
pknock: remove old-style intraposition negation support

15 years agodoc: update changelog
Jan Engelhardt [Tue, 6 Oct 2009 22:10:45 +0000 (00:10 +0200)] 
doc: update changelog

Sometimes I forget to adjust it with the particular commit and then
this piles up a little..

15 years agodoc: remove --with-ksource from help text
Jan Engelhardt [Tue, 6 Oct 2009 22:07:24 +0000 (00:07 +0200)] 
doc: remove --with-ksource from help text

--with-ksource should almost never be needed, so do not visibily
offer it.

15 years agobuild: support for Linux 2.6.32
Jan Engelhardt [Tue, 6 Oct 2009 22:02:56 +0000 (00:02 +0200)] 
build: support for Linux 2.6.32

15 years agoACCOUNT: move Kconfig file
Jan Engelhardt [Tue, 6 Oct 2009 21:56:38 +0000 (23:56 +0200)] 
ACCOUNT: move Kconfig file

15 years agoACCOUNT: mark reg structure __read_mostly
Jan Engelhardt [Tue, 6 Oct 2009 21:42:48 +0000 (23:42 +0200)] 
ACCOUNT: mark reg structure __read_mostly

15 years agopknock: disallow running peer_gc too early
Jan Rafaj [Tue, 1 Sep 2009 17:52:48 +0000 (19:52 +0200)] 
pknock: disallow running peer_gc too early

It is no longer possible to specify gc_expir_time with a time lower
than its default value (65000 msecs). This is to avoid running
peer_gc() earlier than 1 minute [well, 65 s actually] in the future,
which would otherwise render anti-spoof protection in SPA mode
non-functional.

15 years agopknock: add module parameter descriptions
Jan Rafaj [Tue, 1 Sep 2009 17:52:48 +0000 (19:52 +0200)] 
pknock: add module parameter descriptions

15 years agopknock: remove some extraneous messages and source lines
Jan Engelhardt [Sat, 3 Oct 2009 22:08:34 +0000 (00:08 +0200)] 
pknock: remove some extraneous messages and source lines

- $Id$ in a comment is pointless.
- remove unneeded/commented-out includes.
- remove warning messages on allocation failure
  (if that happens it is almost too late anyway;
  not wanting to spam the logs)
- remove warning messages about unhandled packets
  (attacker filling up logs)

15 years agopknock: use NIPQUAD_FMT
Jan Engelhardt [Sat, 3 Oct 2009 21:27:33 +0000 (23:27 +0200)] 
pknock: use NIPQUAD_FMT

15 years agopknock: mark peer address as __be32
Jan Engelhardt [Sat, 3 Oct 2009 21:21:54 +0000 (23:21 +0200)] 
pknock: mark peer address as __be32

Since the address is now stored in its original network byte order,
let's annotate that this is indeed the case.

15 years agopknock: store peer address in network byte order
Jan Rafaj [Tue, 1 Sep 2009 17:52:48 +0000 (19:52 +0200)] 
pknock: store peer address in network byte order

The conversions from and to host order can be saved, as nothing
really depends on them.