projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f34e79f
)
PR: 2223
author
Dr. Stephen Henson
<steve@openssl.org>
Tue, 6 Apr 2010 12:29:08 +0000
(12:29 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Tue, 6 Apr 2010 12:29:08 +0000
(12:29 +0000)
Submitted By: Robin Seggelmann <seggelmann@fh-muenster.de>
Fixes for DTLS timeout bug
ssl/d1_lib.c
patch
|
blob
|
history
diff --git
a/ssl/d1_lib.c
b/ssl/d1_lib.c
index 63bfbacc8216fbd1b5c65d9e8ba7c5962cc1a99e..54e16403e6e58c4be3de5a584144a941ec5d3693 100644
(file)
--- a/
ssl/d1_lib.c
+++ b/
ssl/d1_lib.c
@@
-305,6
+305,16
@@
struct timeval* dtls1_get_timeout(SSL *s, struct timeval* timeleft)
timeleft->tv_usec += 1000000;
}
+ /* If remaining time is less than 15 ms, set it to 0
+ * to prevent issues because of small devergences with
+ * socket timeouts.
+ */
+ if (timeleft->tv_sec == 0 && timeleft->tv_usec < 15000)
+ {
+ memset(timeleft, 0, sizeof(struct timeval));
+ }
+
+
return timeleft;
}