netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extensions: libxt_quota.c: Support option negation
@ 2010-07-01  9:35 Samuel Ortiz
  2010-07-01 11:10 ` Luciano Coelho
  2010-07-02  7:57 ` Patrick McHardy
  0 siblings, 2 replies; 3+ messages in thread
From: Samuel Ortiz @ 2010-07-01  9:35 UTC (permalink / raw)
  To: netfilter-devel

The xt_quota_info flags should be set properly for the --quota option negation
support.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
---
 extensions/libxt_quota.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c
index 69d2746..bdfc92a 100644
--- a/extensions/libxt_quota.c
+++ b/extensions/libxt_quota.c
@@ -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:
-- 
1.7.1

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-02  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01  9:35 [PATCH] extensions: libxt_quota.c: Support option negation Samuel Ortiz
2010-07-01 11:10 ` Luciano Coelho
2010-07-02  7:57 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).