All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv6 limit match does not support invert
@ 2004-09-20 23:57 Phil Oester
  2004-09-21 10:49 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2004-09-20 23:57 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

Should have included this in earlier ipv4 version, but here is the
ipv6 version which clarifies that invert is not supported by limit.

Phil



[-- Attachment #2: patch-ipv6limit --]
[-- Type: text/plain, Size: 1075 bytes --]

diff -ru ipt-orig/extensions/libip6t_limit.c ipt-new/extensions/libip6t_limit.c
--- ipt-orig/extensions/libip6t_limit.c	2004-06-14 15:02:16.000000000 -0700
+++ ipt-new/extensions/libip6t_limit.c	2004-09-20 16:55:14.752980888 -0700
@@ -104,19 +104,14 @@
 
 	switch(c) {
 	case '%':
-		if (check_inverse(optarg, &invert, NULL, 0))
-			exit_error(PARAMETER_PROBLEM,
-				   "Unexpected `!' after --limit");
+		if (check_inverse(argv[optind-1], &invert, &optind, 0)) break;
 		if (!parse_rate(optarg, &r->avg))
 			exit_error(PARAMETER_PROBLEM,
 				   "bad rate `%s'", optarg);
 		break;
 
 	case '$':
-		if (check_inverse(optarg, &invert, NULL, 0))
-			exit_error(PARAMETER_PROBLEM,
-				   "Unexpected `!' after --limit-burst");
-
+		if (check_inverse(argv[optind-1], &invert, &optind, 0)) break;
 		if (string_to_number(optarg, 0, 10000, &num) == -1)
 			exit_error(PARAMETER_PROBLEM,
 				   "bad --limit-burst `%s'", optarg);
@@ -127,6 +122,10 @@
 		return 0;
 	}
 
+	if (invert)
+		exit_error(PARAMETER_PROBLEM,
+			   "limit does not support invert");
+
 	return 1;
 }
 

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

end of thread, other threads:[~2004-09-21 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 23:57 [PATCH] ipv6 limit match does not support invert Phil Oester
2004-09-21 10:49 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.