]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
pknock: disallow running peer_gc too early
authorJan Rafaj <jr+netfilter-devel@cedric.unob.cz>
Tue, 1 Sep 2009 17:52:48 +0000 (19:52 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 4 Oct 2009 19:00:04 +0000 (21:00 +0200)
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.

doc/changelog.txt
extensions/xt_pknock.c

index dc96fa5d238f026057036a46b54e07afaf5f112e..494818ad938073bb08867dcf6b8db400877ede06 100644 (file)
@@ -4,6 +4,8 @@
 - added reworked xt_pknock module
   Changes from pknock v0.5:
   - pknock: "strict" and "checkip" flags were not displayed in `iptables -L`
+  - pknock: the GC expire time's lower bound is now the default gc time
+    (65000 msec) to avoid rendering anti-spoof protection in SPA mode useless
 
 
 Xtables-addons 1.18 (September 09 2009)
index f805925d327088a3871abf8bfd4da87c1635ccf4..97ccec3b37fc028a753d89773b5e911093785948 100644 (file)
@@ -1104,6 +1104,8 @@ static struct xt_match xt_pknock_mt_reg __read_mostly = {
 
 static int __init xt_pknock_mt_init(void)
 {
+       if (gc_expir_time < DEFAULT_GC_EXPIRATION_TIME)
+               gc_expir_time = DEFAULT_GC_EXPIRATION_TIME;
 #ifdef PK_CRYPTO
        if (request_module(crypto.algo) < 0) {
                printk(KERN_ERR PKNOCK "request_module('%s') error.\n",