[netfilter-cvslog] r4091 - trunk/patch-o-matic-ng/patchlets/pptp-conntrack-nat/linux-2.6.11/net/ipv4/netfilter

laforge at netfilter.org laforge at netfilter.org
Sun Jul 3 23:29:52 CEST 2005


Author: laforge at netfilter.org
Date: 2005-07-03 23:29:51 +0200 (Sun, 03 Jul 2005)
New Revision: 4091

Modified:
   trunk/patch-o-matic-ng/patchlets/pptp-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c
Log:
the keymaps are now stored in the _slave_, not the master. fixes delayed oops after pptp session has terminated


Modified: trunk/patch-o-matic-ng/patchlets/pptp-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c
===================================================================
--- trunk/patch-o-matic-ng/patchlets/pptp-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c	2005-07-03 18:09:45 UTC (rev 4090)
+++ trunk/patch-o-matic-ng/patchlets/pptp-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c	2005-07-03 21:29:51 UTC (rev 4091)
@@ -142,7 +142,7 @@
 /* destroy the keymap entries associated with specified master ct */
 void ip_ct_gre_keymap_destroy(struct ip_conntrack *ct)
 {
-	DEBUGP("entering for exp %p\n", exp);
+	DEBUGP("entering for ct %p\n", ct);
 	WRITE_LOCK(&ip_ct_gre_lock);
 	if (ct->proto.gre.keymap_orig) {
 		DEBUGP("removing %p from list\n", ct->proto.gre.keymap_orig);
@@ -271,6 +271,9 @@
 	ct->proto.gre.stream_timeout = GRE_STREAM_TIMEOUT;
 	ct->proto.gre.timeout = GRE_TIMEOUT;
 
+	ct->proto.gre.keymap_orig = NULL;
+	ct->proto.gre.keymap_reply = NULL;
+
 	return 1;
 }
 
@@ -278,16 +281,9 @@
  * and is about to be deleted from memory */
 static void gre_destroy(struct ip_conntrack *ct)
 {
-	struct ip_conntrack *master = ct->master;
-
 	DEBUGP(" entering\n");
 
-	if (!master) {
-		DEBUGP("no master conntrack for gre-ct %p\n", ct);
-		return;
-	}
-
-	ip_ct_gre_keymap_destroy(master);
+	ip_ct_gre_keymap_destroy(ct);
 }
 
 /* protocol helper struct */




More information about the netfilter-cvslog mailing list