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/11/01 17:36:32 UTC

[trafficserver] branch 7.1.x updated: Treat SSL_ERROR_SSL as EPIPE within SSLNetVC::load_buffer_and_write()

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

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


The following commit(s) were added to refs/heads/7.1.x by this push:
     new fb8e0b2  Treat SSL_ERROR_SSL as EPIPE within SSLNetVC::load_buffer_and_write()
fb8e0b2 is described below

commit fb8e0b2af9effe5b28f757527611e7a39f841901
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Wed Nov 1 15:33:04 2017 +0800

    Treat SSL_ERROR_SSL as EPIPE within SSLNetVC::load_buffer_and_write()
    
    Compare to the SSLNetVC::ssl_read_from_net, it return `SSL_READ_ERROR`
    if sslErr is `SSL_ERROR_SSL`, but the SSLNetVC::load_buffer_and_write
    does not change the result (num_really_written).
    
    This closes #2705
    
    (cherry picked from commit 1f07ce35880ed6ed7722c62ac9a76ed2859b4cdf)
---
 iocore/net/SSLNetVConnection.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 2ebe79a..086cfe5 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -795,7 +795,8 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor &buf
       ERR_error_string_n(e, buf, sizeof(buf));
       TraceIn(trace, get_remote_addr(), get_remote_port(), "SSL Error: sslErr=%d, ERR_get_error=%ld (%s) errno=%d", err, e, buf,
               errno);
-      num_really_written = -errno;
+      // Treat SSL_ERROR_SSL as EPIPE error.
+      num_really_written = -EPIPE;
       SSL_CLR_ERR_INCR_DYN_STAT(this, ssl_error_ssl, "SSL_write-SSL_ERROR_SSL errno=%d", errno);
     } break;
     }

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