[openssl-commits] [openssl] OpenSSL_1_1_1-stable update

matthias.st.pierre at ncp-e.com matthias.st.pierre at ncp-e.com
Wed Nov 21 20:06:19 UTC 2018


The branch OpenSSL_1_1_1-stable has been updated
       via  49fabf6b4d3b53f0f1871be10c5b28e15e7d33d3 (commit)
      from  3ccccb91ae1c07a4310778b3d7ba74ff4ff787f0 (commit)


- Log -----------------------------------------------------------------
commit 49fabf6b4d3b53f0f1871be10c5b28e15e7d33d3
Author: Matthew Hodgson <matthew at matrix.org>
Date:   Wed Nov 21 02:00:52 2018 +0000

    openssl s_server: don't use sendto() with connected UDP socket
    
    Fixes #7675
    
    On macOS, if you call `connect()` on a UDP socket you cannot then
    call `sendto()` with a destination, otherwise it fails with Err#56
    ('socket is already connected').
    
    By calling `BIO_ctrl_set_connected()` on the wbio we can tell it
    that the socket has been connected and make it call `send()` rather
    than `sendto()`.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
    (Merged from https://github.com/openssl/openssl/pull/7676)
    
    (cherry picked from commit b92678f4e94eeec468f194333f874906a6fff7f1)

-----------------------------------------------------------------------

Summary of changes:
 apps/s_server.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/s_server.c b/apps/s_server.c
index ac7dca6..15b4b43 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -2754,6 +2754,8 @@ static int init_ssl_connection(SSL *con)
                     BIO_ADDR_free(client);
                     return 0;
                 }
+
+                (void)BIO_ctrl_set_connected(wbio, client);
                 BIO_ADDR_free(client);
                 dtlslisten = 0;
             } else {


More information about the openssl-commits mailing list