Android 向 openswan/xl2tpd/pppd 发送错误:result_code_avp: avp 大小不正确。8 < 10

Android 向 openswan/xl2tpd/pppd 发送错误:result_code_avp: avp 大小不正确。8 < 10

我正在尝试使用一个简单的 Android 4.4.4 VPN 连接到 openswan/xl2tpd/pppd 组合。IPSec SA 可以工作,但是 xl2tpd 会终止 pppd,并且在日志中显示以下内容:

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 87.114.120.198, port 50027 (Result Code: expected at least 10, got 8)

网上有很多求助,但都无济于事:

我的 xl2tpd 配置:

 cat /etc/xl2tpd/xl2tpd.conf
[global]
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 = 10.152.2.2-10.152.2.254
local ip = 10.152.2.1
require chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
unix authentication = no

澄清:现有设置与 iPad 上的 iOS 7 兼容

相关内容