patching patched patches

I've been so busy and unsuccessful that I didn't blog anything :(

This should in fact be an automated installations entry since it belongs to the same project.
However, the subject is so detached that I'd rather not contaminate the series with this post ;)

The problem is as follows: I want a 2.6.16 kernel (latest) with some patches and with some patch-o-matic patches. I would like to have nf-HIPAC too.

I wrote a script that does it all automagically, except make the patches of course.
Because 2.6.16 is so new, there are no patches yet to get everything working.
I had to ditch nf-HIPAC and I'm now just focusing on the patch-o-matic patches.

I need to get the following patchlets to apply:


I removed this patchlet from patch-o-matic and applied the version found at


I removed this patchlet from patch-o-matic and got a patch for the kernel from The patch didn't apply cleanly, so I edited the patchfile a bit. More details below


This patchlet didn't apply cleanly, but I didn't remove it. Instead, someone posted 2 patches to the netfilter-development mailinglist: patch 1 and patch 2. This patch didn't work for me, so I did what I thought was best and recreated the patches. The first patch replaces 3 files with version 0.8.1 of the ipp2p module found on The second patch is a small patch that I manually edited.


I didn't get this to work so I left it out for now


This is now built into the kernel

I've looked on google for a quick guide to the format of diff, but couldn't find any.

diff -urN linux-2.6.15.orig/net/ipv4/netfilter/Makefile linux-2.6.15/net/ipv4/netfilter/Makefile
--- linux-2.6.15.orig/net/ipv4/netfilter/Makefile 2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.15/net/ipv4/netfilter/Makefile 2006-02-20 20:56:48.000000000 +0100
@@ -22,3 +22,5 @@
obj-$(CONFIG_IP_NF_PPTP) += ip_conntrack_pptp.o
+obj-$(CONFIG_IP_NF_RTSP) += ip_conntrack_rtsp.o
+obj-$(CONFIG_IP_NF_NAT_RTSP) += ip_nat_rtsp.o
obj-$(CONFIG_IP_NF_AMANDA) += ip_conntrack_amanda.o
obj-$(CONFIG_IP_NF_TFTP) += ip_conntrack_tftp.o

The above extract is the result of an edited patchfile.
The important (or most obscure) line is

@@ -22,3 +22,5 @@

From what I can make up, this means: go to line 22, and replace the next 3 lines with the following 5 lines.
Also, the line right below that important line should be a line of text from the original file.

I'm currently trying to figure out why ipp2p butts out with an error

unable to find ladd slot in src /tmp/pom-11487/net/ipv4/netfilter/Makefile (./patchlets/ipp2p/linux-2.6/./net/ipv4/netfilter/Makefile.ladd)

From reading the file used by the runme script, I uncover a mistery: ladd stands for lineadd.
A function called "apply_lineadd" spews out the error. It takes (among others) 2 arguments: $laddfile and $srcfile. The $srcfile is the first file mentioned in the error, $laddfile is the second. The first line in $laddfile is stored in $lookingfor. The line is looked for in the $srcfile. If it's not find, the error is printed.

So, what does this mean for me ? in the net/ipv4/netfilter/Makefile, the first line of Makefile.ladd does not appear.

More precisely, the Makefile.ladd file contains:

obj-$(CONFIG_IP_NF_MATCH_LIMIT) += ipt_limit.o
obj-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_ipp2p.o

And ipt_limit.o does indeed not appear in the Makefile...
The reason for this is that the limit match moved from ip_tables to x_tables and is now known as xt_limit.o

I replaced the lines above in the file patchlets/ipp2p/linux-2.6/./net/ipv4/netfilter/Makefile.ladd by:

obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
obj-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_ipp2p.o