]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
improved MTU calculation for GlobalProtect ESP globalprotect
authorDaniel Lenski <dlenski@gmail.com>
Thu, 17 Aug 2017 03:07:45 +0000 (20:07 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 17 Aug 2017 18:43:12 +0000 (19:43 +0100)
commit82d4430da8f593109f90637fafb799a41a937330
tree69d7998c72f1a2789d9cda3a5e241c34b86cb4fa
parentca7ac61e1517f5af929f51f2672278ff5611e067
improved MTU calculation for GlobalProtect ESP

On Wed, Aug 16, 2017 at 8:03 PM, Daniel Lenski wrote:

> I believe the correct [ESP padding] algorithm is actually as follows:
>
> * From payload MTU, add 2 footer bytes, round *up* to a multiple of
>   the blocksize. Add the size of the MAC, IV, and other headers. That's
>   the size of the packet on the wire.
> * From wire packet MTU, subtract headers and MAC and IV, round *down*
>   to a multiple of blocksize, subtract TWO footer bytes, and that's the
>   largest payload you can carry.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
gpst.c