Fix problem with SCTP close_notify alerts
authorMatt Caswell <matt@openssl.org>
Fri, 21 Apr 2017 15:56:06 +0000 (16:56 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 25 Apr 2017 13:04:13 +0000 (14:04 +0100)
commitb651a05d261530923c4d1f8f464a91c50602d3ea
tree61bd6950c6f88e1da6a4319e45cdaa4d0b472bb1
parent22ae579bea93c0a426bacb764783e0e2cf35c14c
Fix problem with SCTP close_notify alerts

In SCTP the code was only allowing a send of a close_notify alert if the
socket is dry. If the socket isn't dry then it was attempting to save away
the close_notify alert to resend later when it is dry and then it returned
success. However because the application then thinks that the close_notify
alert has been successfully sent it never re-enters the DTLS code to
actually resend the alert. A much simpler solution is to just fail with a
retryable error in the event that the socket isn't dry. That way the
application knows to retry sending the close_notify alert.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3287)
crypto/bio/bss_dgram.c