From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 1/2] libxt_hashlimit: always print burst value
Date: Fri, 25 Jun 2010 14:45:40 +0200 [thread overview]
Message-ID: <1277469942-26270-2-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1277469942-26270-1-git-send-email-jengelh@medozas.de>
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 | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c
index a8fe588..7442dfc 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)) {
--
1.7.1
next prev parent reply other threads:[~2010-06-25 12:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 12:45 iptables: hashlimit & conntrack misc Jan Engelhardt
2010-06-25 12:45 ` Jan Engelhardt [this message]
2010-06-25 12:49 ` [PATCH 1/2] libxt_hashlimit: always print burst value Patrick McHardy
2010-06-25 12:45 ` [PATCH 2/2] libxt_conntrack: do print netmask Jan Engelhardt
2010-06-25 12:50 ` iptables: hashlimit & conntrack misc Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1277469942-26270-2-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).