]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_hashlimit: always print burst value
authorJan Engelhardt <jengelh@medozas.de>
Thu, 24 Jun 2010 19:13:47 +0000 (21:13 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 24 Jun 2010 19:13:47 +0000 (21:13 +0200)
iptables -L lists the burst value, and so should iptables -S. I was
certainly surprised to see it gone even when explicitly specifying
--hashlimit-burst 5 on the command line.

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

index a8fe588f429c0f59548159d27e3e01c93a822a6f..7442dfcf77e8b85adac1e087b341a761b1a9c5c4 100644 (file)
@@ -591,8 +591,7 @@ static void hashlimit_save(const void *ip, const struct xt_entry_match *match)
        const struct xt_hashlimit_info *r = (const void *)match->data;
 
        fputs("--hashlimit ", stdout); print_rate(r->cfg.avg);
-       if (r->cfg.burst != XT_HASHLIMIT_BURST)
-               printf("--hashlimit-burst %u ", r->cfg.burst);
+       printf("--hashlimit-burst %u ", r->cfg.burst);
 
        fputs("--hashlimit-mode ", stdout);
        print_mode(r->cfg.mode, ',');
@@ -617,8 +616,7 @@ hashlimit_mt_save(const struct xt_hashlimit_mtinfo1 *info, unsigned int dmask)
        else
                fputs("--hashlimit-upto ", stdout);
        print_rate(info->cfg.avg);
-       if (info->cfg.burst != XT_HASHLIMIT_BURST)
-               printf("--hashlimit-burst %u ", info->cfg.burst);
+       printf("--hashlimit-burst %u ", info->cfg.burst);
 
        if (info->cfg.mode & (XT_HASHLIMIT_HASH_SIP | XT_HASHLIMIT_HASH_SPT |
            XT_HASHLIMIT_HASH_DIP | XT_HASHLIMIT_HASH_DPT)) {