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

* Re: [PATCH] extensions: libxt_quota.c: Support option negation
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2010-07-01 11:10 UTC (permalink / raw)
  To: ext Samuel Ortiz; +Cc: netfilter-devel@vger.kernel.org

On Thu, 2010-07-01 at 11:35 +0200, ext Samuel Ortiz wrote:
> The xt_quota_info flags should be set properly for the --quota option negation
> support.
> 
> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
> ---

Nice catch! I was trying this yesterday after our discussion and
couldn't get it to work.  Didn't have the time to investigate the
problem, good that you did :)

Tested-by: Luciano Coelho <luciano.coelho@nokia.com>


-- 
Cheers,
Luca.


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

* Re: [PATCH] extensions: libxt_quota.c: Support option negation
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2010-07-02  7:57 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: netfilter-devel

Samuel Ortiz wrote:
> The xt_quota_info flags should be set properly for the --quota option negation
> support.


Applied, thanks.

^ permalink raw reply	[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).