work arround for gnutls DTLS fragment bug
This commit is contained in:
parent
2f0f57da49
commit
90c98f4a83
@ -422,6 +422,9 @@ static void dtls_forward(struct dtls_session *recv, struct dtls_session *send_s,
|
|||||||
recv->buffer_len = len;
|
recv->buffer_len = len;
|
||||||
|
|
||||||
if (!recv->handshake_done) {
|
if (!recv->handshake_done) {
|
||||||
|
int try_it_again = 1;
|
||||||
|
|
||||||
|
again:
|
||||||
do {
|
do {
|
||||||
ret = gnutls_handshake(recv->session);
|
ret = gnutls_handshake(recv->session);
|
||||||
debug("DTLS handshake on session %p, fd %d, got %d", recv, recv->fd, ret);
|
debug("DTLS handshake on session %p, fd %d, got %d", recv, recv->fd, ret);
|
||||||
@ -433,6 +436,11 @@ static void dtls_forward(struct dtls_session *recv, struct dtls_session *send_s,
|
|||||||
gnutls_deinit(recv->session);
|
gnutls_deinit(recv->session);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (try_it_again) {
|
||||||
|
try_it_again = 0;
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ret == GNUTLS_E_SUCCESS) {
|
if (ret == GNUTLS_E_SUCCESS) {
|
||||||
recv->handshake_done = 1;
|
recv->handshake_done = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user