[Openswan Users] openswan 2.6.14 + kernel 2.6.24.7

Paul Wouters paul at xelerance.com
Mon Aug 11 17:21:33 EDT 2008


On Mon, 11 Aug 2008, TC wrote:

> I got this error when I try to compile the kernel:
> 
> net/built-in.o: In function `ipsec_tunnel_start_xmit':(.text+0x6fc7d):
> undefined reference to `ipsec_nat_encap'
> net/built-in.o: In function `ipsec_mast_start_xmit':(.text+0x76103):
> undefined reference to `ipsec_nat_encap'
> make: *** [.tmp_vmlinux1] Error 1

Either apply the NAT-T patch, wait for openswan 2.6.16 or try this patch:

commit 8f88501b432aeb48560746e47846d08d9ddc7e68
Author: Paul Wouters <paul at xelerance.com>
Date:   Thu Jul 31 10:33:06 2008 -0400

     Only call ipsec_nat_encap() with CONFIG_IPSEC_NAT_TRAVERSAL support.

diff --git a/linux/net/ipsec/ipsec_mast.c b/linux/net/ipsec/ipsec_mast.c
index a244ebc..c81402e 100644
--- a/linux/net/ipsec/ipsec_mast.c
+++ b/linux/net/ipsec/ipsec_mast.c
@@ -236,11 +236,13 @@ ipsec_mast_xsm_complete(
                 goto cleanup;
         }

+#ifdef CONFIG_IPSEC_NAT_TRAVERSAL
         /* do any final NAT-encapsulation */
         stat = ipsec_nat_encap(ixs);
         if(stat != IPSEC_XMIT_OK) {
                 goto cleanup;
         }
+#endif

         /* now send the packet again */
         {
diff --git a/linux/net/ipsec/ipsec_tunnel.c b/linux/net/ipsec/ipsec_tunnel.c
index 320c3ff..d00a91c 100644
--- a/linux/net/ipsec/ipsec_tunnel.c
+++ b/linux/net/ipsec/ipsec_tunnel.c
@@ -573,10 +573,12 @@ ipsec_tunnel_xsm_complete(
                 return;
         }

+#ifdef CONFIG_IPSEC_NAT_TRAVERSAL
         stat = ipsec_nat_encap(ixs);
         if(stat != IPSEC_XMIT_OK) {
                 goto cleanup;
         }
+#endif

         stat = ipsec_tunnel_restore_hard_header(ixs);
         if(stat != IPSEC_XMIT_OK) {


Paul


More information about the Users mailing list