[Openswan dev] Fwd: unkown symbol ipsec_nat_encap while insert ipsec.ko
Tian Yazhou
phio.asia at gmail.com
Wed Jul 9 23:08:57 EDT 2008
Thanks Paul for your help :-)
I added a CONFIG_IPSEC_NAT_TRAVERSAL=n line in linux/net/ipsec/defconfig to
disable NAT-T, also tried remove this line. The result is same,
ipsec_nat_encap unknown when insert ipsec.ko into running kernel.
ipsec_nat_encap is defined in linux/net/ipsec/ipsec_xmit.c, but it is
undefed already by CONFIG_IPSEC_NAT_TRAVERSAL:
1727
1728 #ifdef CONFIG_IPSEC_NAT_TRAVERSAL
1729 enum ipsec_xmit_value ipsec_nat_encap(struct ipsec_xmit_state *ixs)
1730 {
1731 if (ixs->natt_type && ixs->natt_head) {
After undef CONFIG_IPSEC_NAT_TRAVERSAL, then 'make
KERNELSRC=/lib/modules/2.6.9.1-667/build module' finished, I got following
message:
#################
LD [M] /root/src/openswan-2.6.14/modobj26/ipsec.o
Building modules, stage 2.
MODPOST
*** Warning: "ipsec_nat_encap" [/root/src/openswan-2.6.14/modobj26/ipsec.ko]
undefined!
CC /root/src/openswan-2.6.14/modobj26/ipsec.mod.o
LD [M] /root/src/openswan-2.6.14/modobj26/ipsec.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.12-1.1372_FC3-i686'
=========================================================
KLIPS26 module built successfully.
###############
I think the problem is in several assembly language file, like
"modobj26/ipsec_mast.s":
177 .L27:
178 .loc 1 282 0
179 movw $1460, 242(%esi)
180 .loc 1 283 0
181 movw $1460, 240(%esi)
182 .loc 1 285 0
183 movl %esi, %eax
184 call ipsec_xmit_encap_bundle_2
185 .loc 1 287 0
186 testl %eax, %eax
187 jne .L36
188 .loc 1 294 0
189 movl %esi, %eax
190 call ipsec_nat_encap
191 .loc 1 295 0
192 testl %eax, %eax
193 .p2align 4,,2
194 je .L62
In line 190, ipsec_nat_encap is called.
I think I still need to do more configuration to solve this problem, but I
don't know where to configure :-(
PS: I want to compile an ipsec kernel module without NAT-T, which do not
require a recompilation of the kernel image, this is why I want to undef
CONFIG_IPSEC_NAT_TRAVERSAL
On Thu, Jul 10, 2008 at 4:26 AM, Paul Wouters <paul at xelerance.com> wrote:
> On Wed, 9 Jul 2008, Tian Yazhou wrote:
>
> > I've sent this message to users mail list for several days but receive no
> > reponse. Sorry to post it again here, I just have no more time to
> > investigate this problem.
>
> Did you undef/remove it from linux/net/ipsec/defconfig too? Or specified
> your own def?
>
> Paul
>
> > ---------- Forwarded message ----------
> > From: Tian Yazhou <phio.asia at gmail.com>
> > Date: Mon, Jul 7, 2008 at 5:21 PM
> > Subject: unkown symbol ipsec_nat_encap while insert ipsec.ko
> > To: users at openswan.org
> >
> >
> > I'm trying to use 2.6.14 version OpenS/WAN under a Fedora 3 box with a
> > 2.6.9-1.667 kernel, using KLIPS.
> >
> > At first when i compiled it, 'make' complained about unavailability of
> > spinlock_typs.h. I solved this simply by commenting out the #define
> > NEED_SPINLOCK_TYPES in line 116 of ipsec_keversion.h.
> > then, I could compile and install the ipsec kernel module successfully.
> But
> > while I wanted to insert this module into the current kernel, modprobe
> > paniced about 'unkown symbol'. dmesg told me it's caused by
> ipsec_nat_encap.
> >
> >
> > It seems that 'ipsec_nat_encap' is about NAT-T, but after I undef
> > CONFIG_IPSEC_NAT_TRAVERSAL in config-all.h and config-all.hmodules, it
> still
> > failed because some assembly code call ipsec_nat_encap.
> >
> > I'm sure I must missed something, could some one help me on this? Thanks
> a
> > lot.
> >
> > --
> > Dream as if you'll live forever; Live as if you'll die today. - James
> Dean
> >
> >
> >
> > --
> > Dream as if you'll live forever; Live as if you'll die today. - James
> Dean
> >
>
--
Dream as if you'll live forever; Live as if you'll die today. - James Dean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openswan.org/pipermail/dev/attachments/20080710/eb64231d/attachment.html
More information about the Dev
mailing list