[Openswan Users] CentOS 5.3 and klips

Maverick maverick.pt at gmail.com
Wed Aug 26 06:20:57 EDT 2009


Hi,

My kernel is 2.6.18-128.7.1.el5.centos.plus (x86_64)

I tried to compile the module from openswan-2.6.14 sources and I get this
error:

  CC [M]  /usr/src/redhat/BUILD/openswan-2.6.14/modobj26/ipsec_init.o
In file included from include/linux/if_ether.h:111,
                 from include/linux/netdevice.h:29,
                 from
/usr/src/redhat/BUILD/openswan-2.6.14/modobj26/ipsec_init.c:39:
include/linux/skbuff.h:415: error: expected identifier or '(' before 'const'
include/linux/skbuff.h:415: error: expected ')' before '->' token
include/linux/skbuff.h:833: error: expected identifier or '(' before 'const'
include/linux/skbuff.h:833: error: expected ')' before '->' token
include/linux/skbuff.h:988: error: expected identifier or '(' before 'const'
include/linux/skbuff.h:988: error: expected ')' before '->' token
include/linux/skbuff.h:998: error: expected identifier or '(' before
'struct'
include/linux/skbuff.h:998: error: expected ')' before '->' token
include/linux/skbuff.h:1009: error: expected identifier or '(' before
'const'
include/linux/skbuff.h:1009: error: expected ')' before '->' token
include/linux/skbuff.h:1019: error: expected identifier or '(' before
'struct'
include/linux/skbuff.h:1019: error: expected ')' before '->' token
include/linux/skbuff.h:1034: error: expected identifier or '(' before
'const'
include/linux/skbuff.h:1034: error: expected ')' before '->' token
include/linux/skbuff.h:1049: error: expected identifier or '(' before
'struct'
include/linux/skbuff.h:1049: error: expected ')' before '->' token
In file included from
/usr/src/redhat/BUILD/openswan-2.6.14/modobj26/ipsec_init.c:41:
include/linux/ip.h:108: error: expected identifier or '(' before 'const'
include/linux/ip.h:108: error: expected ')' before '->' token
In file included from include/linux/ipv6.h:192,
                 from include/net/protocol.h:29,
                 from
/usr/src/redhat/BUILD/openswan-2.6.14/modobj26/ipsec_init.c:45:
include/linux/tcp.h:168: error: expected identifier or '(' before 'const'
include/linux/tcp.h:168: error: expected ')' before '->' token
In file included from include/linux/ipv6.h:193,
                 from include/net/protocol.h:29,
                 from
/usr/src/redhat/BUILD/openswan-2.6.14/modobj26/ipsec_init.c:45:
include/linux/udp.h:32: error: expected identifier or '(' before 'const'
include/linux/udp.h:32: error: expected ')' before '->' token
make[3]: *** [/usr/src/redhat/BUILD/openswan-2.6.14/modobj26/ipsec_init.o]
Error 1
make[2]: *** [_module_/usr/src/redhat/BUILD/openswan-2.6.14/modobj26] Error
2
make[2]: Leaving directory
`/usr/src/kernels/2.6.18-128.7.1.el5.centos.plus-x86_64'
make[1]: *** [module26] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/openswan-2.6.14'
make: *** [module] Error 2


Then I tried with openswan-2.6.22 and I get this:


  CC [M]  /root/openswan-2.6.22/modobj26/ipsec_xmit.o
/root/openswan-2.6.22/modobj26/ipsec_xmit.c: In function 'ipsec_xmit_send':
/root/openswan-2.6.22/modobj26/ipsec_xmit.c:2071: error: 'NF_INET_LOCAL_OUT'
undeclared (first use in this function)
/root/openswan-2.6.22/modobj26/ipsec_xmit.c:2071: error: (Each undeclared
identifier is reported only once
/root/openswan-2.6.22/modobj26/ipsec_xmit.c:2071: error: for each function
it appears in.)
make[3]: *** [/root/openswan-2.6.22/modobj26/ipsec_xmit.o] Error 1
make[2]: *** [_module_/root/openswan-2.6.22/modobj26] Error 2
make[2]: Leaving directory
`/usr/src/kernels/2.6.18-128.7.1.el5.centos.plus-x86_64'
make[1]: *** [module26] Error 2
make[1]: Leaving directory `/root/openswan-2.6.22'
make: *** [module] Error 2

Anyone knows what could be the problema?

-----Original Message-----
From: Paul Wouters [mailto:paul at xelerance.com] 
Sent: quinta-feira, 20 de Agosto de 2009 18:38
To: Maverick
Cc: users at openswan.org
Subject: Re: [Openswan Users] CentOS 5.3 and klips

On Thu, 20 Aug 2009, Maverick wrote:

> I would like to know if it's possible o use klips in CentOS 5.3 and how to
> do it?

Yes. Hopefully soon we'll build a kmod package. For now, do:

yum install kernel-devel
tar zxvf openswan-2.6.22.tar.gz
cd openswan-2.6.22
export KERNELSRC=/usr/src/kernel/YourVersion
make module 
sudo make module_install

You do not need any nat-t patches. You do not need to rebuild your
kernel.

Change /etc/ipsec.conf to have protostack=klips and service ipsec restart

Paul



More information about the Users mailing list