[Openswan Users] malloc 0 bytes and tunnel not found

Paul Wouters paul at xelerance.com
Fri Sep 12 10:21:31 EDT 2008

On Fri, 12 Sep 2008, Heiko --- wrote:

> I'm trying to build something like this:
> XP-Client(  ------  OpenVPN(

I take it you mean openswan, not openvpn.....

> I use the self-compiled xl2tpd-1.1.12 and Linux Openswan U2.6.14/K2.6.25.16-0.1-pae (netkey)
> When I connect from the XP-Client I get Error 651: Modem reporting an error and in my Logfiles I see "alloc_bytes1() was mistakenly asked to malloc 0 bytes for st_skey_ar in duplicate_state, please report to dev at openswan.org" and xl2tpd says "tunnel not found"

You can ignore the alloc_bytes log.

> conn L2TP-PSK
>         authby=secret
>         pfs=no
>         rekey=no
>         keyingtries=3
> #       type=tunnel

Try type=transport ?

>         left=
>         leftprotoport=17/1701
>         right=%any
>         rightprotoport=17/1701
>         auto=add
> When I play around with the nat_traversal key, It seems that XP tries to initiate one connection after another and then it tells me the server does not respond. (The xl2tpd does not appear in the logfiles, too). The above config is the only one i found where xl2tpd is started.
> So this posting is to first inform about the malloc 0 bytes Error and 2nd to ask how to solve the "tunnel not found" problem.

In the logs I see:

    pluto[6540]: "L2TP-PSK"[6] #12: STATE_QUICK_R2: IPsec SA established tunnel mode {ESP=>0x643da064
<0x03c75866 xfrm=3DES_0-HMAC_MD5 NATOA=<invalid> NATD=<invalid>:500 DPD=enabled}

So openswan thinks the connection is up. Are you sure xl2tpd is correctly
configured? Did you set the mtu to the external interface to 1472? Did you
see the pppd mtu to 1200?


More information about the Users mailing list