I am trying to use a simple Android 4.4.4 VPN connection to openswan/xl2tpd/pppd combo. the IPSec SA works, but xl2tpd at one point terminates the pppd and this shows up in logs:

xl2tpd[17990]: handle_avps: handling avp's for tunnel 46247, call 0
xl2tpd[17990]: message_type_avp: message type 4 (Stop-Control-Connection-Notification)
xl2tpd[17990]: assigned_tunnel_avp: using peer's tunnel 54725
xl2tpd[17990]: result_code_avp: avp is incorrect size.  8 < 10
xl2tpd[17990]: handle_avps: Bad exit status handling attribute 1 (Result Code) on mandatory packet.
xl2tpd[17990]: handle_packet: bad AVP handling!
xl2tpd[17990]: network_thread: bad packet
xl2tpd[17990]: build_fdset: closing down tunnel 46247
xl2tpd[17990]: Terminating pppd: sending TERM signal to pid 17991
xl2tpd[17990]: Connection 54725 closed to, port 50027 (Result Code: expected at least 10, got 8)

There are many pleas for help online, but to no avail:

My xl2tpd configuration:

 cat /etc/xl2tpd/xl2tpd.conf
ipsec saref = yes
port = 1701
debug avp = yes
debug tunnel = yes
debug avp = yes
debug packet = no
debug network = yes
debug state = yes
[lns default]
ip range =
local ip =
require chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
unix authentication = no

CLARIFICATION: The existing setup works just fine with iOS 7 on iPad


You must log in to answer this question.

Browse other questions tagged .