[Openswan Users] KLIPS and kernel 2.6.20

Mike Horn lists at caddisconsulting.com
Wed Feb 21 14:49:17 EST 2007


Hi,

There are a number of issues when trying to compile a 2.6.20 kernel with
KLIPS (Openswan 2.4.6).  I was able to put in a couple of ugly hacks to get
the kernel to build, and ipsec works, but I know a couple of the changes I
made aren't the "right" solution.

Some of the issues are mundane (like changing include entries from config.h
to autoconf.h), however there have been some changes in net/ipv4/udp.c,
net/socket.c and include/linux/net.h that need to be addressed.  Here's a
brief overview of the issues,  where possible I included some information
regarding the nature of the issue.

<< net/udp.c issues >>

The changes to net/ipv4/udp.c result in several hunks of the
openswan-2.4.6.kernel-2.6-natt.patch file failing.

[root at dev linux-2.6.20-klips-3]# patch -p1
<patches/openswan-2.4.6.kernel-2.6-natt.patch
patching file include/net/xfrmudp.h
patching file net/ipv4/Kconfig
Hunk #1 succeeded at 351 with fuzz 1.
patching file net/ipv4/udp.c
Hunk #1 FAILED at 108.
Hunk #2 succeeded at 917 with fuzz 1 (offset 20 lines).
Hunk #3 succeeded at 940 with fuzz 2.
Hunk #4 FAILED at 954.
Hunk #5 succeeded at 1002 (offset 29 lines).
Hunk #7 FAILED at 1060.
Hunk #8 FAILED at 1157.
Hunk #9 succeeded at 1773 (offset 160 lines).
4 out of 9 hunks FAILED -- saving rejects to file net/ipv4/udp.c.rej
[root at dev linux-2.6.20-klips-3]#

The first issue (Hunk #1) is due to the addition of an extra include,
"udp_impl.h", in udp.c, so the patch doesn't match.
The second issue (Hunk #4) is due to the test for len changing, so the patch
doesn't match.
The third issue (Hunk #7) is due to UDP_INC_STATS_BH() now requires a second
parameter, so the patch doesn't match.

<< include/linux/net.h issues >>

In the 2.6.20 kernel source the type for sock_unregister() changed from
"int" to "void".  This is defined in include/linux/net.h and is referenced
in net/socket.c and net/ipsec/pfkey_v2.c.  I'm not sure what the right
solution for this is, to get it to compile I changed the type back to "int"
and it appears to work.

<< config.h >>

Here is a list of files that require change from config.h to autoconf.h

net/ipsec/ipcomp.c
net/ipsec/ipsec_ah.c
net/ipsec/ipsec_alg_cryptoapi.c
net/ipsec/ipsec_esp.c
net/ipsec/ipsec_init.c
net/ipsec/ipsec_ipcomp.c
net/ipsec/ipsec_ipip.c
net/ipsec/ipsec_life.c
net/ipsec/ipsec_mast.c
net/ipsec/ipsec_proc.c
net/ipsec/ipsec_radij.c
net/ipsec/ipsec_rcv.c
net/ipsec/ipsec_sa.c
net/ipsec/ipsec_snprintf.c
net/ipsec/ipsec_tunnel.c
net/ipsec/ipsec_xform.c
net/ipsec/ipsec_xmit.c
net/ipsec/pfkey_v2.c
net/ipsec/pfkey_v2_ext_process.c
net/ipsec/pfkey_v2_parser.c
net/ipsec/radij.c
net/ipsec/aes/ipsec_alg_aes.c
net/ipsec/alg/ipsec_alg_cryptoapi.c
net/ipsec/alg/Makefile
net/ipsec/des/ipsec_alg_3des.c
include/openswan/ipsec_rcv.h

If anyone needs them I have some patch files I created that will let you
work around these issues, but hopefully someone will be able to quickly
create the proper fixes for the issues.

-mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openswan.org/pipermail/users/attachments/20070221/2346b74a/attachment.html 


More information about the Users mailing list