Fix dtls_query_mtu so that it will always either complete with an mtu that is
authorMatt Caswell <matt@openssl.org>
Mon, 1 Dec 2014 22:18:18 +0000 (22:18 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 3 Dec 2014 09:43:49 +0000 (09:43 +0000)
commita8da754d8482f09ce621305b156c2a0d64c16e9b
treecdeeb6416d113c0c0da1cdff58e4d60fbd63c5f0
parent8ccb44e6f543eb355b04c0d08eb45598f3fe1fd1
Fix dtls_query_mtu so that it will always either complete with an mtu that is
at least the minimum or it will fail.
There were some instances in dtls1_query_mtu where the final mtu can end up
being less than the minimum, i.e. where the user has set an mtu manually. This
shouldn't be allowed. Also remove dtls1_guess_mtu that, despite having
logic for guessing an mtu, was actually only ever used to work out the minimum
mtu to use.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 1620a2e49c777f31f2ce57966ae74006b48ad759)
ssl/d1_both.c