bug report/fix for 'proc-no-internal-targets' patch
Hello Patrick,
I would like to report a trivial bug in the proc-no-internal-targets patch in patch-o-matic-ng which I recently downloaded from CVS.
I was able to fix it myself.
I am working with kernel-2.6.6-rc3-mm2 + patch-o-matic from CVS. I believe the 2.4.XX kernel has the same problem.
ipv4/netfilter/ip_tables.c.orig renamed from ipv4/netfilter/ip_tables.c +0 -0
@@ -1756,7 +1756,7 @@ off_t start_offset, char *buffer, int
length,
off_t *pos, unsigned int *count)
{
- if (t == &ipt_standard_target || t == &ipt_error_target)
+ if (t != &ipt_standard_target && t != &ipt_error_target)
return 0;
return print_name((char *)t, start_offset, buffer, length, pos, count);
}
with proc-no-internal-targets applied, but without the above diff
robbie@rjd:~> cat /proc/net/ip_tables_targets
ERROR
robbie@rjd:~>
with proc-no-internal-targets applied, plus the one line fix above
robbie@rjd:~> cat /proc/net/ip_tables_targets
TCPMSS
TOS
MARK
LOG
REJECT
DNAT
SNAT
robbie@rjd:~>
Hope that helps.
ipv4/netfilter/ip_tables.c.orig 2004-05-07 10:29:33.812943895
Quoted 2 lines · Robbie Dinn
ipv4/netfilter/ip_tables.c.orig 2004-05-07 10:29:33.812943895 renamed from ipv4/netfilter/ip_tables.c 2004-05-07 10:40:28.230993459 +0100 +0
-0
Damn, I got the patch reversed!
Quoted 6 lines · Robbie Dinn
Hello Patrick,
I would like to report a trivial bug in the proc-no-internal-targets patch in patch-o-matic-ng which I recently downloaded from CVS.
I was able to fix it myself.
Thanks Robbie, patch applied.
Regards
Patrick
Quoted 4 lines
I am working with kernel-2.6.6-rc3-mm2 + patch-o-matic from CVS. I believe the 2.4.XX kernel has the same problem.