Browse Source

workaround for buggy OpenSSL that produces incorrectly fragmented DTLS

closes #413

Change-Id: Iead12e5c1b2387c15923a1cff7f7abcd9267b4bb
changes/21/19321/2
Richard Fuchs 8 years ago
parent
commit
3885da946b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      daemon/dtls.c

+ 6
- 0
daemon/dtls.c View File

@ -560,6 +560,12 @@ int dtls_connection_init(struct packet_stream *ps, int active, struct dtls_cert
SSL_set_tmp_ecdh(d->ssl, ecdh); SSL_set_tmp_ecdh(d->ssl, ecdh);
EC_KEY_free(ecdh); EC_KEY_free(ecdh);
#if defined(SSL_OP_NO_QUERY_MTU)
SSL_CTX_set_options(d->ssl_ctx, SSL_OP_NO_QUERY_MTU);
SSL_set_mtu(d->ssl, 1500);
DTLS_set_link_mtu(d->ssl, 1500);
#endif
d->active = active ? -1 : 0; d->active = active ? -1 : 0;
done: done:


Loading…
Cancel
Save