]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Align naming and commenting of mechanism for receiving oversize packets across protocols
authorDaniel Lenski <dlenski@gmail.com>
Wed, 1 Aug 2018 02:35:59 +0000 (19:35 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Thu, 2 Aug 2018 01:32:13 +0000 (18:32 -0700)
commit0281a8e1db81695a9eb553a241529f3a0a9695d3
treeb2a2859e0a9cae6bd917733bea6bdb1ee68a9e5d
parent87a66e15d17f30eaf16f250478e746235a239570
Align naming and commenting of mechanism for receiving oversize packets 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>
cstp.c
esp.c
gpst.c