[Openswan dev] [PATCH] Source changes required to build KLIPS on 2.6

Nate Carlson natecars at natecarlson.com
Wed Jun 23 19:04:34 CEST 2004


On Wed, 23 Jun 2004, Nate Carlson wrote:
> OK, I lied - I didn't have IP Compression and stuff enabled, forgot
> about that.
> 
> Attached is move-files-2 (moves the zlib stuff in), and a new Makefile
> that enables ipcomp, sha1, etc. One minor update needs to be made to
> adler32.c - change '#include "zconf.h"' to '#include <zlib/zconf.h>"'.

My track record isn't doing too well - that's what I get for using e-mail 
to transfer files. Attached this time.

------------------------------------------------------------------------
| nate carlson | natecars at natecarlson.com | http://www.natecarlson.com |
|       depriving some poor village of its idiot since 1981            |
------------------------------------------------------------------------
-------------- next part --------------
mv ./linux/lib/zlib/adler32.c linux/net/ipsec/
mv ./linux/lib/zlib/deflate.c linux/net/ipsec/
mv ./linux/lib/zlib/infblock.c linux/net/ipsec/
mv ./linux/lib/zlib/infcodes.c linux/net/ipsec/
mv ./linux/lib/zlib/inffast.c linux/net/ipsec/
mv ./linux/lib/zlib/inflate.c linux/net/ipsec/
mv ./linux/lib/zlib/inftrees.c linux/net/ipsec/
mv ./linux/lib/zlib/infutil.c linux/net/ipsec/
mv ./linux/lib/zlib/trees.c linux/net/ipsec/
mv ./linux/lib/zlib/zutil.c linux/net/ipsec/
mv ./linux/lib/zlib/zconf.h linux/include/zlib/
mv ./linux/lib/zlib/deflate.h linux/net/ipsec/
mv ./linux/lib/zlib/infblock.h linux/net/ipsec/
mv ./linux/lib/zlib/inftrees.h linux/net/ipsec/
mv ./linux/lib/zlib/infcodes.h linux/net/ipsec/
mv ./linux/lib/zlib/infutil.h linux/net/ipsec/
mv ./linux/lib/zlib/inffast.h linux/net/ipsec/
mv ./linux/lib/zlib/inffixed.h linux/net/ipsec/
-------------- next part --------------
# Makefile for KLIPS kernel code as a module    for 2.6 kernels
#
# Makefile for KLIPS kernel code as a module
# Copyright (C) 1998, 1999, 2000,2001  Richard Guy Briggs.
# Copyright (C) 2002-2004	Michael Richardson <mcr at freeswan.org>
# 
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# RCSID $Id: Makefile.fs2_6,v 1.3 2004/02/24 17:17:04 mcr Exp $
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#

FREESWANSRCDIR=.
KLIPS_TOP=.
-include ${FREESWANSRCDIR}/Makefile.ver

# always force it on
CONFIG_IPSEC:=m
CONFIG_IPSEC_ESP:=y
CONFIG_IPSEC_AH:=y
CONFIG_IPSEC_IPIP:=y
CONFIG_IPSEC_ALG:=y
CONFIG_IPSEC_ENC_CRYPTOAPI:=y
CONFIG_IPSEC_ENC_3DES:=y

obj-m := ipsec.o

ipsec-objs := ipsec_init.o ipsec_sa.o ipsec_radij.o radij.o
ipsec-objs += ipsec_life.o ipsec_proc.o
ipsec-objs += ipsec_tunnel.o ipsec_xmit.o ipsec_rcv.o ipsec_ipip.o
ipsec-objs += sysctl_net_ipsec.o 
ipsec-objs += pfkey_v2.o pfkey_v2_parser.o pfkey_v2_ext_process.o 
ipsec-objs += version.o
ipsec-objs += ipsec_ah.o
ipsec-objs += ipsec_esp.o

ipsec-objs += ipsec_ipcomp.o

ipsec-objs += ipsec_alg.o
#ipsec-obj += ipsec_alg_aes.o
ipsec-objs += ipsec_alg_cryptoapi.o

ipsec-objs += cbc_enc.o
ipsec-objs += ecb_enc.o
ipsec-objs += set_key.o

ipsec-objs += cbc_enc.o
ipsec-objs += ecb_enc.o
ipsec-objs += set_key.o

ipsec-objs += ipsec_md5c.o
ipsec-objs += ipsec_sha1.o

ifeq (${SUBARCH},i386)
ipsec-objs += dx86unix.o
else
ipsec-objs += des_enc.o
endif

ipsec-objs += satot.o
ipsec-objs += addrtot.o
ipsec-objs += ultot.o 
ipsec-objs += addrtypeof.o
ipsec-objs += anyaddr.o
ipsec-objs += initaddr.o
ipsec-objs += ultoa.o 
ipsec-objs += addrtoa.o 
ipsec-objs += subnettoa.o 
ipsec-objs += subnetof.o 
ipsec-objs += goodmask.o 
ipsec-objs += datatot.o 
ipsec-objs += rangetoa.o 
ipsec-objs += prng.o 
ipsec-objs += pfkey_v2_parse.o 
ipsec-objs += pfkey_v2_build.o 
ipsec-objs += pfkey_v2_debug.o 
ipsec-objs += pfkey_v2_ext_bits.o 
ipsec-objs += version.o

# IPcomp stuff
ipsec-objs += ipcomp.o 

ipsec-objs += adler32.o
ipsec-objs += deflate.o
ipsec-objs += infblock.o
ipsec-objs += infcodes.o
ipsec-objs += inffast.o
ipsec-objs += inflate.o
ipsec-objs += inftrees.o
ipsec-objs += infutil.o
ipsec-objs += trees.o
ipsec-objs += zutil.o

EXTRA_CFLAGS += -I/usr/src/kernel-source-2.6.6/include \
		-I/home/rte/openswan-2/linux/include \
		-DCONFIG_IPSEC_ESP \
		-DCONFIG_IPSEC_ALG \
		-DCONFIG_IPSEC_DEBUG \
		-DCONFIG_IPSEC \
		-DCONFIG_IPSEC_IPIP \
		-DCONFIG_IPSEC_AUTH_HMAC_MD5 \
		-DCONFIG_IPSEC_AUTH_HMAC_SHA1 \
		-DCONFIG_IPSEC_ESP \
		-DCONFIG_IPSEC_ENC_3DES \
		-DCONFIG_IPSEC_ENC_CRYPTOAPI \
		-DCONFIG_IPSEC_ENC_3DES \
		-DCONFIG_IPSEC_DEBUG \
		-DCONFIG_IPSEC_AH \
		-DCONFIG_IPSEC_IPCOMP \
		-DIPCOMP_PREFIX \
		#-DCONFIG_IPSEC_NAT_TRAVERSAL \
		#

#
# $Log: Makefile.fs2_6,v $
# Revision 1.3  2004/02/24 17:17:04  mcr
# 	s/CONFIG_IPSEC/CONFIG_IPSEC/ as 26sec uses "CONFIG_IPSEC" to
# 	turn it on/off as well.
#
# Revision 1.2  2004/02/22 06:50:42  mcr
# 	kernel 2.6 port - merged with 2.4 code.
#
# Revision 1.1.2.1  2004/02/20 02:07:53  mcr
# 	module configuration for KLIPS 2.6
#
#
# Local Variables:
# compile-command: "(cd ../../.. && source umlsetup.sh && make -C ${POOLSPACE} module/ipsec.o)"
# End Variables:
#



More information about the Dev mailing list