You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/02/16 20:53:11 UTC

[trafficserver] branch 7.1.x updated (2cf8c5c -> f4e4efc)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

      from  2cf8c5c   Mark the new span metrics as gauges in Epic plugin
       new  04958cd   BoringSSL doesn't have BIO_sock_non_fatal_error()
       new  f4e4efc   Add BIO_sock_non_fatal_error() attribution

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 NOTICE                     |  6 +++++
 configure.ac               |  1 +
 iocore/net/BIO_fastopen.cc | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].

[trafficserver] 01/02: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 04958cdf49e4f3a8b87cd84ac616b7d95d6f34b6
Author: Jack Bates <ja...@nottheoilrig.com>
AuthorDate: Fri Feb 10 11:04:02 2017 -0700

    BoringSSL doesn't have BIO_sock_non_fatal_error()
    
    Fixes #1437
    
    (cherry picked from commit 2011c40429ff638dabe21acd0db31c83296b4b13)
---
 configure.ac               |  1 +
 iocore/net/BIO_fastopen.cc | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/configure.ac b/configure.ac
index 34c6037..33b3e9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1133,6 +1133,7 @@ TS_ADDTO([LIBS], ["$OPENSSL_LIBS"])
 
 AC_CHECK_FUNCS([ \
   BIO_meth_new \
+  BIO_sock_non_fatal_error \
   CRYPTO_set_mem_functions \
   HMAC_CTX_new \
 ])
diff --git a/iocore/net/BIO_fastopen.cc b/iocore/net/BIO_fastopen.cc
index 3e8095d..c8ed12b 100644
--- a/iocore/net/BIO_fastopen.cc
+++ b/iocore/net/BIO_fastopen.cc
@@ -27,6 +27,67 @@
 
 #include "BIO_fastopen.h"
 
+// For BoringSSL, which for some reason doesn't have this function.
+// (In BoringSSL, sock_read() and sock_write() use the internal
+// bio_fd_non_fatal_error() instead.) #1437
+//
+// The following is copied from
+// https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
+#ifndef HAVE_BIO_SOCK_NON_FATAL_ERROR
+int
+BIO_sock_non_fatal_error(int err)
+{
+  switch (err) {
+#if defined(OPENSSL_SYS_WINDOWS)
+#if defined(WSAEWOULDBLOCK)
+  case WSAEWOULDBLOCK:
+#endif
+#endif
+
+#ifdef EWOULDBLOCK
+#ifdef WSAEWOULDBLOCK
+#if WSAEWOULDBLOCK != EWOULDBLOCK
+  case EWOULDBLOCK:
+#endif
+#else
+  case EWOULDBLOCK:
+#endif
+#endif
+
+#if defined(ENOTCONN)
+  case ENOTCONN:
+#endif
+
+#ifdef EINTR
+  case EINTR:
+#endif
+
+#ifdef EAGAIN
+#if EWOULDBLOCK != EAGAIN
+  case EAGAIN:
+#endif
+#endif
+
+#ifdef EPROTO
+  case EPROTO:
+#endif
+
+#ifdef EINPROGRESS
+  case EINPROGRESS:
+#endif
+
+#ifdef EALREADY
+  case EALREADY:
+#endif
+    return (1);
+  /* break; */
+  default:
+    break;
+  }
+  return (0);
+}
+#endif
+
 static int (*fastopen_create)(BIO *) = BIO_meth_get_create(const_cast<BIO_METHOD *>(BIO_s_socket()));
 
 static int

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 02/02: Add BIO_sock_non_fatal_error() attribution

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit f4e4efc9c5777fabba1154eb7c6d7c1617683bbd
Author: Jack Bates <ja...@nottheoilrig.com>
AuthorDate: Sun Feb 12 09:15:00 2017 -0700

    Add BIO_sock_non_fatal_error() attribution
    
    Fixes #1437
    
    (cherry picked from commit d6afcd916ccd918e9ae040d375a3a1250b05c548)
---
 NOTICE | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/NOTICE b/NOTICE
index 5feedac..27b4560 100644
--- a/NOTICE
+++ b/NOTICE
@@ -103,3 +103,9 @@ Copyright 2014 Google Inc. All Rights Reserved.
 
 plugins/experimental/memcache/protocol_binary.h developed by Sun Microsystems, Inc.
 Copyright (c) <2008>, Sun Microsystems, Inc.  All rights reserved.
+
+~~
+
+BIO_sock_non_fatal_error() is copied from
+https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
+Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.