Skip to contentSkip to conversation

extensions: libxt_quota.c: Support option negation

PATCH Applied Samuel Ortiz 3 participants 3 messages Jul 1, 2010 – Jul 2, 2010 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 extensions: libxt_quota.c: Support option negation

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

---
 extensions/libxt_quota.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
extensions/libxt_quota.c +4 -0
index 69d2746..bdfc92a 100644
@@ -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:
Signature · 5 lines
1.7.1

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · ext Samuel Ortiz

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

---

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 :)

Signature · 2 lines
Cheers,
Luca.