summaryrefslogtreecommitdiff
path: root/lib/state.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-03-30 11:37:49 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-03-31 13:28:42 +0200
commitcd24f9ec69d714853b5f04a600e7670dd463dc9a (patch)
tree54c7f26402eb59bd4529d60135f97e7b86158a1e /lib/state.c
parente2c9f4b7d9f09861b913d048b3253e60e0f204a8 (diff)
downloadgnutls-cd24f9ec69d714853b5f04a600e7670dd463dc9a.tar.gz
dtls: reset the record number sliding window on gnutls_record_set_state()
This addresses issue where gnutls_record_set_state() was called with a new state but the sliding window information was not updated, thus blocking any incoming packets. Resolves #82
Diffstat (limited to 'lib/state.c')
-rw-r--r--lib/state.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/state.c b/lib/state.c
index f7d8925782..54c77598cd 100644
--- a/lib/state.c
+++ b/lib/state.c
@@ -1330,6 +1330,11 @@ gnutls_record_set_state(gnutls_session_t session,
record_state = &record_params->write;
memcpy(UINT64DATA(record_state->sequence_number), seq_number, 8);
+
+ if (IS_DTLS(session)) {
+ _dtls_reset_window(session, seq_number);
+ }
+
return 0;
}