Reduce MTU to Android maximum value

Refs #342
This commit is contained in:
M66B 2016-02-21 20:14:27 +01:00
parent bcdfe1e36c
commit 9a50844081
2 changed files with 2 additions and 2 deletions

View File

@ -956,7 +956,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
builder.addRoute("0:0:0:0:0:0:0:0", 0);
// In practice Android MSS is 8192 bytes
builder.setMtu(32768);
builder.setMtu(10000);
// Add list of allowed applications
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)

View File

@ -33,7 +33,7 @@
#define SELECT_TIMEOUT 3600 // seconds
#define TUN_MAXMSG 32768 // bytes (device)
#define TUN_MAXMSG 10000 // bytes (device)
#define ICMP4_MAXMSG (IP_MAXPACKET - 20 - 8) // bytes (socket)
#define ICMP6_MAXMSG (IPV6_MAXPACKET - 40 - 8) // bytes (socket)
#define UDP4_MAXMSG (IP_MAXPACKET - 20 - 8) // bytes (socket)