[Openswan Users] Problem compiling KLIPS as a module SOLVED

John Serink jserink2004 at yahoo.com
Thu Apr 20 11:08:37 CEST 2006


Hi All:

Ok, I was never successful at getting the KLIPS stack
compiled as a module. I compiled KLIPS directly into
the kernel and now Openswan works with KLIPS.

Cheers,
John

--- John Serink <jserink2004 at yahoo.com> wrote:

> Ok, here is what I am doing:
> make KERNELSRC=usr/src/linux-2.6.16-ck3 programs
> module 
> snip...
> snip...
> Building module for a 2.6 kernel
> make[1]: Entering directory
> `/usr/src/openswan-2.4.5'
> make[2]: Entering directory
> `/usr/src/openswan-2.4.5'
> make[2]: `/usr/src/openswan-2.4.5/modobj26/Makefile'
> is up to date.
> make[2]: Leaving directory `/usr/src/openswan-2.4.5'
> make -C usr/src/linux-2.6.16-ck3 
> BUILDDIR=/usr/src/openswan-2.4.5/modobj26
> SUBDIRS=/usr/src/openswan-2.4.5/modobj26
>
MODULE_DEF_INCLUDE=/usr/src/openswan-2.4.5/packaging/linus/config-all.h
>
MODULE_DEFCONFIG=/usr/src/openswan-2.4.5/linux/net/ipsec/defconfig
>  MODULE_EXTRA_INCLUDE= ARCH=i386 modules
> make: *** usr/src/linux-2.6.16-ck3: No such file or
> directory.  Stop.
> make: Entering an unknown directorymake: Leaving an
> unknown directorymake[1]: *** [module26] Error 2
> make[1]: Leaving directory `/usr/src/openswan-2.4.5'
> make: *** [module] Error 2
> 
> So, its telling me that my kernel directory doesn't
> exist. But...
> johnathlonlinux src # ls -l
> total 1844
> -rw-r--r--  1 root root    3751 Apr 13 15:20
> README.openswan-2
> drwxr-xr-x  3 root root      72 Apr 13 15:20 crypto
> drwxr-xr-x  6 root root     256 Apr 13 15:20 include
> -rw-r--r--  1 root root    7350 Apr 13 15:29
> klipspatchresults
> drwxr-xr-x  4 root root     104 Apr 13 15:20 lib
> lrwxrwxrwx  1 root root      16 Apr 13 15:15 linux
> ->
> linux-2.6.16-ck3
> drwxr-xr-x 19 root root    1648 Apr 13 13:14
> linux-2.6.10-ck1
> drwxr-xr-x 18 root root     632 Jul 21  2005
> linux-2.6.13-rc3-mm1
> drwxr-xr-x 20 root root    1584 Apr 18 00:07
> linux-2.6.16-ck3
> drwxr-xr-x 19 root root    1248 Feb 21  2004
> linux-2.6.2-rc2-mm1
> drwxr-xr-x 18 root root     632 May 12  2004
> linux-2.6.6-mm1
> drwxrwxr-x 18  500  500     600 Aug 14  2004
> linux-2.6.8.1
> drwxr-xr-x  3 root root      72 Apr 13 15:26 net
> drwxrwxr-x 14  500  500     792 Apr 18 11:20
> openswan-2.4.5
> -rw-r--r--  1 root root 1856464 Apr 13 14:20
> openswan-2.4.5.kernel-2.6-klips.patch
> -rw-r--r--  1 root root    4339 Apr 13 14:19
> openswan-2.4.5.kernel-2.6-natt.patch
> drwxr-xr-x  7 root root     192 May 27  2004 pc
> drwxr-xr-x  7 root root     168 May 27  2004 redhat
> 
> There it is. I can't work it out.
> A bug int he make file?
> 
> Cheers,
> John
> 
> --- ted leslie <tleslie at tcn.net> wrote:
> 
> > 
> > From Readme in openswan
> >
>
=========================================================================================
> > 
> > For Linux Kernels 2.6.0 and higher, Openswan can
> use
> > the built in IPsec
> > support, or KLIPS (ipsec0 devices).
> > 
> > To use KLIPS:
> > 
> > 0)      If you want NAT-T support, you need to
> patch
> > your kernel and build
> >         a new bzImage.  From the Openswan source
> > directory:
> > 
> >         make nattpatch | (cd /usr/src/linux-2.6 &&
> > patch -p1 && make bzImage)
> > 
> >         Note: Build and install kernel as normal,
> as
> > you have modified
> >         the TCP/IP stack in the kernel, so it
> needs
> > to be recompiled and
> >         installed.
> > 
> >         eg: cd /usr/src/linux && make dep bzImage
> > install
> > 
> >         See your distribution documentation on how
> > to install a new kernel
> > 
> > 
> > 1)      From the openswan source directory, build
> > the userland tools, and
> >         ipsec.o kernel module:
> > 
> >         make KERNELSRC=/usr/src/linux-2.6 programs
> > module
> > 
> > 2)      As root, install the userland tools, and
> the
> > ipsec.o module:
> > 
> >         make KERNELSRC=/usr/src/linux-2.6 install
> > minstall
> > 
> >
>
================================================================================
> > 
> > you dont need to do (0) i.e. Nat-t
> > you doing (1) and (2) exactly as specified,
> > and its going to be a ipsec.ko not a ipsec.o, as i
> > guess the document still is refering to 2.4 kernel
> > there.
> > (2) says its going to install the ipsec module,
> > which based on what you provided,
> > doesn't seem to be what your doing.
> > 
> > -tl
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Mon, 17 Apr 2006 01:47:19 -0700 (PDT)
> > John Serink <jserink2004 at yahoo.com> wrote:
> > 
> > > Hi Ted:
> > > 
> > > Ok, here is what I'm doing:
> > > johnathlonlinux linux # find / -iname "ipsec.ko"
> > >
> /lib/modules/2.6.16-ck3/kernel/net/ipsec/ipsec.ko
> > > /usr/src/linux-2.6.16-ck3/net/ipsec/ipsec.ko
> > > johnathlonlinux linux #               
> > > 
> > > Now, I'll recomplie the openswan userland tools:
> > > Done. Now, do the search again:
> > > johnathlonlinux openswan-2.4.5 # find / -iname
> > > "ipsec.ko"
> > >
> /lib/modules/2.6.16-ck3/kernel/net/ipsec/ipsec.ko
> > > /usr/src/linux-2.6.16-ck3/net/ipsec/ipsec.ko
> > > johnathlonlinux openswan-2.4.5 #
> > > 
> > > Same result. Here here is the problem:
> > > johnathlonlinux openswan-2.4.5 # modprobe ipsec
> > > FATAL: Error inserting ipsec
> > >
> >
> (/lib/modules/2.6.16-ck3/kernel/net/ipsec/ipsec.ko):
> > > Unknown symbol in module, or unknown parameter
> > (see
> > > dmesg)
> > > 
> > > This message corresponds with the dmesg last 4
> > lines:
> > > ipsec: Unknown symbol des_ede3_cbc_encrypt
> > > ipsec: Unknown symbol ipsec_3des_init
> > > ipsec: Unknown symbol des_check_key
> > > ipsec: Unknown symbol ipsec_aes_init
> > > 
> > > I have redone the make modules_install and get
> the
> > > same error messages. I have sompiles all of my
> > netkwy
> > > options as modules:
> > > CONFIG_IPSEC_NAT_TRAVERSAL=y
> > > CONFIG_INET_AH=m
> > > CONFIG_INET_ESP=m
> > > CONFIG_INET_IPCOMP=m
> > > CONFIG_INET_TUNNEL=m
> > > CONFIG_INET_DIAG=y
> > > CONFIG_INET_TCP_DIAG=y
> > > CONFIG_TCP_CONG_ADVANCED=y
> > > 
> > > Looking for some more ideas.
> > > 
> > > Cheers,
> > > John
> > > 
> > > --- ted leslie <tleslie at tcn.net> wrote:
> > > 
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Users mailing list