diff options
Diffstat (limited to 'clatd.c')
| -rw-r--r-- | clatd.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -51,6 +51,9 @@ #define DEVICENAME6 "clat" #define DEVICENAME4 "clat4" +/* 40 bytes IPv6 header - 20 bytes IPv4 header + 8 bytes fragment header */ +#define MTU_DELTA 28 + int forwarding_fd = -1; volatile sig_atomic_t running = 1; @@ -271,8 +274,9 @@ void configure_interface(const char *uplink_interface, const char *plat_prefix, Global_Clatd_Config.mtu = 1280; } - if(Global_Clatd_Config.ipv4mtu <= 0 || (Global_Clatd_Config.ipv4mtu > Global_Clatd_Config.mtu - 20)) { - Global_Clatd_Config.ipv4mtu = Global_Clatd_Config.mtu-20; + if(Global_Clatd_Config.ipv4mtu <= 0 || + Global_Clatd_Config.ipv4mtu > Global_Clatd_Config.mtu - MTU_DELTA) { + Global_Clatd_Config.ipv4mtu = Global_Clatd_Config.mtu - MTU_DELTA; logmsg(ANDROID_LOG_WARN,"ipv4mtu now set to = %d",Global_Clatd_Config.ipv4mtu); } |
