[Openswan Users] Problem compiling KLIPS as a module

John Serink jserink2004 at yahoo.com
Mon Apr 17 09:27:32 CEST 2006


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:
> > 
> > > i dont have my machine handy , so i cant give
> you
> > > specifics,
> > > but 
> > > i am almost positive the functions that are not
> > > found, exist
> > > as assembly code in the openswan directory and
> not
> > > in anything to do with the kernel tree.
> > > when you make all in the openswan directory, and
> do
> > > the install,
> > > at that time a *.ko file is written to the
> > > /lib/modules/.........
> > > and that ko file will contain the functions you
> got
> > > in your error list,
> > > 
> > > when you do  the varient of
> > > make install
> > > in the user land open swan directory,
> > > do a 
> > > make ....... > /tmp/tt1 2> /tmp/tt2
> > > and when its done, look in those files, and you
> will
> > > see its dumping  *.ko file somewhere
> > > 
> > > if your still having trouble in a 1/2 day, i can
> > > reference my machine that runs Klips,
> > > that i infact got the exact same error you got,
> and
> > > overcame it.
> > > 
> > > -tl
> > > 
> > > 
> > > On Mon, 17 Apr 2006 01:25:51 -0700 (PDT)
> > > John Serink <jserink2004 at yahoo.com> wrote:
> > > 
> > > > Thanx for the tips....
> > > > I did a find for "ipsec.ko" and found only the
> > > > original module from the kernel compile. I
> tried
> > > > recompiling the user land tools and then doing
> a
> > > "make
> > > > modules_install" but got the same error again.
> > > > 
> > > > Any other tips?
> > > > 
> > > > Cheers,
> > > > John
> > > > 
> > > > 
> > > > --- ted leslie <tleslie at tcn.net> wrote:
> > > > 
> > > > > 
> > > > > i got this too,
> > > > > what i think happened is,
> > > > > you need to put the patch on the kernel, but
> you
> > > > > need to compile the
> > > > > openswan in its own directory and it has
> asembly
> > > > > code for the unknown symbols,
> > > > > you will find that the make install of the
> > > openswan
> > > > > will write *.ko's
> > > > > actually i think there is just one, that
> > > contains
> > > > > thoses files,
> > > > > 
> > > > > assess what happens when you do a make
> install
> > > of
> > > > > openswan,
> > > > > capture the install "work" its doing and see
> > > where
> > > > > it sticks the 
> > > > > (i think) ipsec.ko file that it generates,
> > > > > as apposed to the kernel.
> 
=== 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