Skip to content

Commit 18df045

Browse files
masaori335zwoop
authored andcommitted
Increment ssl_error_syscall only if not EOF (#7225)
(cherry picked from commit fef47d7)
1 parent acd0ac0 commit 18df045

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

doc/admin-guide/monitoring/statistics/core/ssl.en.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ SSL/TLS
7474
The number of SSL connections to origin servers which were terminated due to
7575
unsupported SSL/TLS protocol versions, since statistics collection began.
7676

77-
.. ts:stat:: global proxy.process.ssl.ssl_error_read_eos integer
78-
:type: counter
79-
8077
.. ts:stat:: global proxy.process.ssl.ssl_error_ssl integer
8178
:type: counter
8279

@@ -224,4 +221,3 @@ SSL/TLS
224221

225222
Incoming client SSL connections terminated due to an unsupported or disabled
226223
version of SSL/TLS, since statistics collection began.
227-

iocore/net/SSLNetVConnection.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,14 @@ ssl_read_from_net(SSLNetVConnection *sslvc, EThread *lthread, int64_t &ret)
306306
Debug("ssl.error", "SSL_ERROR_WOULD_BLOCK(read/x509 lookup)");
307307
break;
308308
case SSL_ERROR_SYSCALL:
309-
SSL_INCREMENT_DYN_STAT(ssl_error_syscall);
310309
if (nread != 0) {
311310
// not EOF
311+
SSL_INCREMENT_DYN_STAT(ssl_error_syscall);
312312
event = SSL_READ_ERROR;
313313
ret = errno;
314314
Debug("ssl.error", "SSL_ERROR_SYSCALL, underlying IO error: %s", strerror(errno));
315315
} else {
316316
// then EOF observed, treat it as EOS
317-
// Error("[SSL_NetVConnection::ssl_read_from_net] SSL_ERROR_SYSCALL, EOF observed violating SSL protocol");
318317
event = SSL_READ_EOS;
319318
}
320319
break;

iocore/net/SSLStats.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ SSLInitializeStatistics()
184184
// error stats
185185
RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.ssl_error_syscall", RECD_COUNTER, RECP_PERSISTENT,
186186
(int)ssl_error_syscall, RecRawStatSyncCount);
187-
RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.ssl_error_read_eos", RECD_COUNTER, RECP_PERSISTENT,
188-
(int)ssl_error_read_eos, RecRawStatSyncCount);
189187
RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.ssl_error_ssl", RECD_COUNTER, RECP_PERSISTENT, (int)ssl_error_ssl,
190188
RecRawStatSyncCount);
191189
RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.ssl_sni_name_set_failure", RECD_COUNTER, RECP_PERSISTENT,

iocore/net/SSLStats.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ enum SSL_Stats {
8888

8989
/* error stats */
9090
ssl_error_syscall,
91-
ssl_error_read_eos,
9291
ssl_error_ssl,
9392
ssl_sni_name_set_failure,
9493
ssl_total_attempts_handshake_count_out_stat,

0 commit comments

Comments
 (0)