diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2010-07-15 18:09:54 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-07-15 18:09:54 +0200 |
commit | b4fa7222923bc10476b8753f358e871f461eb2db (patch) | |
tree | 8552759321a0124d4cec38ea800787d28b4eef76 /extensions/libxt_rateest.c | |
parent | ce06c99ee107102a7168493b55970b53380ebbb6 (diff) |
extensions: libxt_rateest: fix bps options for iptables-save
The output generated by the libxt_rateest extension for bps matches
was wrong and could not be restored properly. This patch fixes this
problem by using the correct options in the right order when saving
the table.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'extensions/libxt_rateest.c')
-rw-r--r-- | extensions/libxt_rateest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c index 62100f4b..ad0884e7 100644 --- a/extensions/libxt_rateest.c +++ b/extensions/libxt_rateest.c @@ -419,9 +419,11 @@ rateest_save(const void *ip, const struct xt_entry_match *match) } else { printf("--rateest %s ", info->name1); if (info->flags & XT_RATEEST_MATCH_BPS) { - printf("--rateest-bps "); - rateest_print_mode(info, "--rateest-"); + printf("--rateest-bps1 "); + rateest_print_rate(info->bps1, 0); + printf("--rateest-bps2 "); rateest_print_rate(info->bps2, 0); + rateest_print_mode(info, "--rateest-"); } if (info->flags & XT_RATEEST_MATCH_PPS) { printf("--rateest-pps "); |