]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_hashlimit: default htable-expire must be in milliseconds
authorJan Engelhardt <jengelh@medozas.de>
Sun, 21 Aug 2011 07:46:12 +0000 (09:46 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 21 Aug 2011 07:52:02 +0000 (09:52 +0200)
Bug goes back to v1.4.12~3^2~11.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libxt_hashlimit.c

index a838680cba12dc4e47068f68578c80357cd4e6e9..89320bb3d412b838f621b625307cc024deb2437f 100644 (file)
@@ -315,7 +315,7 @@ static void hashlimit_check(struct xt_fcheck_call *cb)
                xtables_error(PARAMETER_PROBLEM,
                                "You have to specify --hashlimit");
        if (!(cb->xflags & F_HTABLE_EXPIRE))
-               info->cfg.expire = udata->mult;
+               info->cfg.expire = udata->mult * 1000; /* from s to msec */
 }
 
 static void hashlimit_mt_check(struct xt_fcheck_call *cb)
@@ -327,7 +327,7 @@ static void hashlimit_mt_check(struct xt_fcheck_call *cb)
                xtables_error(PARAMETER_PROBLEM,
                                "You have to specify --hashlimit");
        if (!(cb->xflags & F_HTABLE_EXPIRE))
-               info->cfg.expire = udata->mult;
+               info->cfg.expire = udata->mult * 1000; /* from s to msec */
 }
 
 static const struct rates