]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libxt_quota.c: Support option negation
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 2 Jul 2010 07:57:09 +0000 (09:57 +0200)
committerPatrick McHardy <kaber@trash.net>
Fri, 2 Jul 2010 07:57:09 +0000 (09:57 +0200)
The xt_quota_info flags should be set properly for the --quota option negation
support.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
extensions/libxt_quota.c

index 69d2746072b28c3cfab708a4094a94dc9433371b..bdfc92a829d3d2f6472b037532d54c2f095cf078 100644 (file)
@@ -65,6 +65,10 @@ quota_parse(int c, char **argv, int invert, unsigned int *flags,
                if (!parse_quota(optarg, &info->quota))
                        xtables_error(PARAMETER_PROBLEM,
                                   "bad quota: '%s'", optarg);
+
+               if (invert)
+                       info->flags |= XT_QUOTA_INVERT;
+
                break;
 
        default: