PATCH - Fix for --random option in DNAT and REDIRECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key
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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux