From dd2bbe0b614ad60fb2e267863471836aae424425 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 24 Jun 2010 21:13:47 +0200 Subject: libxt_hashlimit: always print burst value 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 --- extensions/libxt_hashlimit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'extensions') diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c index a8fe588f..7442dfcf 100644 --- a/extensions/libxt_hashlimit.c +++ b/extensions/libxt_hashlimit.c @@ -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)) { -- cgit v1.2.3