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