All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] psd option parsing
@ 2004-09-17 23:49 Phil Oester
  2004-09-18 17:46 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2004-09-17 23:49 UTC (permalink / raw)
  To: netfilter-devel

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

psd match is too greedy with options, and doesn't play well with
other matches.  For example:

	# iptables -A INPUT -m psd -m recent --set -j DROP
	iptables v1.2.11: missing optarg
	Try `iptables -h' or 'iptables --help' for more information.

Below patch makes it less greedy.

This fixes bugzilla #18

Phil



[-- Attachment #2: patch-psd --]
[-- Type: text/plain, Size: 507 bytes --]

diff -ru ipt-orig/extensions/libipt_psd.c ipt-new/extensions/libipt_psd.c
--- ipt-orig/extensions/libipt_psd.c	2003-07-14 16:01:29.000000000 -0400
+++ ipt-new/extensions/libipt_psd.c	2004-09-17 19:44:33.900825504 -0400
@@ -84,11 +84,6 @@
 	struct ipt_psd_info *psdinfo = (struct ipt_psd_info *)(*match)->data;
 	unsigned int num;
 	
-	if (!optarg)
-		exit_error(PARAMETER_PROBLEM, "missing optarg");
-
-	/* string_to_number needs a leading space */
-
 	switch (c) {
 	/* PSD-weight-threshold */
 	case '1':

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

* Re: [PATCH] psd option parsing
  2004-09-17 23:49 [PATCH] psd option parsing Phil Oester
@ 2004-09-18 17:46 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2004-09-18 17:46 UTC (permalink / raw)
  To: Phil Oester; +Cc: netfilter-devel

Phil Oester wrote:

>psd match is too greedy with options, and doesn't play well with
>other matches.  For example:
>
>	# iptables -A INPUT -m psd -m recent --set -j DROP
>	iptables v1.2.11: missing optarg
>	Try `iptables -h' or 'iptables --help' for more information.
>
>Below patch makes it less greedy.
>
>This fixes bugzilla #18
>  
>
Applied, thanks.

>Phil
>

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

end of thread, other threads:[~2004-09-18 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-17 23:49 [PATCH] psd option parsing Phil Oester
2004-09-18 17:46 ` 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.