diff -Nru --exclude *.o --exclude *flags --exclude tags linuxppc-190102-nfpom/net/ipv4/netfilter/ip_conntrack_standalone.c linuxppc-190102-esp/net/ipv4/netfilter/ip_conntrack_standalone.c
--- linuxppc-190102-nfpom/net/ipv4/netfilter/ip_conntrack_standalone.c	Thu Jan 17 21:43:41 2002
+++ linuxppc-190102-esp/net/ipv4/netfilter/ip_conntrack_standalone.c	Mon Jan 21 21:41:43 2002
@@ -15,6 +15,7 @@
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
 #include <linux/version.h>
+#include <linux/brlock.h>
 #include <net/checksum.h>
 
 #define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_conntrack_lock)
@@ -304,12 +305,33 @@
 	return ret;
 }
 
-/* FIXME: Implement this --RR */
-#if 0
+/* used by ip_ct_selective_cleanup */
+static int kill_by_protocol(const struct ip_conntrack *i, void *data)
+{
+	u_int8_t *protonum = (u_int8_t *) data;
+
+	if (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum == *protonum)
+		return 1;
+
+	return 0;
+}
+
 void ip_conntrack_protocol_unregister(struct ip_conntrack_protocol *proto)
 {
+	/* Need write lock herre to delete helper */
+	WRITE_LOCK(&ip_conntrack_lock);
+	LIST_DELETE(&protocol_list, proto);
+	WRITE_UNLOCK(&ip_conntrack_lock);
+
+	/* Someone could still be running inside the proto helper */
+	br_write_lock_bh(BR_NETPROTO_LOCK);
+	br_write_unlock_bh(BR_NETPROTO_LOCK);
+
+	/* delete all conntrack entries for this protocol */
+	ip_ct_selective_cleanup(kill_by_protocol, &proto->proto);
+
+	MOD_DEC_USE_COUNT;
 }
-#endif
 
 static int __init init(void)
 {
@@ -325,6 +347,7 @@
 module_exit(fini);
 
 EXPORT_SYMBOL(ip_conntrack_protocol_register);
+EXPORT_SYMBOL(ip_conntrack_protocol_unregister);
 EXPORT_SYMBOL(invert_tuplepr);
 EXPORT_SYMBOL(ip_conntrack_alter_reply);
 EXPORT_SYMBOL(ip_conntrack_destroyed);

