]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_quota2: print "!" at the correct position during iptables-save
authorДенис Устименко <den@uzsci.net>
Thu, 30 May 2013 13:37:58 +0000 (23:37 +1000)
committerJan Engelhardt <jengelh@inai.de>
Thu, 30 May 2013 15:04:47 +0000 (17:04 +0200)
doc/changelog.txt
extensions/libxt_quota2.c

index 56e03af66baed080fbd05721e46872de0889e4b4..46aba4fb2e7ecc70c615b4bc89ae61661125d8b2 100644 (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)
index a3c4643e01fd36e16d9033ac1812a43d76a3e036..20c9581fc64f6f10a526336a3ef5aad2714d1fa1 100644 (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);
 }