[netfilter-cvslog] r4128 -
trunk/patch-o-matic-ng/patchlets/conntrack-event-api
laforge at netfilter.org
laforge at netfilter.org
Tue Jul 19 00:44:08 CEST 2005
Author: laforge at netfilter.org
Date: 2005-07-19 00:44:01 +0200 (Tue, 19 Jul 2005)
New Revision: 4128
Modified:
trunk/patch-o-matic-ng/patchlets/conntrack-event-api/linux-2.6.13.patch
Log:
sync with git-tree
- move cleanup to right position
- increase version number of ip_conntrack
Modified: trunk/patch-o-matic-ng/patchlets/conntrack-event-api/linux-2.6.13.patch
===================================================================
--- trunk/patch-o-matic-ng/patchlets/conntrack-event-api/linux-2.6.13.patch 2005-07-18 19:13:28 UTC (rev 4127)
+++ trunk/patch-o-matic-ng/patchlets/conntrack-event-api/linux-2.6.13.patch 2005-07-18 22:44:01 UTC (rev 4128)
@@ -1,3 +1,25 @@
+introduce connection tracking event notifiers
+
+Signed-off-by: Harald Welte <laforge at netfilter.org>
+
+---
+commit 037147d732c3763c82c2179365f87da934b90729
+tree 7d9d3acc6bfe624a1959cd68a14268b28545e2ca
+parent 1f5cbf4ee4c3bccb8dceee55ad1917b53f1386bb
+author laforge <laforge at netfilter.org> Mo, 18 Jul 2005 20:22:15 -0400
+committer laforge <laforge at netfilter.org> Mo, 18 Jul 2005 20:22:15 -0400
+
+ include/linux/netfilter_ipv4/ip_conntrack.h | 144 ++++++++++++++++++++++
+ include/linux/netfilter_ipv4/ip_conntrack_core.h | 17 ++-
+ net/ipv4/netfilter/ip_conntrack_core.c | 122 ++++++++++++++++++-
+ net/ipv4/netfilter/ip_conntrack_ftp.c | 12 +-
+ net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 1
+ net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 2
+ net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 4 +
+ net/ipv4/netfilter/ip_conntrack_proto_udp.c | 3
+ net/ipv4/netfilter/ip_conntrack_standalone.c | 10 ++
+ 10 files changed, 311 insertions(+), 14 deletions(-)
+
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -206,6 +228,15 @@
/* ip_conntrack_lock protects the main hash table, protocol/helper/expected
registrations, conntrack timers*/
+@@ -49,7 +50,7 @@
+ #include <linux/netfilter_ipv4/ip_conntrack_core.h>
+ #include <linux/netfilter_ipv4/listhelp.h>
+
+-#define IP_CONNTRACK_VERSION "2.1"
++#define IP_CONNTRACK_VERSION "2.2"
+
+ #if 0
+ #define DEBUGP printk
@@ -76,6 +77,81 @@ unsigned int ip_ct_log_invalid;
static LIST_HEAD(unconfirmed);
static int ip_conntrack_vmalloc;
@@ -322,6 +353,15 @@
return NF_ACCEPT;
}
+@@ -609,7 +698,7 @@ unsigned int ip_conntrack_in(unsigned in
+ struct ip_conntrack *ct;
+ enum ip_conntrack_info ctinfo;
+ struct ip_conntrack_protocol *proto;
+- int set_reply;
++ int set_reply = 0;
+ int ret;
+
+ /* Previously seen (loopback or untracked)? Ignore. */
@@ -668,6 +757,8 @@ unsigned int ip_conntrack_in(unsigned in
IP_NF_ASSERT((*pskb)->nfct);
@@ -370,6 +410,30 @@
}
ct_add_counters(ct, ctinfo, skb);
write_unlock_bh(&ip_conntrack_lock);
+@@ -1011,6 +1106,23 @@ ip_ct_iterate_cleanup(int (*iter)(struct
+
+ ip_conntrack_put(ct);
+ }
++
++#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
++ {
++ /* we need to deliver all cached events in order to drop
++ * the reference counts */
++ int cpu;
++ for_each_cpu(cpu) {
++ struct ip_conntrack_ecache *ecache =
++ &per_cpu(ip_conntrack_ecache, cpu);
++ if (ecache->ct) {
++ __ip_ct_deliver_cached_events(ecache);
++ ip_conntrack_put(ecache->ct);
++ ecache->ct = NULL;
++ }
++ }
++ }
++#endif
+ }
+
+ /* Fast function for those who don't want to parse /proc (and I don't
diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c
@@ -477,27 +541,7 @@
ret = ct->helper->help(pskb, ct, ctinfo);
if (ret != NF_ACCEPT)
return ret;
-@@ -886,9 +888,27 @@ static int init_or_cleanup(int init)
- }
- #endif
-
-+#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
-+ {
-+ /* we need to deliver all cached events in order to drop
-+ * the reference counts */
-+ int cpu;
-+ for_each_cpu(cpu) {
-+ struct ip_conntrack_ecache *ecache =
-+ &per_cpu(ip_conntrack_ecache, cpu);
-+ if (ecache->ct) {
-+ __ip_ct_deliver_cached_events(ecache);
-+ ip_conntrack_put(ecache->ct);
-+ ecache->ct = NULL;
-+ }
-+ }
-+ }
-+#endif
-+
+@@ -889,6 +891,7 @@ static int init_or_cleanup(int init)
return ret;
cleanup:
@@ -505,7 +549,7 @@
#ifdef CONFIG_SYSCTL
unregister_sysctl_table(ip_ct_sysctl_header);
cleanup_localinops:
-@@ -971,6 +991,13 @@ void need_ip_conntrack(void)
+@@ -971,6 +974,13 @@ void need_ip_conntrack(void)
{
}
More information about the netfilter-cvslog
mailing list