Moved mtu settings to conn create.
FossilOrigin-Name: 4f8bb635d27a132e8abf2fed1ca64c3db6d54e5cc347577b3d381f1901756930
This commit is contained in:
parent
63e4a54aaa
commit
96c3ccfe38
@ -20,6 +20,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <gnutls/gnutls.h>
|
||||
#include <gnutls/dtls.h>
|
||||
|
||||
#include "dtls_gnutls.h"
|
||||
|
||||
@ -215,6 +216,17 @@ struct dtls_gnutls_data *dtls_gnutls_data_create(struct conn *conn,int config)
|
||||
gnutls_transport_set_push_function(d->session, dtls_gnutls_bio_write);
|
||||
gnutls_transport_set_pull_timeout_function(d->session, dtls_gnutls_bio_wait);
|
||||
|
||||
|
||||
#if GNUTLS_VERSION_NUMBER >= 0x030100
|
||||
gnutls_handshake_set_timeout(d->session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
|
||||
|
||||
gnutls_dtls_set_data_mtu(d->session, conn->dtls_mtu);
|
||||
#endif
|
||||
gnutls_dtls_set_mtu(d->session, conn->dtls_mtu);
|
||||
|
||||
|
||||
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -45,12 +45,13 @@ int dtls_gnutls_connect(struct conn *conn)
|
||||
return 0;
|
||||
|
||||
// gnutls_dh_set_prime_bits(d->session, 512);
|
||||
#if GNUTLS_VERSION_NUMBER >= 0x030100
|
||||
/*#if GNUTLS_VERSION_NUMBER >= 0x030100
|
||||
gnutls_handshake_set_timeout(d->session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
|
||||
|
||||
gnutls_dtls_set_data_mtu(d->session, 1500);
|
||||
#endif
|
||||
gnutls_dtls_set_mtu(d->session, 1500);
|
||||
*/
|
||||
|
||||
int rc;
|
||||
cw_dbg(DBG_DTLS,"Starting handshake");
|
||||
|
Loading…
Reference in New Issue
Block a user