netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH - Fix for --random option in DNAT and REDIRECT
@ 2007-11-14 21:09 Tom Eastep
  2007-11-15 12:59 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Eastep @ 2007-11-14 21:09 UTC (permalink / raw)
  To: Netfilter Development


[-- Attachment #1.1: Type: text/plain, Size: 364 bytes --]

The --random option produces "Unknown arg `--random'" errors with both the
DNAT and REDIRECT targets. Corrected by the attached patch.

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ teastep@shorewall.net
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: random-patch.diff --]
[-- Type: text/x-diff; name="random-patch.diff", Size: 894 bytes --]

diff -au ../iptables-1.3.8.standard/extensions/libipt_DNAT.c extensions/libipt_DNAT.c
--- ../iptables-1.3.8.standard/extensions/libipt_DNAT.c	2007-06-24 16:26:35.000000000 -0700
+++ extensions/libipt_DNAT.c	2007-11-14 12:56:40.000000000 -0800
@@ -180,6 +180,7 @@
 			*flags |= IPT_DNAT_OPT_RANDOM;
 		} else
 			*flags |= IPT_DNAT_OPT_RANDOM;
+		return 1;
 	default:
 		return 0;
 	}
Only in extensions/: libipt_DNAT.c~
diff -au ../iptables-1.3.8.standard/extensions/libipt_REDIRECT.c extensions/libipt_REDIRECT.c
--- ../iptables-1.3.8.standard/extensions/libipt_REDIRECT.c	2007-06-24 16:26:35.000000000 -0700
+++ extensions/libipt_REDIRECT.c	2007-11-14 12:56:20.000000000 -0800
@@ -24,7 +24,7 @@
 
 static struct option opts[] = {
 	{ "to-ports", 1, 0, '1' },
-	{ "random", 1, 0, '2' },
+	{ "random", 0, 0, '2' },
 	{ 0 }
 };
 
Only in extensions/: libipt_REDIRECT.c~

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: PATCH - Fix for --random option in DNAT and REDIRECT
  2007-11-14 21:09 PATCH - Fix for --random option in DNAT and REDIRECT Tom Eastep
@ 2007-11-15 12:59 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2007-11-15 12:59 UTC (permalink / raw)
  To: Tom Eastep; +Cc: Netfilter Development

Tom Eastep wrote:
> The --random option produces "Unknown arg `--random'" errors with both the
> DNAT and REDIRECT targets. Corrected by the attached patch.

The REDIRECT part didn't apply cleanly because of changes in the
tree. Please always base your patches on the latest version.

Anyway, I've fixed it up and applied it, thanks Tom.

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

end of thread, other threads:[~2007-11-15 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 21:09 PATCH - Fix for --random option in DNAT and REDIRECT Tom Eastep
2007-11-15 12:59 ` 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).