diff options
author | Nikolai Malykh <nmalykh@bilim.com> | 2005-02-07 18:38:49 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2005-02-07 18:38:49 +0000 |
commit | e6ebb1cf6ddf49cff467131f42a15fa40aaade0b (patch) | |
tree | 5d63ca8f41c4c8b098005c8e1f0c7fb8f2151d6a /extensions | |
parent | e37c0dc100c51541accf81e4763d0cdba807db34 (diff) |
fix parameter handling in libipt_hashlimit with iptables-save (Nikolai Malykh)
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/libipt_hashlimit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extensions/libipt_hashlimit.c b/extensions/libipt_hashlimit.c index f59b6672..3ed8c586 100644 --- a/extensions/libipt_hashlimit.c +++ b/extensions/libipt_hashlimit.c @@ -7,6 +7,8 @@ * Based on ipt_limit.c by * Jérôme de Vivie <devivie@info.enserb.u-bordeaux.fr> * Hervé Eychenne <rv@wallfire.org> + * + * Error corections by nmalykh@bilim.com (22.01.2005) */ #include <stdio.h> @@ -294,7 +296,7 @@ static void print_mode(const struct ipt_hashlimit_info *r, char separator) fputs("dstip", stdout); prevmode = 1; } - if (r->cfg.mode & IPT_HASHLIMIT_HASH_SPT) { + if (r->cfg.mode & IPT_HASHLIMIT_HASH_DPT) { if (prevmode) putchar(separator); fputs("dstport", stdout); @@ -334,8 +336,10 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) if (r->cfg.burst != IPT_HASHLIMIT_BURST) printf("--hashlimit-burst %u ", r->cfg.burst); - fputs("--mode ", stdout); + fputs("--hashlimit-mode ", stdout); print_mode(r, ','); + + printf("--hashlimit-name %s ", r->name); if (r->cfg.size) printf("--hashlimit-htable-size %u ", r->cfg.size); |