1 Jan 2005 05:57
[PATCH] netfilter: Fix cleanup in ipt_recent should ipt_registrater_match error
Rusty Russell <rusty <at> rustcorp.com.au>
2005-01-01 04:57:27 GMT
2005-01-01 04:57:27 GMT
Name: Fix cleanup in ipt_recent should ipt_registrater_match error
Status: Tested under nfsim
Signed-off-by: Rusty Russell <rusty <at> rustcorp.com.au>
When ipt_registrater_match() fails, ipt_recent doesn't remove its proc
entry. Found by nfsim.
Index: linux-2.6.10-bk1-Netfilter/net/ipv4/netfilter/ipt_recent.c
===================================================================
--- linux-2.6.10-bk1-Netfilter.orig/net/ipv4/netfilter/ipt_recent.c 2005-01-01
12:07:56.364981672 +1100
+++ linux-2.6.10-bk1-Netfilter/net/ipv4/netfilter/ipt_recent.c 2005-01-01 12:11:44.159351664 +1100
<at> <at> -959,7 +959,7 <at> <at>
/* Kernel module initialization. */
static int __init init(void)
{
- int count;
+ int err, count;
printk(version);
#ifdef CONFIG_PROC_FS
<at> <at> -983,7 +983,10 <at> <at>
if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: %d\n",ip_list_hash_size);
#endif
- return ipt_register_match(&recent_match);
+ err = ipt_register_match(&recent_match);
+ if (err)
+ remove_proc_entry("ipt_recent", proc_net);
+ return err;
(Continue reading)
Time to dig out the initial tests
> from the old cvs and convert them to nfsim with new cases added.
:) We need more testcases badly, for all sorts of things.
RSS Feed