summaryrefslogtreecommitdiff
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2009-06-07 19:56:18 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2009-06-07 19:56:18 +0000
commit518099af59fbde0e7140459c76f59c9ac24bdf9c (patch)
tree873f9f63931a5d069bbcb053ea49eec4a92802dc /ssl/s3_pkt.c
parentc285625302c2411508052af6f109be9f6b789379 (diff)
Notes
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 72853a2e728f..9476dcddf6e9 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -753,8 +753,15 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
s->rwstate=SSL_NOTHING;
return(s->s3->wpend_ret);
}
- else if (i <= 0)
+ else if (i <= 0) {
+ if (s->version == DTLS1_VERSION ||
+ s->version == DTLS1_BAD_VER) {
+ /* For DTLS, just drop it. That's kind of the whole
+ point in using a datagram service */
+ s->s3->wbuf.left = 0;
+ }
return(i);
+ }
s->s3->wbuf.offset+=i;
s->s3->wbuf.left-=i;
}