Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align naming and commenting of mechanism for receiving oversize packe…
…ts across protocols We've now implemented mechanisms to tolerate larger-than-expected packets for: - Uncompressed CSTP packets ("Fixed regression with CSTP MTU handling" patch in July 2016) - Uncompressed oNCP packets ("Do not drop vpn connection if packet arrived is larger than MTU" patch in May 2017) - Uncompressed GPST packets (in original merge from March 2018; this is a virtual necessity for GlobalProtect because it has no functional mechanism for negotiating the MTU) - Uncompressed ESP packets ("check for oversize ESP packets, with 256 bytes of headroom above calculated" in March 2018; GlobalProtect requires this for the aforementioned reason) - Compressed CSTP packets (preceding patch in this series) Since this is a requiring issue across protocols, it's useful to align the naming, commenting, and packet sizing-tolerance across the source files. 1) Use receive_mtu everywhere as the name for the maximum tolerated size of an incoming packet. 2) Insert similar comments explaining its purpose everywhere it's used. 3) Use receive_mtu = MAX(16384, vpninfo->ip_info.mtu) for all TLS-based tunnels, because 16384 is the maximum TLS record size. 4) Use receive_mtu = MAX(2048, vpninfo->vpninfo->ip_info.mtu + 256) for all UDP-based tunnels, because the MTU of IP datagrams on the public internet is effectively ~1500. Signed-off-by: Daniel Lenski <dlenski@gmail.com>
- Loading branch information