xt_quota2: print "!" at the correct position during iptables-save

This commit is contained in:
Денис Устименко
2013-05-30 23:37:58 +10:00
committed by Jan Engelhardt
parent d48a5fe0f4
commit 6a60b5ab75
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ HEAD
Fixes:
- xt_RAWNAT: ensure correct operation in the presence of IPv4 options
- xt_geoip: do not throw a warnings when country database is size 0
- xt_quota2: print "!" at the correct position during iptables-save
v2.2 (2013-03-31)

View File

@@ -98,8 +98,6 @@ quota_mt2_save(const void *ip, const struct xt_entry_match *match)
{
const struct xt_quota_mtinfo2 *q = (void *)match->data;
if (q->flags & XT_QUOTA_INVERT)
printf(" !");
if (q->flags & XT_QUOTA_GROW)
printf(" --grow ");
if (q->flags & XT_QUOTA_NO_CHANGE)
@@ -108,6 +106,8 @@ quota_mt2_save(const void *ip, const struct xt_entry_match *match)
printf(" --packets ");
if (*q->name != '\0')
printf(" --name %s ", q->name);
if (q->flags & XT_QUOTA_INVERT)
printf(" !");
printf(" --quota %llu ", (unsigned long long)q->quota);
}