]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libebt_limit: print 'minute' and 'seconds', not 'min' and 'secs'
authorFlorian Westphal <fw@strlen.de>
Fri, 13 Apr 2018 15:46:27 +0000 (17:46 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 13 Apr 2018 18:09:00 +0000 (20:09 +0200)
nft xlate needs the full name, for ebtables it makes no difference,
'minute' would work too.

Also fixup ' ' placement in xlate.

Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libebt_limit.c

index 75c066bf694c5ce30c242851c1fd9ca653a295b5..e8da2a150e6e1a2dfa3f40de67228e244a4a69f5 100644 (file)
@@ -133,8 +133,8 @@ static struct rates g_rates[] =
 {
        { "day",        EBT_LIMIT_SCALE*24*60*60 },
        { "hour",       EBT_LIMIT_SCALE*60*60 },
-       { "min",        EBT_LIMIT_SCALE*60 },
-       { "sec",        EBT_LIMIT_SCALE }
+       { "minute",     EBT_LIMIT_SCALE*60 },
+       { "second",     EBT_LIMIT_SCALE }
 };
 
 static void print_rate(uint32_t period)
@@ -179,7 +179,7 @@ static int brlimit_xlate(struct xt_xlate *xl,
        xt_xlate_add(xl, "limit rate ");
        print_rate_xlate(xl, r->avg);
        if (r->burst != 0)
-               xt_xlate_add(xl, " burst %u packets", r->burst);
+               xt_xlate_add(xl, "burst %u packets ", r->burst);
 
        return 1;
 }