diff options
author | Matt Caswell <matt@openssl.org> | 2014-12-01 23:58:05 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-12-03 09:43:47 +0000 |
commit | 8ccb44e6f543eb355b04c0d08eb45598f3fe1fd1 (patch) | |
tree | 0635ffceb4792e3f126e21f5ae5e5e9c75f3b506 /ssl/dtls1.h | |
parent | bbfdd1f0c9bc06d35544d2c443112c1ec790c55a (diff) |
Remove instances in libssl of the constant 28 (for size of IPv4 header + UDP)
and instead use the value provided by the underlying BIO. Also provide some
new DTLS_CTRLs so that the library user can set the mtu without needing to
know this constant. These new DTLS_CTRLs provide the capability to set the
link level mtu to be used (i.e. including this IP/UDP overhead). The previous
DTLS_CTRLs required the library user to subtract this overhead first.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 59669b6abf620d1ed2ef4d1e2df25c998b89b64d)
Conflicts:
ssl/d1_both.c
ssl/ssl.h
ssl/ssl_lib.c
Diffstat (limited to 'ssl/dtls1.h')
-rw-r--r-- | ssl/dtls1.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/dtls1.h b/ssl/dtls1.h index 3e5578dd0e..d4a865772e 100644 --- a/ssl/dtls1.h +++ b/ssl/dtls1.h @@ -108,6 +108,9 @@ extern "C" { #endif +/* Max MTU overhead we know about so far is 40 for IPv6 + 8 for UDP */ +#define DTLS1_MAX_MTU_OVERHEAD 48 + typedef struct dtls1_bitmap_st { unsigned long map; /* track 32 packets on 32-bit systems @@ -222,6 +225,7 @@ typedef struct dtls1_state_st /* Is set when listening for new connections with dtls1_listen() */ unsigned int listen; + unsigned int link_mtu; /* max on-the-wire DTLS packet size */ unsigned int mtu; /* max DTLS packet size */ struct hm_header_st w_msg_hdr; |