diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2005-01-03 04:19:17 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-03 04:19:17 -0800 |
commit | 287b78629ccb330003d86fd9867870201b52df90 (patch) | |
tree | fa231f8e17a8f4f479b6c0dd1d1e5cbc9d670f27 /net | |
parent | be4bae19aa83f168e65e25e7b08f19a4cecb9884 (diff) | |
download | history-287b78629ccb330003d86fd9867870201b52df90.tar.gz |
[PATCH] netfilter: Fix cleanup in ipt_recent should ipt_registrater_match error
When ipt_registrater_match() fails, ipt_recent doesn't remove its proc
entry. Found by nfsim.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ipt_recent.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index 212447815c66a8..7bb5b4294a2480 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c @@ -959,7 +959,7 @@ static struct ipt_match recent_match = { /* Kernel module initialization. */ static int __init init(void) { - int count; + int err, count; printk(version); #ifdef CONFIG_PROC_FS @@ -983,7 +983,10 @@ static int __init init(void) 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; } /* Kernel module destruction. */ |