From: Martin Josefsson <gandalf@wlug.westbo.se>
To: Netfilter-devel <netfilter-devel@lists.samba.org>
Subject: [PATCH] rename death_by_timeout to ip_ct_death_by_timeout (1/4)
Date: 06 Jun 2002 14:24:03 +0200 [thread overview]
Message-ID: <1023365301.734.15.camel@tux> (raw)
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
Hi,
I changed the timer-update code in ip_ct_refresh() and then I found out
that the pptp helper abuses it to kill a conntrack which won't work with
my changes, the solution: change the pptp helper to do it correctly.
This first patch renames death_by_timeout to ip_ct_death_by_timeout and
exports it in the core conntrack files. The pptp change will be included
in the next patch.
--
/Martin
Never argue with an idiot. They drag you down to their level, then beat
you with experience.
[-- Attachment #2: ip_conntrack-death-diff --]
[-- Type: text/plain, Size: 2366 bytes --]
--- linux-2.4.19-pre9/include/linux/netfilter_ipv4/ip_conntrack.h.orig Mon Jun 3 21:46:59 2002
+++ linux-2.4.19-pre9/include/linux/netfilter_ipv4/ip_conntrack.h Mon Jun 3 21:46:37 2002
@@ -226,6 +226,9 @@
extern void ip_ct_refresh(struct ip_conntrack *ct,
unsigned long extra_jiffies);
+/* Kill conntrack */
+extern void ip_ct_death_by_timeout(unsigned long ul_conntrack);
+
/* These are for NAT. Icky. */
/* Call me when a conntrack is destroyed. */
extern void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack);
--- linux-2.4.19-pre9/net/ipv4/netfilter/ip_conntrack_core.c.orig Mon Jun 3 20:32:28 2002
+++ linux-2.4.19-pre9/net/ipv4/netfilter/ip_conntrack_core.c Tue Jun 4 20:56:18 2002
@@ -267,7 +267,7 @@
atomic_dec(&ip_conntrack_count);
}
-static void death_by_timeout(unsigned long ul_conntrack)
+void ip_ct_death_by_timeout(unsigned long ul_conntrack)
{
struct ip_conntrack *ct = (void *)ul_conntrack;
@@ -527,7 +527,7 @@
return dropped;
if (del_timer(&h->ctrack->timeout)) {
- death_by_timeout((unsigned long)h->ctrack);
+ ip_ct_death_by_timeout((unsigned long)h->ctrack);
dropped = 1;
}
ip_conntrack_put(h->ctrack);
@@ -617,7 +617,7 @@
/* Don't set timer yet: wait for confirmation */
init_timer(&conntrack->timeout);
conntrack->timeout.data = (unsigned long)conntrack;
- conntrack->timeout.function = death_by_timeout;
+ conntrack->timeout.function = ip_ct_death_by_timeout;
INIT_LIST_HEAD(&conntrack->sibling_list);
@@ -1198,7 +1189,7 @@
while ((h = get_next_corpse(kill, data)) != NULL) {
/* Time to push up daises... */
if (del_timer(&h->ctrack->timeout))
- death_by_timeout((unsigned long)h->ctrack);
+ ip_ct_death_by_timeout((unsigned long)h->ctrack);
/* ... else the timer will get him soon. */
ip_conntrack_put(h->ctrack);
--- linux-2.4.19-pre9/net/ipv4/netfilter/ip_conntrack_standalone.c.orig Mon Jun 3 21:43:04 2002
+++ linux-2.4.19-pre9/net/ipv4/netfilter/ip_conntrack_standalone.c Mon Jun 3 21:47:43 2002
@@ -362,6 +362,7 @@
EXPORT_SYMBOL(ip_conntrack_helper_unregister);
EXPORT_SYMBOL(ip_ct_selective_cleanup);
EXPORT_SYMBOL(ip_ct_refresh);
+EXPORT_SYMBOL(ip_ct_death_by_timeout);
EXPORT_SYMBOL(ip_ct_find_proto);
EXPORT_SYMBOL(ip_ct_find_helper);
EXPORT_SYMBOL(ip_conntrack_expect_related);
reply other threads:[~2002-06-06 12:24 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=1023365301.734.15.camel@tux \
--to=gandalf@wlug.westbo.se \
--cc=netfilter-devel@lists.samba.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.