diff -urN patch-o-matic.orig/NEWPATCHES patch-o-matic/NEWPATCHES
--- patch-o-matic.orig/NEWPATCHES	Wed Apr 18 07:09:09 2001
+++ patch-o-matic/NEWPATCHES	Tue Jul 10 11:54:05 2001
@@ -41,6 +41,19 @@
    You can have more than one of these files, to make multiple entries
    in different places, by calling successive ones foo.patch.makefile*.
 
+5) If you want to edit ip{6}_conntrack.h in include/linux/netfilter_ipv{4|6},
+   eliminate that from the patch above, and create a file called
+   `foo.patch.ip{6}_conntrack.h'. The format of this file is as follows:
+
+	EXACT LINE TO MATCH
+	<text to paste in>
+
+   There are already well defined "entry points" in these header files.
+
+   You can have more than one of these files, to make multiple entries
+   in different places, by calling successive ones 
+   foo.patch.ip{6}_conntrack.h*.
+
 Finally, if you want to have a libipt_foo built, add it to the
 Makefile.  If you only want it built when the patch is applied, add a
 test for your extension in the iptables userspace distribution, called
diff -urN patch-o-matic.orig/ip_conntrack.h.patch patch-o-matic/ip_conntrack.h.patch
--- patch-o-matic.orig/ip_conntrack.h.patch	Thu Jan  1 01:00:00 1970
+++ patch-o-matic/ip_conntrack.h.patch	Tue Jul 10 12:10:53 2001
@@ -0,0 +1,25 @@
+--- linux/include/linux/netfilter_ipv4/ip_conntrack.h.orig	Tue Jul 10 12:06:00 2001
++++ linux/include/linux/netfilter_ipv4/ip_conntrack.h	Tue Jul 10 12:10:00 2001
+@@ -82,6 +82,7 @@
+ #endif
+ 
+ #include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
++/* Protocol helper include files from p-o-m: */
+ 
+ struct ip_conntrack
+ {
+@@ -121,6 +122,7 @@
+ 
+ 	union {
+ 		struct ip_ct_ftp ct_ftp_info;
++		/* Protocol helper conntrack info structures from p-o-m: */
+ 	} help;
+ 
+ #ifdef CONFIG_IP_NF_NAT_NEEDED
+@@ -183,5 +185,6 @@
+ }
+ 
+ extern unsigned int ip_conntrack_htable_size;
++/* Anything else from p-o-m patches: */
+ #endif /* __KERNEL__ */
+ #endif /* _IP_CONNTRACK_H */
diff -urN patch-o-matic.orig/ip_conntrack.h.patch.help patch-o-matic/ip_conntrack.h.patch.help
--- patch-o-matic.orig/ip_conntrack.h.patch.help	Thu Jan  1 01:00:00 1970
+++ patch-o-matic/ip_conntrack.h.patch.help	Tue Jul 10 12:17:39 2001
@@ -0,0 +1,5 @@
+Author: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
+Status: Alpha :-)
+
+The patch adds "hooks" to ip_conntrack.h in order to support
+multiple protocol helper patches in p-o-m.
diff -urN patch-o-matic.orig/irc-conntrack-nat.patch patch-o-matic/irc-conntrack-nat.patch
--- patch-o-matic.orig/irc-conntrack-nat.patch	Thu May 31 12:46:25 2001
+++ patch-o-matic/irc-conntrack-nat.patch	Tue Jul 10 12:00:18 2001
@@ -1,25 +1,3 @@
-diff -Nru --exclude *.rej 2.4.4-pre6-dropped/include/linux/netfilter_ipv4/ip_conntrack.h 2.4.4-pre6-irc/include/linux/netfilter_ipv4/ip_conntrack.h
---- 2.4.4-pre6-dropped/include/linux/netfilter_ipv4/ip_conntrack.h	Fri Apr 27 01:50:12 2001
-+++ 2.4.4-pre6-irc/include/linux/netfilter_ipv4/ip_conntrack.h	Fri Apr 27 02:00:05 2001
-@@ -86,6 +86,10 @@
- 
- #include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
- 
-+#if defined(CONFIG_IP_NF_IRC) || defined(CONFIG_IP_NF_IRC_MODULE)
-+#include <linux/netfilter_ipv4/ip_conntrack_irc.h>
-+#endif
-+
- struct ip_conntrack
- {
- 	/* Usage count in here is 1 for destruct timer, 1 per skb,
-@@ -123,6 +127,7 @@
- 
- 	union {
- 		struct ip_ct_ftp ct_ftp_info;
-+		struct ip_ct_irc ct_irc_info;
- 	} help;
- 
- #ifdef CONFIG_IP_NF_NAT_NEEDED
 diff -Nru --exclude *.rej 2.4.4-pre6-dropped/include/linux/netfilter_ipv4/ip_conntrack_irc.h 2.4.4-pre6-irc/include/linux/netfilter_ipv4/ip_conntrack_irc.h
 --- 2.4.4-pre6-dropped/include/linux/netfilter_ipv4/ip_conntrack_irc.h	Wed Dec 31 21:00:00 1969
 +++ 2.4.4-pre6-irc/include/linux/netfilter_ipv4/ip_conntrack_irc.h	Fri Apr 27 01:59:35 2001
diff -urN patch-o-matic.orig/irc-conntrack-nat.patch.ip_conntrack.h patch-o-matic/irc-conntrack-nat.patch.ip_conntrack.h
--- patch-o-matic.orig/irc-conntrack-nat.patch.ip_conntrack.h	Thu Jan  1 01:00:00 1970
+++ patch-o-matic/irc-conntrack-nat.patch.ip_conntrack.h	Tue Jul 10 12:02:44 2001
@@ -0,0 +1,5 @@
+/* Protocol helper include files from p-o-m: */
+#if defined(CONFIG_IP_NF_IRC) || defined(CONFIG_IP_NF_IRC_MODULE)
+#include <linux/netfilter_ipv4/ip_conntrack_irc.h>
+#endif
+
diff -urN patch-o-matic.orig/irc-conntrack-nat.patch.ip_conntrack.h-2 patch-o-matic/irc-conntrack-nat.patch.ip_conntrack.h-2
--- patch-o-matic.orig/irc-conntrack-nat.patch.ip_conntrack.h-2	Thu Jan  1 01:00:00 1970
+++ patch-o-matic/irc-conntrack-nat.patch.ip_conntrack.h-2	Tue Jul 10 12:03:25 2001
@@ -0,0 +1,5 @@
+		/* Protocol helper conntrack info structures from p-o-m: */
+#if defined(CONFIG_IP_NF_IRC) || defined(CONFIG_IP_NF_IRC_MODULE)
+		struct ip_ct_irc ct_irc_info;
+#endif
+
diff -urN patch-o-matic.orig/runme patch-o-matic/runme
--- patch-o-matic.orig/runme	Mon Apr 30 23:56:30 2001
+++ patch-o-matic/runme	Tue Jul 10 11:48:33 2001
@@ -133,6 +133,32 @@
     return 0
 }
 
+# Args: ip{6}_conntrack.h "patch" file, netfilter_ipv{4|6} include dir,
+#       ip{6}_conntrack.h filename.
+apply_conntrack_h_change()
+{
+    PRIOR="`head -1 $1`"
+    END="`tail +2 $1 | head -1`"
+    LINE=`fgrep -x -n "$PRIOR" $2/$3 | cut -d: -f1`
+    if [ -z "$LINE" ] || [ "$LINE" -eq 0 ]
+    then
+	echo Could not find place to slot in $3 entry >&2
+	return 1
+    fi
+    
+    rm -f $2/${3}.tmp
+    if (head -$LINE $2/$3 && tail +2 $1 && tail +`expr $LINE + 1` $2/$3) > $2/${3}.tmp
+    then
+	mv $2/${3}.tmp $2/$3
+    else
+	echo Could not slot in $3 entry >&2
+	rm -f $2/${3}.tmp
+	return 1
+    fi
+    echo "   Placed new $3 entry $1"
+    return 0
+}
+
 # Don't like to use GLOBIGNORE stuff; can't use shopt (bash v1).
 expand_no_backups()
 {
@@ -183,6 +209,29 @@
 	return $ret
 }
 
+apply_conntrack_h_changes()
+{
+	ret=0
+	case $2 in
+		*ipv4)
+			conntrack_h=ip_conntrack.h
+			;;
+		*ipv6)
+			conntrack_h=ip6_conntrack.h
+			;;
+		*)
+			return $ret
+			;;
+	esac
+
+	for x in `expand_no_backups "$1.${conntrack_h}*"`
+	do
+	    apply_conntrack_h_change $x $2 $conntrack_h || ret=1
+	done
+
+	return $ret
+}
+
 # I'm paranoid.  Test patch first.
 # Args: patch filename, protocol.
 test_patch()
@@ -202,7 +251,8 @@
 
     if apply_config_in_changes $1 $KTMPDIR/net/$2/netfilter &&
 	apply_config_help_changes $1 $KTMPDIR/Documentation &&
-	apply_makefile_changes $1 $KTMPDIR/net/$2/netfilter
+	apply_makefile_changes $1 $KTMPDIR/net/$2/netfilter &&
+	apply_conntrack_h_changes $1 $KTMPDIR/include/linux/netfilter_$2
     then :
     else
 	rm -rf $KTMPDIR
@@ -254,6 +304,7 @@
     apply_config_in_changes $1 $KERNEL_DIR/net/$2/netfilter/
     apply_config_help_changes $1 $KERNEL_DIR/Documentation/
     apply_makefile_changes $1 $KERNEL_DIR/net/$2/netfilter/
+    apply_conntrack_h_changes $1 $KERNEL_DIR/include/linux/netfilter_$2
 }
 
 APPLIED=""
diff -urN patch-o-matic.orig/talk-conntrack-nat.patch patch-o-matic/talk-conntrack-nat.patch
--- patch-o-matic.orig/talk-conntrack-nat.patch	Thu May 31 12:46:25 2001
+++ patch-o-matic/talk-conntrack-nat.patch	Tue Jul 10 12:03:39 2001
@@ -1,27 +1,3 @@
-diff -urN linux-2.4.4/include/linux/netfilter_ipv4.orig/ip_conntrack.h linux-2.4.4/include/linux/netfilter_ipv4/ip_conntrack.h
---- linux-2.4.4/include/linux/netfilter_ipv4.orig/ip_conntrack.h	Tue May  8 17:09:22 2001
-+++ linux-2.4.4/include/linux/netfilter_ipv4/ip_conntrack.h	Tue May  8 22:30:13 2001
-@@ -83,6 +83,10 @@
- 
- #include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
- 
-+#if defined(CONFIG_IP_NF_TALK) || defined(CONFIG_IP_NF_TALK_MODULE)
-+#include <linux/netfilter_ipv4/ip_conntrack_talk.h>
-+#endif
-+
- struct ip_conntrack
- {
- 	/* Usage count in here is 1 for hash table/destruct timer, 1 per skb,
-@@ -121,6 +125,9 @@
- 
- 	union {
- 		struct ip_ct_ftp ct_ftp_info;
-+#if defined(CONFIG_IP_NF_TALK) || defined(CONFIG_IP_NF_TALK_MODULE)
-+		struct ip_ct_talk ct_talk_info;
-+#endif
- 	} help;
- 
- #ifdef CONFIG_IP_NF_NAT_NEEDED
 diff -urN linux-2.4.4/include/linux/netfilter_ipv4.orig/ip_conntrack_talk.h linux-2.4.4/include/linux/netfilter_ipv4/ip_conntrack_talk.h
 --- linux-2.4.4/include/linux/netfilter_ipv4.orig/ip_conntrack_talk.h	Thu Jan  1 01:00:00 1970
 +++ linux-2.4.4/include/linux/netfilter_ipv4/ip_conntrack_talk.h	Tue May  8 22:14:12 2001
diff -urN patch-o-matic.orig/talk-conntrack-nat.patch.ip_conntrack.h patch-o-matic/talk-conntrack-nat.patch.ip_conntrack.h
--- patch-o-matic.orig/talk-conntrack-nat.patch.ip_conntrack.h	Thu Jan  1 01:00:00 1970
+++ patch-o-matic/talk-conntrack-nat.patch.ip_conntrack.h	Tue Jul 10 12:02:47 2001
@@ -0,0 +1,5 @@
+/* Protocol helper include files from p-o-m: */
+#if defined(CONFIG_IP_NF_TALK) || defined(CONFIG_IP_NF_TALK_MODULE)
+#include <linux/netfilter_ipv4/ip_conntrack_talk.h>
+#endif
+
diff -urN patch-o-matic.orig/talk-conntrack-nat.patch.ip_conntrack.h-2 patch-o-matic/talk-conntrack-nat.patch.ip_conntrack.h-2
--- patch-o-matic.orig/talk-conntrack-nat.patch.ip_conntrack.h-2	Thu Jan  1 01:00:00 1970
+++ patch-o-matic/talk-conntrack-nat.patch.ip_conntrack.h-2	Tue Jul 10 12:03:27 2001
@@ -0,0 +1,5 @@
+		/* Protocol helper conntrack info structures from p-o-m: */
+#if defined(CONFIG_IP_NF_TALK) || defined(CONFIG_IP_NF_TALK_MODULE)
+		struct ip_ct_talk ct_talk_info;
+#endif
+
