VPN握手调试:服务器给的tun地址没有掩码长度,这里默认为24

This commit is contained in:
free will
2021-07-21 15:12:52 +08:00
parent 9b7c2a071e
commit 91a6fba7ec
@@ -473,7 +473,8 @@ public class MINVpnConnection implements Runnable{
builder.setMtu(Short.parseShort(fields[1]));
break;
case 'a':
builder.addAddress(fields[1], Integer.parseInt(fields[2]));
builder.addAddress(fields[1], 24);
// builder.addAddress(fields[1], Integer.parseInt(fields[2]));
System.out.println("handshake ip: " + fields[1]);
allocatedAddress = fields[1];
break;