]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Don't limit max incoming message size based on c2->frame
authorSteffan Karger <steffan@karger.me>
Wed, 8 Jun 2016 12:20:39 +0000 (14:20 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 8 Jun 2016 17:50:22 +0000 (19:50 +0200)
commit3c1b19e04745177185decd14da82c71458442b82
tree9a8b76efb7888a7f77e97b3efdbb8e26141753d0
parent63b3e000c9141f4ca03a374354da26334257bc18
Don't limit max incoming message size based on c2->frame

"Be conservative in what you send, be liberal in what you accept"

When receiving packets, the real limitation of how much data we can accept
is the size of our internal buffers, not the maximum size we expect
incoming packets to have.

I ran into this while working on cipher negotiation, which will need
separate bookkeeping for the required internal buffer size, and the
link/tun MTU.  Basing this code on the buffer size instead of c2->frame
makes that easier.  A nice side-effect of this change is that it
simplifies the code.

This should also reduce the impact of using asymmetric tun/link MTU's,
such as in trac ticket #647.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1465388443-15484-2-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11850
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c
src/openvpn/socket.c
src/openvpn/socket.h