Failed to add uid rule (Invalid argument)

用StrongSwan,跟服务器建立连接后,从服务端断开连接,有些手机(华为Mate7),会出错:
提示连接失败,但系统状态栏仍然有“钥匙”图标,点击可以看到VPN处于连接状态中的对话框,点击断开连接,也没效果。
在APP里,再次连接,也会失败。就算将APP卸载,连接状态的对话框也不会消失;必须重启手机,才能恢复。
而有些手机,不会出现这种情况。这种现象,跟 这里(strongswan#695)这里(google#62410)描述的一样。

查看LOG,发现服务器断开时,有如下的错误日志:
03-24 17:43:: W/System.err(7257): java.lang.IllegalStateException: command '108 interface fwmark uid add tun1 0 99999'
 failed with '400 108 Failed to add uid rule (Invalid argument)'
03-24 17:43:: W/System.err(7257): at android.os.Parcel.readException(Parcel.java:1476)
03-24 17:43:: W/System.err(7257): at android.os.Parcel.readException(Parcel.java:1422)
03-24 17:43:: W/System.err(7257): at android.net.IConnectivityManager$Stub$Proxy.establishVpn(IConnectivityManager.java:1578)
03-24 17:43:: W/System.err(7257): at android.net.VpnService$Builder.establish(VpnService.java:471)
03-24 17:43:: W/System.err(7257): at cn.gaojs.vpn.logic.CharonVpnService$BuilderAdapter.establishNoDns(CharonVpnService.java:583)
03-24 17:43:: W/System.err(7257): at dalvik.system.NativeStart.run(Native Method)
strongswan: it is caused by the same bug as#462 in Android 4.4 before 4.4.3. Refer to the related issues for more information.
The problem is that the Google fix only applies to Android version 4.4.3, and there are a lot of 4.4 - 4.4.2 devices out there.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值