From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH 2.4 5/8]: Fix cleanup in ipt_recent
Date: Fri, 04 Mar 2005 13:18:50 +0100 [thread overview]
Message-ID: <4228522A.3000307@trash.net> (raw)
[-- Attachment #1: 05.diff --]
[-- Type: text/x-patch, Size: 1426 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/04 00:48:18+01:00 kaber@coreworks.de
# [NETFILTER]: Fix cleanup in ipt_recent
#
# Backport from 2.6, original patch from Rusty:
#
# When ipt_register_match() fails, ipt_recent doesn't remove its proc
# entry. Found by nfsim.
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv4/netfilter/ipt_recent.c
# 2005/03/04 00:48:16+01:00 kaber@coreworks.de +5 -2
# [NETFILTER]: Fix cleanup in ipt_recent
#
# Backport from 2.6, original patch from Rusty:
#
# When ipt_register_match() fails, ipt_recent doesn't remove its proc
# entry. Found by nfsim.
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
--- a/net/ipv4/netfilter/ipt_recent.c 2005-03-04 01:52:05 +01:00
+++ b/net/ipv4/netfilter/ipt_recent.c 2005-03-04 01:52:05 +01:00
@@ -962,7 +962,7 @@
/* Kernel module initialization. */
static int __init init(void)
{
- int count;
+ int err, count;
printk(version);
#ifdef CONFIG_PROC_FS
@@ -986,7 +986,10 @@
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. */
reply other threads:[~2005-03-04 12:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4228522A.3000307@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.