mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 11:34:57 +02:00
extensions: make print (iptables -L) output the same as save (-S)
This commit is contained in:
@@ -114,23 +114,8 @@ quota_mt2_save(const void *ip, const struct xt_entry_match *match)
|
||||
static void quota_mt2_print(const void *ip, const struct xt_entry_match *match,
|
||||
int numeric)
|
||||
{
|
||||
const struct xt_quota_mtinfo2 *q = (const void *)match->data;
|
||||
|
||||
if (q->flags & XT_QUOTA_INVERT)
|
||||
printf(" !");
|
||||
if (q->flags & XT_QUOTA_GROW)
|
||||
printf(" counter");
|
||||
else
|
||||
printf(" quota");
|
||||
if (*q->name != '\0')
|
||||
printf(" %s:", q->name);
|
||||
printf(" %llu ", (unsigned long long)q->quota);
|
||||
if (q->flags & XT_QUOTA_PACKET)
|
||||
printf("packets ");
|
||||
else
|
||||
printf("bytes ");
|
||||
if (q->flags & XT_QUOTA_NO_CHANGE)
|
||||
printf("(no-change mode) ");
|
||||
printf(" -m quota");
|
||||
quota_mt2_save(ip, match);
|
||||
}
|
||||
|
||||
static struct xtables_match quota_mt2_reg = {
|
||||
|
Reference in New Issue
Block a user