]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
improved MTU calculation for GlobalProtect ESP
authorDaniel Lenski <dlenski@gmail.com>
Thu, 17 Aug 2017 03:07:45 +0000 (20:07 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 27 Feb 2018 15:28:32 +0000 (16:28 +0100)
commit430310173edfeaf6ff61591bce7dacc69abbad1c
treefa1faba6d1f6ead900e560cb592d27a7e4c9c940
parent7ad37d53e10067bab3b293e1916d831adc5617f9
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