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:31:35 +0000 |
commit | 05e769f269f28b649d8300a1fc3aaef19901a173 (patch) | |
tree | 51fdb00407a0d4655e6622f8b46a9cc1470980d1 /ssl/dtls1.h | |
parent | ccecdb130c593335a9f53d5914542a98e440421d (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
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 af86f60fb5..96f733434a 100644 --- a/ssl/dtls1.h +++ b/ssl/dtls1.h @@ -121,6 +121,9 @@ extern "C" { #define DTLS1_SCTP_AUTH_LABEL "EXPORTER_DTLS_OVER_SCTP" #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 @@ -235,6 +238,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; |