PATCH - Fix for --random option in DNAT and REDIRECT
The --random option produces "Unknown arg `--random'" errors with both the DNAT and REDIRECT targets. Corrected by the attached patch.
-Tom
Signature · 4 lines
Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ [email protected] PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key
libipt_DNAT.c renamed from iptables-1.3.8.standard/extensions/libipt_DNAT.c +1 -0
@@ -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~
libipt_REDIRECT.c renamed from iptables-1.3.8.standard/extensions/libipt_REDIRECT.c +1 -1
@@ -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~
Quoted 2 lines · Tom Eastep
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.