[trafficserver] branch maskit/quic deleted (was 5022022)
This is an automated email from the ASF dual-hosted git repository. masaori pushed a change to branch maskit/quic in repository https://gitbox.apache.org/repos/asf/trafficserver.git. was 5022022 Cleanup QUICStream This change permanently discards the following revisions: discard 5022022 Cleanup QUICStream discard 3f61d3a Add tests for QUICStream and fix bug discard 5ebd73f Add test of QUICPacket::payload_size() discard 39ac776 Fix QUICPacket test discard 9f1c05a Add quic/Makefile.am discard 9c5be30 Rename read_signal/write_signal to trigger_read_event/trigger_write_event discard 5f192f9 Use read_vio/write_vio of QUICStream discard a0294d3 Add QUICPacket::payload_size() discard f233661 Change pSendQueue to Queue discard a63ade2 Fix Makefile.am discard 45c6f2f Use QUICPacket and QUICFrame discard 16a154c Add test_QUICFrameHandler discard 0d0991e Add QUICFrame discard 9307c87 clang-format discard 1f5c7ed Fix warnings discard 37d385f Rename proxy/quic to proxy/hq discard e3d0c5d Rebased latest master and remove QUICProxyClientSession discard 8c43ef7 Rename QUICNetAccept to QUICPacketHandler discard 15dbbf1 Change class names and fix QUICEchoApp discard fd297fa Remove binary and add sourcecodes instead discard 0ea8c79 add more tests and fix QUICPacket impl discard 228921c Add packet build function discard 9b867c4 implement quic packet 02 discard 85a71c2 Add QUICPacketManager discard bc448eb Add QUICEchoApp discard b9bac75 Parse QUIC packet payload & Collect Stream Frame DATA discard b0975ea Echo from QuicClientSession discard 5c8c44a Add QuicClientSession [DOESN'T WORK] discard 9b351a3 Emits ACCEPT event discard 630ded1 Move QuicSessionAccept to proxy/quic/ discard 762876e Move the echo logic into QUICNetVConnection discard d08ad01 Try to create VNetConnection. discard 9f2b6d8 Move the low layer implementation into iocore discard b92b75a Open an UDP socket -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org"'].
[trafficserver] branch master updated: Remove a redundant access specifier
This is an automated email from the ASF dual-hosted git repository. maskit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 0d7a530 Remove a redundant access specifier 0d7a530 is described below commit 0d7a5309181d69596b2cd721a954effc18e04fd4 Author: Masakazu KitajoAuthorDate: Tue Jun 6 10:23:38 2017 +0900 Remove a redundant access specifier --- proxy/ProxyClientTransaction.h | 1 - 1 file changed, 1 deletion(-) diff --git a/proxy/ProxyClientTransaction.h b/proxy/ProxyClientTransaction.h index b5735f8..7583f2e 100644 --- a/proxy/ProxyClientTransaction.h +++ b/proxy/ProxyClientTransaction.h @@ -256,7 +256,6 @@ public: } protected: -protected: ProxyClientSession *parent; HttpSM *current_reader; IOBufferReader *sm_reader; -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated (a6c14f0 -> da1ce2c)
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from a6c14f0 Move where the HttpSM setup for redirect before going to origin new cd4d6b4 Refactor ProcessManager to stop the poll thread. new 6bcfa08 Simplify ProcessManager message and shutdown handling. new 8c4a0ea Wake the process manager thread on shutdown. new 693839a Improve graceful shutdown. new c696cb3 Document traffic_server signals. new da1ce2c Revert "Add logic to flush gcov data from traffic_server on interrupt." The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: configure.ac | 4 +- doc/appendices/command-line/traffic_server.en.rst | 22 ++ lib/ts/ink_config.h.in| 1 - lib/ts/ink_thread.h | 6 + mgmt/BaseManager.cc | 3 +- mgmt/ProcessManager.cc| 270 +++--- mgmt/ProcessManager.h | 58 ++--- proxy/Main.cc | 120 +- 8 files changed, 290 insertions(+), 194 deletions(-) -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org"'].
[trafficserver] 05/06: Document traffic_server signals.
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit c696cb3df9a77902bf5d1cdb279c5ccb2314e0bc Author: James PeachAuthorDate: Wed May 17 22:30:13 2017 -0700 Document traffic_server signals. --- doc/appendices/command-line/traffic_server.en.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/doc/appendices/command-line/traffic_server.en.rst b/doc/appendices/command-line/traffic_server.en.rst index 43c0c3c..077ba97 100644 --- a/doc/appendices/command-line/traffic_server.en.rst +++ b/doc/appendices/command-line/traffic_server.en.rst @@ -97,4 +97,26 @@ Environment .. envvar:: PROXY_REMOTE_MGMT +This environment variable forces :program:`traffic_server` to believe that it is being managed by +:program:`traffic_manager`. + .. envvar:: PROXY_AUTO_EXIT + +When this environment variable is set to an integral number of +seconds, :program:`traffic_server` will exit that many seconds after +startup. This is primarily useful for testing. + +Signals +=== + +On `SIGTERM`, :program:`traffic_server` exits. + +On `SIGUSR1`, :program:`traffic_server` logs its current memory usage. + +On `SIGUSR2`, :program:`traffic_server` re-opens its standard error and standard out file descriptors. + +See also + + +:manpage:`traffic_ctl(8)`, +:manpage:`traffic_manager(8)` -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" .
[trafficserver] 02/06: Simplify ProcessManager message and shutdown handling.
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 6bcfa0888a996cd2d8523e422a0508c0ba2441a3 Author: James PeachAuthorDate: Wed May 24 22:49:29 2017 -0700 Simplify ProcessManager message and shutdown handling. Simplify ProcessManager message handling to make it clearer when we are stopping and wen we are dealing with a process manager error pumping messages to traffic_manager. We do this by hoisting the message reading cose into a helper function that just deals with reading the data, and propagating the error up to the manager thread. At that point, we can more easily know whether we are shutting down or not. --- mgmt/BaseManager.cc| 3 +- mgmt/ProcessManager.cc | 170 +++-- mgmt/ProcessManager.h | 8 +-- 3 files changed, 101 insertions(+), 80 deletions(-) diff --git a/mgmt/BaseManager.cc b/mgmt/BaseManager.cc index 25eede8..7dab2aa 100644 --- a/mgmt/BaseManager.cc +++ b/mgmt/BaseManager.cc @@ -145,7 +145,8 @@ BaseManager::signalMgmtEntity(int msg_id, char *data_raw, int data_len) mh->msg_id = msg_id; mh->data_len = 0; } - ink_assert(enqueue(mgmt_event_queue, mh)); + + ink_release_assert(enqueue(mgmt_event_queue, mh)); return msg_id; } /* End BaseManager::signalMgmtEntity */ diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc index 7c5c4ea..f4616f3 100644 --- a/mgmt/ProcessManager.cc +++ b/mgmt/ProcessManager.cc @@ -36,6 +36,61 @@ */ inkcoreapi ProcessManager *pmgmt = nullptr; +// read_management_message attempts to read a message from the management +// socket. Returns -errno on error, otherwise 0. If a message was read the +// *msg pointer will be filled in with the message that was read. +static int +read_management_message(int sockfd, ink_hrtime timeout, MgmtMessageHdr **msg) +{ + MgmtMessageHdr hdr; + int ret; + + *msg = nullptr; + + switch (mgmt_read_timeout(sockfd, ink_hrtime_to_sec(timeout), 0 /* usec */)) { + case 0: +// Timed out. +return 0; + case -1: +return -errno; + } + + // We have a message, try to read the message header. + ret = mgmt_read_pipe(sockfd, reinterpret_cast(), sizeof(MgmtMessageHdr)); + switch (ret) { + case 0: +// Received EOF. +return 0; + case sizeof(MgmtMessageHdr): +break; + default: +// Received -errno. +return ret; + } + + size_t msg_size = sizeof(MgmtMessageHdr) + hdr.data_len; + MgmtMessageHdr *full_msg = (MgmtMessageHdr *)ats_malloc(msg_size); + + memcpy(full_msg, , sizeof(MgmtMessageHdr)); + char *data_raw = reinterpret_cast(full_msg) + sizeof(MgmtMessageHdr); + + ret = mgmt_read_pipe(sockfd, data_raw, hdr.data_len); + if (ret == 0) { +// Received EOF. +ats_free(full_msg); +return 0; + } else if (ret < 0) { +// Received -errno. +ats_free(full_msg); +return ret; + } else { +ink_release_assert(ret == hdr.data_len); +// Received the message. +*msg = full_msg; +return 0; + } +} + void ProcessManager::start(std::function const ) { @@ -94,13 +149,28 @@ ProcessManager::processManagerThread(void *arg) pmgmt->init(); } + // Start pumping messages between the local process and the process + // manager. This will terminate when the process manager terminates + // or the local process calls stop(). In either case, it is likely + // that we will first notice because we got a socket error, but in + // the latter case, the `running` flag has already been toggled so + // we know that we are really doing a shutdown. while (pmgmt->running) { +int ret; + if (pmgmt->require_lm) { - pmgmt->pollLMConnection(); + ret = pmgmt->pollLMConnection(); + if (ret < 0 && pmgmt->running) { +Alert("exiting with read error from process manager: %s", strerror(-ret)); + } } pmgmt->processEventQueue(); -pmgmt->processSignalQueue(); +ret = pmgmt->processSignalQueue(); +if (ret < 0 && pmgmt->running) { + Alert("exiting with write error from process manager: %s", strerror(-ret)); +} + mgmt_sleep_sec(pmgmt->timeout); } @@ -198,25 +268,25 @@ ProcessManager::processEventQueue() return ret; } -bool +int ProcessManager::processSignalQueue() { - bool ret = false; - while (!queue_is_empty(mgmt_signal_queue)) { MgmtMessageHdr *mh = (MgmtMessageHdr *)dequeue(mgmt_signal_queue); Debug("pmgmt", "signaling local manager with message ID %d", mh->msg_id); -if (require_lm && mgmt_write_pipe(local_manager_sockfd, (char *)mh, sizeof(MgmtMessageHdr) + mh->data_len) <= 0) { - Fatal("error writing message: %s", strerror(errno)); -} else { +if (require_lm) { + int ret = mgmt_write_pipe(local_manager_sockfd, (char *)mh, sizeof(MgmtMessageHdr) + mh->data_len); ats_free(mh); -
[trafficserver] 01/06: Refactor ProcessManager to stop the poll thread.
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit cd4d6b4ddf475c2b019cb57100765cdbde9ca786 Author: James PeachAuthorDate: Sun May 21 11:09:08 2017 -0700 Refactor ProcessManager to stop the poll thread. Clean up the ProcessManager so remove use of mgmt_log. Refactor to improve comment and code legibility. Move the code to tear down the message queue from the destructor into the stop() function, and capture the poll thread so that we can join it and stop the manager relatively gracefully. --- mgmt/ProcessManager.cc | 199 + mgmt/ProcessManager.h | 50 - 2 files changed, 151 insertions(+), 98 deletions(-) diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc index 128711f..7c5c4ea 100644 --- a/mgmt/ProcessManager.cc +++ b/mgmt/ProcessManager.cc @@ -36,19 +36,56 @@ */ inkcoreapi ProcessManager *pmgmt = nullptr; +void +ProcessManager::start(std::function const ) +{ + Debug("pmgmt", "starting process manager"); + + init = cb; + + ink_release_assert(running == 0); + ink_atomic_increment(, 1); + poll_thread = ink_thread_create(processManagerThread, NULL, 0, 0, NULL); +} + +void +ProcessManager::stop() +{ + Debug("pmgmt", "stopping process manager"); + + ink_release_assert(running == 1); + ink_atomic_decrement(, 1); + + int tmp = local_manager_sockfd; + + local_manager_sockfd = -1; + close_socket(tmp); + + ink_thread_join(poll_thread); + poll_thread = ink_thread_null(); + + while (!queue_is_empty(mgmt_signal_queue)) { +char *sig = (char *)dequeue(mgmt_signal_queue); +ats_free(sig); + } + + ats_free(mgmt_signal_queue); +} + /* - * startProcessManager(...) + * processManagerThread(...) * The start function and thread loop for the process manager. */ void * -startProcessManager(void *arg) +ProcessManager::processManagerThread(void *arg) { void *ret = arg; while (!pmgmt) { /* Avert race condition, thread spun during constructor */ -Debug("pmgmt", "[startProcessManager] Waiting for initialization of object..."); +Debug("pmgmt", "waiting for initialization"); mgmt_sleep_sec(1); } + if (pmgmt->require_lm) { /* Allow p. process to run w/o a lm */ pmgmt->initLMConnection(); } @@ -57,22 +94,21 @@ startProcessManager(void *arg) pmgmt->init(); } - for (;;) { -if (unlikely(shutdown_event_system == true)) { - return nullptr; -} + while (pmgmt->running) { if (pmgmt->require_lm) { pmgmt->pollLMConnection(); } + pmgmt->processEventQueue(); pmgmt->processSignalQueue(); mgmt_sleep_sec(pmgmt->timeout); } + return ret; -} /* End startProcessManager */ +} ProcessManager::ProcessManager(bool rlm) - : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(nullptr), max_msgs_in_a_row(1) + : BaseManager(), require_lm(rlm), pid(getpid()), local_manager_sockfd(0), cbtable(nullptr), max_msgs_in_a_row(1) { mgmt_signal_queue = create_queue(); @@ -80,19 +116,25 @@ ProcessManager::ProcessManager(bool rlm) // Making the process_manager thread a spinning thread to start traffic server // as quickly as possible. Will reset this timeout when reconfigure() timeout = 0; - pid = getpid(); -} /* End ProcessManager::ProcessManager */ +} + +ProcessManager::~ProcessManager() +{ + if (running) { +stop(); + } +} void ProcessManager::reconfigure() { - bool found; max_msgs_in_a_row = MAX_MSGS_IN_A_ROW; - timeout = REC_readInteger("proxy.config.process_manager.timeout", ); - ink_assert(found); - return; -} /* End ProcessManager::reconfigure */ + if (RecGetRecordInt("proxy.config.process_manager.timeout", ) != REC_ERR_OKAY) { +// Default to 5sec if the timeout is unspecified. +timeout = 5; + } +} void ProcessManager::signalConfigFileChild(const char *parent, const char *child, unsigned int options) @@ -100,8 +142,9 @@ ProcessManager::signalConfigFileChild(const char *parent, const char *child, uns static const MgmtMarshallType fields[] = {MGMT_MARSHALL_STRING, MGMT_MARSHALL_STRING, MGMT_MARSHALL_INT}; MgmtMarshallInt mgmtopt = options; - size_t len = mgmt_message_length(fields, countof(fields), , , ); - void *buffer= ats_malloc(len); + + size_t len = mgmt_message_length(fields, countof(fields), , , ); + void *buffer = ats_malloc(len); mgmt_message_marshall(buffer, len, fields, countof(fields), , , ); signalManager(MGMT_SIGNAL_CONFIG_FILE_CHILD, (const char *)buffer, len); @@ -113,8 +156,7 @@ void ProcessManager::signalManager(int msg_id, const char *data_str) { signalManager(msg_id, data_str, strlen(data_str) + 1); - return; -} /* End ProcessManager::signalManager */ +} void ProcessManager::signalManager(int msg_id, const char
[trafficserver] 03/06: Wake the process manager thread on shutdown.
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 8c4a0eae65d9a49ef3017afa6e593417fb2be9a3 Author: James PeachAuthorDate: Wed May 24 23:00:15 2017 -0700 Wake the process manager thread on shutdown. If we are trying to stop the ProcessManager, the poll thread might be sleeping, so we now send it SIGINT to break the sleep. This causes it to notice that it should no longer be running earlier. --- lib/ts/ink_thread.h| 6 ++ mgmt/ProcessManager.cc | 1 + 2 files changed, 7 insertions(+) diff --git a/lib/ts/ink_thread.h b/lib/ts/ink_thread.h index a5baffd..501170f 100644 --- a/lib/ts/ink_thread.h +++ b/lib/ts/ink_thread.h @@ -213,6 +213,12 @@ ink_thread_sigsetmask(int how, const sigset_t *set, sigset_t *oset) return (pthread_sigmask(how, set, oset)); } +static inline int +ink_thread_kill(ink_thread t, int sig) +{ + return pthread_kill(t, sig); +} + /*** * Posix Semaphores **/ diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc index f4616f3..663f206 100644 --- a/mgmt/ProcessManager.cc +++ b/mgmt/ProcessManager.cc @@ -115,6 +115,7 @@ ProcessManager::stop() local_manager_sockfd = -1; close_socket(tmp); + ink_thread_kill(poll_thread, SIGINT); ink_thread_join(poll_thread); poll_thread = ink_thread_null(); -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" .
[trafficserver] 04/06: Improve graceful shutdown.
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 693839a31e6e3839146f4d8aa80cd0a237a51db3 Author: James PeachAuthorDate: Wed May 17 21:58:15 2017 -0700 Improve graceful shutdown. Rather than sleeping in a signal handler, unify the signal handling so that we always bounce the actual work up to the SignalContinuation. Once we are there, then we can send a timed event to shutdown after the timeot, or just cause a normal shutdown immediately. On the exit path, stop the ProcessManager to keep the integration tests happy. --- proxy/Main.cc | 111 ++ 1 file changed, 58 insertions(+), 53 deletions(-) diff --git a/proxy/Main.cc b/proxy/Main.cc index 4242c6e..7512bfe 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -169,10 +169,7 @@ static int cmd_line_dprintf_level = 0; // default debug output level from ink_d static int poll_timeout = -1; // No value set. static int cmd_disable_freelist = 0; -static int shutdown_timeout = 0; - -static volatile bool sigusr1_received = false; -static volatile bool sigusr2_received = false; +static volatile bool signal_received[NSIG]; // 1: delay listen, wait for cache. // 0: Do not delay, start listen ASAP. @@ -218,14 +215,25 @@ static ArgumentDescription argument_descriptions[] = { {"accept_mss", '-', "MSS for client connections", "I", _mss, nullptr, nullptr}, {"poll_timeout", 't', "poll timeout in milliseconds", "I", _timeout, nullptr, nullptr}, HELP_ARGUMENT_DESCRIPTION(), - VERSION_ARGUMENT_DESCRIPTION()}; + VERSION_ARGUMENT_DESCRIPTION(), +}; + +struct AutoStopCont : public Continuation { + int + mainEvent(int /* event */, Event * /* e */) + { +pmgmt->stop(); +shutdown_event_system = true; +delete this; +return EVENT_CONT; + } + + AutoStopCont() : Continuation(new_ProxyMutex()) { SET_HANDLER(::mainEvent); } +}; class SignalContinuation : public Continuation { public: - char *end; - char *snap; - SignalContinuation() : Continuation(new_ProxyMutex()) { end = snap = nullptr; @@ -235,36 +243,59 @@ public: int periodic(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */) { -if (sigusr1_received) { - sigusr1_received = false; +if (signal_received[SIGUSR1]) { + signal_received[SIGUSR1] = false; // TODO: TS-567 Integrate with debugging allocators "dump" features? ink_freelists_dump(stderr); ResourceTracker::dump(stderr); + if (!end) { end = (char *)sbrk(0); } + if (!snap) { snap = (char *)sbrk(0); } + char *now = (char *)sbrk(0); - // TODO: Use logging instead directly writing to stderr - // This is not error condition at the first place - // so why stderr? - // - fprintf(stderr, "sbrk 0x%" PRIu64 " from first %" PRIu64 " from last %" PRIu64 "\n", (uint64_t)((ptrdiff_t)now), - (uint64_t)((ptrdiff_t)(now - end)), (uint64_t)((ptrdiff_t)(now - snap))); + Note("sbrk 0x%" PRIu64 " from first %" PRIu64 " from last %" PRIu64 "\n", (uint64_t)((ptrdiff_t)now), + (uint64_t)((ptrdiff_t)(now - end)), (uint64_t)((ptrdiff_t)(now - snap))); snap = now; -} else if (sigusr2_received) { - sigusr2_received = false; +} + +if (signal_received[SIGUSR2]) { + signal_received[SIGUSR2] = false; + Debug("log", "received SIGUSR2, reloading traffic.out"); + // reload output logfile (file is usually called traffic.out) diags->set_stdout_output(bind_stdout); diags->set_stderr_output(bind_stderr); } +if (signal_received[SIGTERM]) { + signal_received[SIGTERM] = false; + + RecInt timeout = 0; + REC_ReadConfigInteger(timeout, "proxy.config.stop.shutdown_timeout"); + + if (timeout) { +http2_drain = true; + } + + Debug("server", "received SIGTERM, shutting down in %" PRId64 "secs", timeout); + + // Shutdown in `timeout` seconds (or now if that is 0). + eventProcessor.schedule_in(new AutoStopCont(), HRTIME_SECONDS(timeout)); +} + return EVENT_CONT; } + +private: + const char *end; + const char *snap; }; class TrackerContinuation : public Continuation @@ -431,14 +462,16 @@ init_memory_tracker(const char *config_var, RecDataT /* type ATS_UNUSED */, RecD static void proxy_signal_handler(int signo, siginfo_t *info, void *ctx) { + if ((unsigned)signo < countof(signal_received)) { +signal_received[signo] = true; + } + + // These signals are all handled by SignalContinuation. switch (signo) { case SIGUSR1: -sigusr1_received = true; -return; case SIGUSR2: -sigusr2_received = true; -return; case SIGHUP: + case SIGTERM: return; } @@ -459,14 +492,6 @@
[trafficserver] 06/06: Revert "Add logic to flush gcov data from traffic_server on interrupt."
This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit da1ce2c294889aca5b2b615102bb8ca8ec9bc3f4 Author: James PeachAuthorDate: Sun Jun 4 11:50:51 2017 -0700 Revert "Add logic to flush gcov data from traffic_server on interrupt." This reverts commit 1f54cf0c41d3bcb09f4759ccbee509d14ec1ded9. We no longer need to explicitly flush coverage data, because we don't _exit(2) from signal handler any more. --- configure.ac | 4 +--- lib/ts/ink_config.h.in | 1 - proxy/Main.cc | 9 - 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 2c5c518..1c21488 100644 --- a/configure.ac +++ b/configure.ac @@ -176,15 +176,13 @@ AC_ARG_ENABLE([mime-sanity-check], AC_MSG_RESULT([$enable_mime_sanity_check]) # Enable code coverage instrumentation only if requested by the user. -use_gcov=0 AC_MSG_CHECKING([whether to code coverage]) AC_ARG_ENABLE([coverage], [AS_HELP_STRING([--enable-coverage],[generate code coverage instrumentation])], - [use_gcov=1], + [], [enable_coverage=no] ) AC_MSG_RESULT([$enable_coverage]) -AC_SUBST(use_gcov) # # Enable -Werror. We want this enabled by default for developers, but disabled by default diff --git a/lib/ts/ink_config.h.in b/lib/ts/ink_config.h.in index ec58faa..79b2c00 100644 --- a/lib/ts/ink_config.h.in +++ b/lib/ts/ink_config.h.in @@ -58,7 +58,6 @@ #define TS_HAS_IN6_IS_ADDR_UNSPECIFIED @has_in6_is_addr_unspecified@ #define TS_HAS_BACKTRACE @has_backtrace@ #define TS_HAS_PROFILER @has_profiler@ -#define TS_USE_GCOV @use_gcov@ #define TS_USE_FAST_SDK @use_fast_sdk@ #define TS_USE_DIAGS @use_diags@ #define TS_USE_EPOLL @use_epoll@ diff --git a/proxy/Main.cc b/proxy/Main.cc index 7512bfe..96c9f05 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -91,7 +91,6 @@ extern "C" int plock(int); #include "I_Tasks.h" #include "InkAPIInternal.h" #include "HTTP2.h" -#include "ts/ink_config.h" #include @@ -100,10 +99,6 @@ extern "C" int plock(int); #include #endif -#if TS_USE_GCOV -extern "C" void __gcov_flush(); -#endif - // // Global Data // @@ -483,10 +478,6 @@ proxy_signal_handler(int signo, siginfo_t *info, void *ctx) ProfilerStop(); #endif -#if TS_USE_GCOV - __gcov_flush(); -#endif - // We don't expect any crashing signals here because, but // forward to the default handler just to be robust. if (signal_is_crash(signo)) { -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" .
[trafficserver] branch 7.1.x updated: Ran clang-tidy with modernize-redundant-void-arg
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 2e9a0df Ran clang-tidy with modernize-redundant-void-arg 2e9a0df is described below commit 2e9a0dffcd6449ea2dcf20c1f4aa3d46a6b3d021 Author: Bryan CallAuthorDate: Mon Jun 5 11:21:03 2017 -0700 Ran clang-tidy with modernize-redundant-void-arg --- cmd/traffic_cop/traffic_cop.cc | 6 +++--- iocore/aio/AIO.cc| 2 +- iocore/aio/test_AIO.cc | 2 +- iocore/cache/CacheDir.cc | 2 +- iocore/cluster/ClusterProcessor.cc | 2 +- iocore/net/Connection.cc | 2 +- iocore/net/Net.cc| 2 +- iocore/net/OCSPStapling.cc | 2 +- iocore/net/SSLConfig.cc | 2 +- iocore/net/SSLNetProcessor.cc| 2 +- iocore/net/UnixUDPNet.cc | 4 ++-- lib/records/RecConfigParse.cc| 2 +- lib/records/RecProcess.cc| 2 +- lib/ts/EventNotify.cc| 10 +- lib/ts/HashFNV.cc| 16 lib/ts/HashMD5.cc| 10 +- lib/ts/HashSip.cc| 8 lib/ts/hugepages.cc | 4 ++-- lib/ts/ink_res_init.cc | 2 +- lib/ts/lockfile.cc | 2 +- mgmt/ProxyConfig.cc | 4 ++-- mgmt/api/APITestCliRemote.cc | 10 +- mgmt/cluster/ClusterCom.cc | 4 ++-- mgmt/utils/MgmtSocket.cc | 2 +- plugins/experimental/inliner/chunk-decoder.cc| 2 +- plugins/experimental/inliner/fetcher.cc | 2 +- plugins/experimental/inliner/html-parser.cc | 2 +- plugins/experimental/inliner/inliner-handler.cc | 6 +++--- plugins/experimental/inliner/ts.cc | 18 +- plugins/experimental/multiplexer/chunk-decoder.cc| 2 +- plugins/experimental/multiplexer/dispatch.cc | 6 +++--- plugins/experimental/multiplexer/fetcher.cc | 2 +- plugins/experimental/multiplexer/original-request.cc | 2 +- plugins/generator/generator.cc | 2 +- proxy/Main.cc| 4 ++-- proxy/http/HttpTransact.cc | 2 +- proxy/http/remap/AclFiltering.cc | 4 ++-- proxy/logging/LogAccessHttp.cc | 6 +++--- proxy/logging/LogField.cc| 2 +- 39 files changed, 83 insertions(+), 83 deletions(-) diff --git a/cmd/traffic_cop/traffic_cop.cc b/cmd/traffic_cop/traffic_cop.cc index 1154062..871c7f6 100644 --- a/cmd/traffic_cop/traffic_cop.cc +++ b/cmd/traffic_cop/traffic_cop.cc @@ -146,7 +146,7 @@ static const char localhost[] = "127.0.0.1"; static void cop_log(int priority, const char *format, ...) TS_PRINTFLIKE(2, 3); -static void get_admin_user(void); +static void get_admin_user(); struct ConfigValue { ConfigValue() : config_type(RECT_NULL), data_type(RECD_NULL) {} @@ -375,7 +375,7 @@ set_alarm_warn() } static void -process_syslog_config(void) +process_syslog_config() { int new_fac; @@ -421,7 +421,7 @@ safe_kill(const char *lockfile_name, const char *pname, bool group) // one 64bit int // static ink_hrtime -milliseconds(void) +milliseconds() { struct timeval now; diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc index 1ce548a..52498dc 100644 --- a/iocore/aio/AIO.cc +++ b/iocore/aio/AIO.cc @@ -131,7 +131,7 @@ AIOTestData::ink_aio_stats(int event, void *d) * Common */ AIOCallback * -new_AIOCallback(void) +new_AIOCallback() { return new AIOCallbackInternal; } diff --git a/iocore/aio/test_AIO.cc b/iocore/aio/test_AIO.cc index a3d427f..b6ec70d 100644 --- a/iocore/aio/test_AIO.cc +++ b/iocore/aio/test_AIO.cc @@ -149,7 +149,7 @@ struct AIO_Device : public Continuation { }; void -dump_summary(void) +dump_summary() { /* dump timing info */ printf("Writing summary info\n"); diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc index 77f3cb3..d5b72a4 100644 --- a/iocore/cache/CacheDir.cc +++ b/iocore/cache/CacheDir.cc @@ -890,7 +890,7 @@ dir_entries_used(Vol *d) */ void -sync_cache_dir_on_shutdown(void) +sync_cache_dir_on_shutdown() { Debug("cache_dir_sync", "sync started"); char *buf = nullptr; diff --git a/iocore/cluster/ClusterProcessor.cc b/iocore/cluster/ClusterProcessor.cc index 2daf504..64e4282
[trafficserver] branch 7.1.x updated: Ran clang-tidy with modernize-loop-convert
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 093decd Ran clang-tidy with modernize-loop-convert 093decd is described below commit 093decd521e3dd5fe0406f522910b4a2313a9ee0 Author: Bryan CallAuthorDate: Sat Jun 3 20:20:21 2017 -0700 Ran clang-tidy with modernize-loop-convert --- cmd/traffic_top/traffic_top.cc | 4 +- iocore/cache/Cache.cc | 10 ++-- iocore/cache/CacheDir.cc | 6 +- iocore/dns/DNS.cc | 18 +++--- lib/bindings/metrics.cc| 4 +- lib/cppapi/utils_internal.cc | 10 ++-- lib/ts/Tokenizer.cc| 8 +-- lib/ts/ink_res_init.cc | 6 +- lib/tsconfig/TsValue.cc| 10 ++-- mgmt/api/EventCallback.cc | 50 mgmt/api/EventControlMain.cc | 12 ++-- mgmt/api/NetworkUtilsRemote.cc | 4 +- plugins/esi/lib/DocNode.cc | 10 ++-- plugins/esi/lib/EsiGunzip.cc | 4 +- plugins/esi/lib/Utils.cc | 4 +- plugins/esi/lib/Variables.cc | 40 ++--- plugins/esi/lib/gzip.cc| 14 ++--- plugins/experimental/cachekey/cachekey.cc | 20 +++ plugins/experimental/cachekey/pattern.cc | 20 +++ plugins/experimental/inliner/html-parser.cc| 10 ++-- plugins/experimental/inliner/inliner-handler.cc| 22 +++ .../ssl_cert_loader/ssl-cert-loader.cc | 18 +++--- plugins/experimental/sslheaders/sslheaders.cc | 16 ++--- plugins/gzip/configuration.cc | 13 ++-- plugins/s3_auth/aws_auth_v4.cc | 28 - proxy/IPAllow.cc | 15 +++-- proxy/hdrs/HdrHeap.cc | 55 + proxy/hdrs/URL.cc | 18 +++--- proxy/http/HttpPages.cc| 44 +++--- proxy/http/HttpTunnel.cc | 38 ++-- proxy/http/remap/AclFiltering.cc | 4 +- proxy/http/remap/UrlMappingPathIndex.cc| 8 +-- proxy/http2/RegressionHPACK.cc | 70 +- proxy/http2/test_Huffmancode.cc| 16 ++--- proxy/logging/LogFilter.cc | 4 +- 35 files changed, 306 insertions(+), 327 deletions(-) diff --git a/cmd/traffic_top/traffic_top.cc b/cmd/traffic_top/traffic_top.cc index 39861dc..9a83203 100644 --- a/cmd/traffic_top/traffic_top.cc +++ b/cmd/traffic_top/traffic_top.cc @@ -130,12 +130,12 @@ makeTable(const int x, const int y, const list , Stats ) { int my_y = y; - for (list::const_iterator it = items.begin(); it != items.end(); ++it) { + for (const auto : items) { string prettyName; double value = 0; int type; -stats.getStat(*it, value, prettyName, type); +stats.getStat(item, value, prettyName, type); mvprintw(my_y, x, prettyName.c_str()); prettyPrint(x + 10, my_y++, value, type); } diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 1685e02..cee4f70 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -130,9 +130,9 @@ struct VolInitInfo { ~VolInitInfo() { -for (int i = 0; i < 4; i++) { - vol_aio[i].action = nullptr; - vol_aio[i].mutex.clear(); +for (auto : vol_aio) { + i.action = nullptr; + i.mutex.clear(); } free(vol_h_f); } @@ -1799,9 +1799,9 @@ Vol::handle_header_read(int event, void *data) switch (event) { case AIO_EVENT_DONE: op = (AIOCallback *)data; -for (int i = 0; i < 4; i++) { +for (auto : hf) { ink_assert(op != nullptr); - hf[i] = (VolHeaderFooter *)(op->aiocb.aio_buf); + i = (VolHeaderFooter *)(op->aiocb.aio_buf); if ((size_t)op->aio_result != (size_t)op->aiocb.aio_nbytes) { clear_dir(); return EVENT_DONE; diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc index dfe1d47..77f3cb3 100644 --- a/iocore/cache/CacheDir.cc +++ b/iocore/cache/CacheDir.cc @@ -796,14 +796,14 @@ void dir_lookaside_cleanup(Vol *d) { ink_assert(d->mutex->thread_holding == this_ethread()); - for (int i = 0; i < LOOKASIDE_SIZE; i++) { -EvacuationBlock *b = d->lookaside[i].head; + for (auto : d->lookaside) { +EvacuationBlock *b = i.head; while (b) { if (!dir_valid(d, >new_dir)) { EvacuationBlock *nb = b->link.next; DDebug("dir_lookaside", "cleanup %X %X cleaned up", b->evac_frags.earliest_key.slice32(0),
[trafficserver] branch 7.1.x updated: Ran clang-tidy with modernize-raw-string-literal
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 69a76c1 Ran clang-tidy with modernize-raw-string-literal 69a76c1 is described below commit 69a76c11d89cbc7eb65b67512bf4fe59fa99b9ce Author: Bryan CallAuthorDate: Mon Jun 5 15:10:17 2017 -0700 Ran clang-tidy with modernize-raw-string-literal --- cmd/traffic_layout/traffic_layout.cc | 4 ++-- cmd/traffic_via/traffic_via.cc | 2 +- example/remap_header_add/remap_header_add.cc | 2 +- iocore/net/SSLCertLookup.cc | 2 +- mgmt/RecordsConfig.cc| 4 ++-- mgmt/WebMgmtUtils.cc | 2 +- plugins/esi/test/utils_test.cc | 2 +- proxy/InkAPITest.cc | 2 +- proxy/http/remap/RemapConfig.cc | 12 ++-- proxy/http2/test_HPACK.cc| 6 +++--- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cmd/traffic_layout/traffic_layout.cc b/cmd/traffic_layout/traffic_layout.cc index f10fc17..cce710b 100644 --- a/cmd/traffic_layout/traffic_layout.cc +++ b/cmd/traffic_layout/traffic_layout.cc @@ -61,7 +61,7 @@ static void print_feature(const char *name, const char *value, bool json, bool last = false) { if (json) { -printf("\"%s\": \"%s\"%s", name, value, last ? "\n" : ",\n"); +printf(R"("%s": "%s"%s)", name, value, last ? "\n" : ",\n"); } else { printf("#define %s \"%s\"\n", name, value); } @@ -126,7 +126,7 @@ static void print_var(const char *name, char *value, bool json, bool free = true, bool last = false) { if (json) { -printf("\"%s\": \"%s\"%s", name, value, last ? "\n" : ",\n"); +printf(R"("%s": "%s"%s)", name, value, last ? "\n" : ",\n"); } else { printf("%s: %s\n", name, value); } diff --git a/cmd/traffic_via/traffic_via.cc b/cmd/traffic_via/traffic_via.cc index 11789bc..4a82b73 100644 --- a/cmd/traffic_via/traffic_via.cc +++ b/cmd/traffic_via/traffic_via.cc @@ -269,7 +269,7 @@ filterViaHeader() int pcreExecCode; int i; const char *viaPattern = -"\\[([ucsfpe]+[^\\]]+)\\]"; // Regex to match via header with in [] which can start with character class ucsfpe +R"(\[([ucsfpe]+[^\]]+)\])"; // Regex to match via header with in [] which can start with character class ucsfpe char *viaHeaderString; char viaHeader[1024]; diff --git a/example/remap_header_add/remap_header_add.cc b/example/remap_header_add/remap_header_add.cc index c3c5b54..21feef0 100644 --- a/example/remap_header_add/remap_header_add.cc +++ b/example/remap_header_add/remap_header_add.cc @@ -156,7 +156,7 @@ TSRemapDoRemap(void *ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSED TSRemapReque } for (int i = 0; i < rl->nvc; ++i) { -TSDebug(TAG, "Attaching header \"%s\" with value \"%s\".", rl->name[i], rl->val[i]); +TSDebug(TAG, R"(Attaching header "%s" with value "%s".)", rl->name[i], rl->val[i]); TSMLoc field_loc; if (TSMimeHdrFieldCreate(req_bufp, req_loc, _loc) == TS_SUCCESS) { diff --git a/iocore/net/SSLCertLookup.cc b/iocore/net/SSLCertLookup.cc index 1e4fb09..a1dbe5a 100644 --- a/iocore/net/SSLCertLookup.cc +++ b/iocore/net/SSLCertLookup.cc @@ -306,7 +306,7 @@ SSLCertLookup::get(unsigned i) const struct ats_wildcard_matcher { ats_wildcard_matcher() { -if (regex.compile("^\\*\\.[^\\*.]+") != 0) { +if (regex.compile(R"(^\*\.[^\*.]+)") != 0) { Fatal("failed to compile TLS wildcard matching regex"); } } diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 74b49df..54f28ad 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -259,7 +259,7 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.cluster.mcport", RECD_INT, "8089", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL} , - {RECT_CONFIG, "proxy.config.cluster.mc_group_addr", RECD_STRING, "224.0.1.37", RECU_DYNAMIC, RR_REQUIRED, RECC_IP, "[0-255]\\.[0-255]\\.[0-255]\\.[0-255]", RECA_NULL} + {RECT_CONFIG, "proxy.config.cluster.mc_group_addr", RECD_STRING, "224.0.1.37", RECU_DYNAMIC, RR_REQUIRED, RECC_IP, R"([0-255]\.[0-255]\.[0-255]\.[0-255])", RECA_NULL} , {RECT_CONFIG, "proxy.config.cluster.mc_ttl", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL} , @@ -1297,7 +1297,7 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.ssl.wire_trace_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-2]", RECA_NULL} , - {RECT_CONFIG, "proxy.config.ssl.wire_trace_addr", RECD_STRING, nullptr , RECU_DYNAMIC, RR_NULL, RECC_IP, "[0-255]\\.[0-255]\\.[0-255]\\.[0-255]", RECA_NULL} + {RECT_CONFIG, "proxy.config.ssl.wire_trace_addr", RECD_STRING, nullptr , RECU_DYNAMIC, RR_NULL,
[trafficserver] branch 7.1.x updated: Ran clang-tidy with modernize-deprecated-headers
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 5359a57 Ran clang-tidy with modernize-deprecated-headers 5359a57 is described below commit 5359a57b5deedcb3e5bdb00899932b693c62029a Author: Bryan CallAuthorDate: Mon Jun 5 08:50:11 2017 -0700 Ran clang-tidy with modernize-deprecated-headers --- cmd/traffic_ctl/config.cc | 2 +- cmd/traffic_top/traffic_top.cc | 6 +++--- cmd/traffic_via/traffic_via.cc | 4 ++-- example/cache-scan/cache-scan.cc | 8 example/intercept/intercept.cc | 8 example/passthru/passthru.cc | 4 ++-- example/protocol-stack/protocol-stack.cc | 2 +- example/remap/remap.cc | 10 +- example/remap_header_add/remap_header_add.cc | 6 +++--- example/ssl-preaccept/ssl-preaccept.cc | 4 ++-- example/ssl-sni-whitelist/ssl-sni-whitelist.cc | 4 ++-- example/ssl-sni/ssl-sni.cc | 4 ++-- example/statistic/statistic.cc | 4 ++-- iocore/cache/CacheHttp.cc | 2 +- iocore/net/SSLConfig.cc| 2 +- lib/bindings/repl.cc | 2 +- lib/cppapi/RemapPlugin.cc | 2 +- lib/cppapi/Stat.cc | 2 +- lib/ts/Arena.cc| 4 ++-- lib/ts/CompileParseRules.cc| 4 ++-- lib/ts/InkErrno.cc | 2 +- lib/ts/MMH.cc | 4 ++-- lib/ts/SourceLocation.cc | 4 ++-- lib/ts/TextBuffer.cc | 2 +- lib/ts/Vec.cc | 2 +- lib/ts/ink_code.cc | 4 ++-- lib/ts/ink_error.cc| 2 +- lib/ts/ink_file.cc | 2 +- lib/ts/ink_memory.cc | 6 +++--- lib/ts/ink_mutex.cc| 4 ++-- lib/ts/ink_queue.cc| 4 ++-- lib/ts/ink_queue_utils.cc | 2 +- lib/ts/ink_res_init.cc | 8 lib/ts/ink_res_mkquery.cc | 4 ++-- lib/ts/ink_stack_trace.cc | 6 +++--- lib/ts/ink_string.cc | 8 lib/ts/ink_time.cc | 2 +- lib/ts/llqueue.cc | 10 +- lib/ts/test_Map.cc | 2 +- lib/ts/test_PriorityQueue.cc | 2 +- lib/ts/test_Vec.cc | 4 ++-- lib/ts/test_arena.cc | 2 +- lib/ts/test_atomic.cc | 4 ++-- lib/ts/test_freelist.cc| 4 ++-- lib/tsconfig/TsBuilder.cc | 2 +- lib/tsconfig/TsErrataUtil.cc | 8 lib/tsconfig/TsValue.cc| 4 ++-- lib/tsconfig/test-tsconfig.cc | 2 +- mgmt/api/APITestCliRemote.cc | 6 +++--- mgmt/api/INKMgmtAPI.cc | 2 +- plugins/background_fetch/background_fetch.cc | 8 plugins/background_fetch/headers.cc| 2 +- plugins/background_fetch/rules.cc | 2 +- plugins/conf_remap/conf_remap.cc | 8 plugins/esi/combo_handler.cc | 2 +- plugins/esi/esi.cc | 8 plugins/esi/fetcher/HttpDataFetcherImpl.cc | 2 +- plugins/esi/lib/EsiGunzip.cc | 4 ++-- plugins/esi/lib/EsiGzip.cc | 4 ++-- plugins/esi/lib/EsiParser.cc | 2 +- plugins/esi/lib/EsiProcessor.cc| 2 +- plugins/esi/lib/Variables.cc | 2 +- plugins/esi/lib/gzip.cc| 2 +- plugins/esi/serverIntercept.cc |
[trafficserver] branch 7.1.x updated: Protect against LRUHash x = x
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 77628a3 Protect against LRUHash x = x 77628a3 is described below commit 77628a3f7551e6ff3cc7239b52082877978a3f06 Author: Leif HedstromAuthorDate: Tue Apr 18 16:58:20 2017 -0600 Protect against LRUHash x = x This address clang-analyzer issue reported on master, after we upgraded to v4.0.1. (cherry picked from commit 71d751c3c2070863f9f784da881d24a5260edd36) --- plugins/experimental/cache_promote/cache_promote.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/experimental/cache_promote/cache_promote.cc b/plugins/experimental/cache_promote/cache_promote.cc index e009f75..2b4347f 100644 --- a/plugins/experimental/cache_promote/cache_promote.cc +++ b/plugins/experimental/cache_promote/cache_promote.cc @@ -153,7 +153,9 @@ public: operator=(const LRUHash ) { TSDebug(PLUGIN_NAME, "copying an LRUHash object"); -memcpy(_hash, h._hash, sizeof(_hash)); +if (this != ) { + memcpy(_hash, h._hash, sizeof(_hash)); +} return *this; } -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: Move where the HttpSM setup for redirect before going to origin
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new a6c14f0 Move where the HttpSM setup for redirect before going to origin a6c14f0 is described below commit a6c14f0ddf72dfcb5b51cc08df5aa8afe5730df0 Author: Leif HedstromAuthorDate: Tue May 30 17:12:56 2017 -0600 Move where the HttpSM setup for redirect before going to origin This allows plugins like conf_remap.so to set these settings: @pparam=proxy.config.http.number_of_redirections=3 \ @pparam=proxy.config.http.redirect_use_orig_cache_key=1 (as an example). Before this, you would need to set the enabled flag before remap (in read-request-header hook). With this change, we can modify the overridable configuratios in e.g. conf_remap, or any other remap plugin. In addition, this removes proxy.config.http.redirection_enabled, and instead setting proxy.config.http.number_of_redirections to 0 (default) disables this feature. This is an incompatible change, and should be properly documented. --- doc/admin-guide/files/records.config.en.rst| 10 + .../plugins/collapsed_forwarding.en.rst| 1 - doc/admin-guide/plugins/ts_lua.en.rst | 1 - .../api/functions/TSHttpOverridableConfig.en.rst | 1 - .../api/types/TSOverridableConfigKey.en.rst| 1 - .../api/functions/TSHttpOverridableConfig.en.po| 5 --- lib/perl/lib/Apache/TS/AdminClient.pm | 1 - lib/ts/apidefs.h.in| 1 - mgmt/RecordsConfig.cc | 11 ++ plugins/experimental/collapsed_forwarding/README | 1 - .../collapsed_forwarding/collapsed_forwarding.cc | 1 - plugins/experimental/ts_lua/ts_lua_http_config.c | 2 - proxy/InkAPI.cc| 43 +- proxy/InkAPITest.cc| 1 - proxy/api/ts/ts.h | 2 - proxy/http/HttpConfig.cc | 21 ++- proxy/http/HttpConfig.h| 16 ++-- proxy/http/HttpSM.cc | 6 --- proxy/http/HttpTransact.cc | 11 ++ 19 files changed, 32 insertions(+), 104 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index c5801c6..f5e43d8 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -1442,15 +1442,7 @@ HTTP Connection Timeouts HTTP Redirection -.. ts:cv:: CONFIG proxy.config.http.redirection_enabled INT 0 - :reloadable: - :overridable: - - This setting indicates whether Trafficserver does a redirect follow location on receiving a 3XX Redirect response from the Origin - server. The redirection attempt is transparent to the client and the client is served the final response from the redirected-to - location. - -.. ts:cv:: CONFIG proxy.config.http.number_of_redirections INT 1 +.. ts:cv:: CONFIG proxy.config.http.number_of_redirections INT 0 :reloadable: :overridable: diff --git a/doc/admin-guide/plugins/collapsed_forwarding.en.rst b/doc/admin-guide/plugins/collapsed_forwarding.en.rst index ab84577..f479da3 100644 --- a/doc/admin-guide/plugins/collapsed_forwarding.en.rst +++ b/doc/admin-guide/plugins/collapsed_forwarding.en.rst @@ -83,7 +83,6 @@ plugin to work:: :ts:cv:`proxy.config.http.cache.open_write_fail_action`1 :ts:cv:`proxy.config.cache.enable_read_while_writer` 1 -:ts:cv:`proxy.config.http.redirection_enabled` 1 :ts:cv:`proxy.config.http.number_of_redirections` 10 :ts:cv:`proxy.config.http.redirect_use_orig_cache_key` 1 :ts:cv:`proxy.config.http.background_fill_active_timeout` 0 diff --git a/doc/admin-guide/plugins/ts_lua.en.rst b/doc/admin-guide/plugins/ts_lua.en.rst index 7575359..caf715e 100644 --- a/doc/admin-guide/plugins/ts_lua.en.rst +++ b/doc/admin-guide/plugins/ts_lua.en.rst @@ -3127,7 +3127,6 @@ Http config constants TS_LUA_CONFIG_HTTP_CACHE_GENERATION TS_LUA_CONFIG_BODY_FACTORY_TEMPLATE_BASE TS_LUA_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION -TS_LUA_CONFIG_HTTP_ENABLE_REDIRECTION TS_LUA_CONFIG_HTTP_NUMBER_OF_REDIRECTIONS TS_LUA_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIES TS_LUA_CONFIG_LAST_ENTRY diff --git a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst index 0f9e0a8..dbf7161 100644 --- a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst +++ b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst @@ -113,7 +113,6 @@
[trafficserver] branch master updated: Coverity 1021734 Uninitialized pointer field
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 04f8a18 Coverity 1021734 Uninitialized pointer field 04f8a18 is described below commit 04f8a187e14ae0a3191f464de359967b46632480 Author: Leif HedstromAuthorDate: Mon Jun 5 09:01:39 2017 -0600 Coverity 1021734 Uninitialized pointer field --- iocore/utils/I_OneWayMultiTunnel.h | 6 +++--- iocore/utils/OneWayMultiTunnel.cc | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iocore/utils/I_OneWayMultiTunnel.h b/iocore/utils/I_OneWayMultiTunnel.h index 0189cc4..7997549 100644 --- a/iocore/utils/I_OneWayMultiTunnel.h +++ b/iocore/utils/I_OneWayMultiTunnel.h @@ -142,10 +142,10 @@ struct OneWayMultiTunnel : public OneWayTunnel { virtual void reenable_all(); virtual void close_target_vio(int result, VIO *vio = nullptr); - int n_vioTargets; - VIO *vioTargets[ONE_WAY_MULTI_TUNNEL_LIMIT]; + int n_vioTargets = 0; + bool source_read_previously_completed = false; MIOBufferAccessor topOutBuffer; - bool source_read_previously_completed; + VIO *vioTargets[ONE_WAY_MULTI_TUNNEL_LIMIT]; }; extern ClassAllocator OneWayMultiTunnelAllocator; diff --git a/iocore/utils/OneWayMultiTunnel.cc b/iocore/utils/OneWayMultiTunnel.cc index 428d345..d7be424 100644 --- a/iocore/utils/OneWayMultiTunnel.cc +++ b/iocore/utils/OneWayMultiTunnel.cc @@ -39,8 +39,9 @@ ClassAllocator OneWayMultiTunnelAllocator("OneWayMultiTunnelAllocator"); -OneWayMultiTunnel::OneWayMultiTunnel() : OneWayTunnel(), n_vioTargets(0), source_read_previously_completed(false) +OneWayMultiTunnel::OneWayMultiTunnel() : OneWayTunnel() { + ink_zero(vioTargets); } OneWayMultiTunnel * -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: fix memory leak issue with lua plugin
This is an automated email from the ASF dual-hosted git repository. kichan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 424bee2 fix memory leak issue with lua plugin 424bee2 is described below commit 424bee29f28ac5313484a54e5f6c2d738a56765a Author: Kit ChanAuthorDate: Sat Jun 3 08:53:40 2017 -0700 fix memory leak issue with lua plugin --- plugins/experimental/ts_lua/ts_lua_http_intercept.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/experimental/ts_lua/ts_lua_http_intercept.c b/plugins/experimental/ts_lua/ts_lua_http_intercept.c index 4d07985..048f52d 100644 --- a/plugins/experimental/ts_lua/ts_lua_http_intercept.c +++ b/plugins/experimental/ts_lua/ts_lua_http_intercept.c @@ -291,6 +291,7 @@ ts_lua_http_intercept_process_read(TSEvent event, ts_lua_http_intercept_ctx *ict switch (event) { case TS_EVENT_VCONN_READ_READY: TSVConnShutdown(ictx->net_vc, 1, 0); +ictx->recv_complete = 1; break; // READ_READY_READY is not equal to EOS break statement is probably missing? case TS_EVENT_VCONN_READ_COMPLETE: case TS_EVENT_VCONN_EOS: -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch 7.1.x updated: Cleanup server_entry before do dns lookup
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 cb9076f Cleanup server_entry before do dns lookup cb9076f is described below commit cb9076f5ed85d58c72d0d63954f1e559d4bfc662 Author: Oknet XuAuthorDate: Thu Jun 1 13:37:02 2017 +0800 Cleanup server_entry before do dns lookup ATS has server connection retry mechanism. It tries to connect server ip first then other ip by DNS round robin. Currently, ATS will do cleanup server_entry before retry to connect server ip. But it does not cleanup server_entry before do dns lookup. (cherry picked from commit 89403ff6aabadef26511712841cf0c82517ffb4b) --- proxy/http/HttpSM.cc | 26 ++ 1 file changed, 26 insertions(+) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index de96aa9..8cc2318 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7358,6 +7358,32 @@ HttpSM::set_next_state() HTTP_SM_SET_DEFAULT_HANDLER(::state_hostdb_lookup); +// We need to close the previous attempt +// Because it could be a server side retry by DNS rr +if (server_entry) { + ink_assert(server_entry->vc_type == HTTP_SERVER_VC); + vc_table.cleanup_entry(server_entry); + server_entry = nullptr; + server_session = nullptr; +} else { + // Now that we have gotten the user agent request, we can cancel + // the inactivity timeout associated with it. Note, however, that + // we must not cancel the inactivity timeout if the message + // contains a body (as indicated by the non-zero request_content_length + // field). This indicates that a POST operation is taking place and + // that the client is still sending data to the origin server. The + // origin server cannot reply until the entire request is received. In + // light of this dependency, TS must ensure that the client finishes + // sending its request and for this reason, the inactivity timeout + // cannot be cancelled. + if (ua_session && !t_state.hdr_info.request_content_length) { +ua_session->cancel_inactivity_timeout(); + } else if (!ua_session) { +terminate_sm = true; +return; // Give up if there is no session + } +} + ink_assert(t_state.dns_info.looking_up != HttpTransact::UNDEFINED_LOOKUP); do_hostdb_lookup(); break; -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: Cleanup server_entry before do dns lookup
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 89403ff Cleanup server_entry before do dns lookup 89403ff is described below commit 89403ff6aabadef26511712841cf0c82517ffb4b Author: Oknet XuAuthorDate: Thu Jun 1 13:37:02 2017 +0800 Cleanup server_entry before do dns lookup ATS has server connection retry mechanism. It tries to connect server ip first then other ip by DNS round robin. Currently, ATS will do cleanup server_entry before retry to connect server ip. But it does not cleanup server_entry before do dns lookup. --- proxy/http/HttpSM.cc | 26 ++ 1 file changed, 26 insertions(+) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 53e1290..b9ca8cd 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7234,6 +7234,32 @@ HttpSM::set_next_state() HTTP_SM_SET_DEFAULT_HANDLER(::state_hostdb_lookup); +// We need to close the previous attempt +// Because it could be a server side retry by DNS rr +if (server_entry) { + ink_assert(server_entry->vc_type == HTTP_SERVER_VC); + vc_table.cleanup_entry(server_entry); + server_entry = nullptr; + server_session = nullptr; +} else { + // Now that we have gotten the user agent request, we can cancel + // the inactivity timeout associated with it. Note, however, that + // we must not cancel the inactivity timeout if the message + // contains a body (as indicated by the non-zero request_content_length + // field). This indicates that a POST operation is taking place and + // that the client is still sending data to the origin server. The + // origin server cannot reply until the entire request is received. In + // light of this dependency, TS must ensure that the client finishes + // sending its request and for this reason, the inactivity timeout + // cannot be cancelled. + if (ua_session && !t_state.hdr_info.request_content_length) { +ua_session->cancel_inactivity_timeout(); + } else if (!ua_session) { +terminate_sm = true; +return; // Give up if there is no session + } +} + ink_assert(t_state.dns_info.looking_up != HttpTransact::UNDEFINED_LOOKUP); do_hostdb_lookup(); break; -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: Prevent potential dispatch of HttpTunnel events to a dead consumer.
This is an automated email from the ASF dual-hosted git repository. amc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 6f0bc84 Prevent potential dispatch of HttpTunnel events to a dead consumer. 6f0bc84 is described below commit 6f0bc840b2cbfcbead88c4a411dc719c4f9d6f25 Author: Alan M. CarrollAuthorDate: Fri Jun 2 13:07:36 2017 -0500 Prevent potential dispatch of HttpTunnel events to a dead consumer. --- proxy/http/HttpTunnel.h | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/proxy/http/HttpTunnel.h b/proxy/http/HttpTunnel.h index 54f5314..2e9d32f 100644 --- a/proxy/http/HttpTunnel.h +++ b/proxy/http/HttpTunnel.h @@ -475,12 +475,32 @@ HttpTunnel::get_producer(HttpTunnelType_t type) inline HttpTunnelConsumer * HttpTunnel::get_consumer(VConnection *vc) { - for (int i = 0; i < MAX_CONSUMERS; i++) { -if (consumers[i].vc == vc) { - return consumers + i; + /** Rare but persistent problem in which a @c INKVConnInternal is used by a consumer, released, + and then re-allocated for a different consumer. This causes two consumers to have the same VC + pointer resulting in this method returning the wrong consumer. Note this is a not a bad use of + the tunnel, but an unfortunate interaction with the FIFO free lists. + + It's not correct to check for the consumer being alive - at a minimum `HTTP_TUNNEL_EVENT_DONE` + is dispatched against a consumer after the consumer is not alive. Instead if a non-alive + consumer matches it is stored as a candidate and returned if no other match is found. If a + live matching consumer is found, it is immediately returned. It is never valid to have the + same VC in more than one active consumer. This should avoid a performance impact because in + the usual case the consumer will be alive. + + In the case of a deliberate dispatch of an event to a dead consumer that has a duplicate vc + address, this will select the last consumer which will be correct as the consumers are added + in order therefore the latter consumer will be the most recent / appropriate target. + */ + HttpTunnelConsumer *zret = nullptr; + for (HttpTunnelConsumer : consumers) { +if (c.vc == vc) { + zret = + if (c.alive) { // a match that's alive is always the best. +break; + } } } - return NULL; + return zret; } inline HttpTunnelProducer * @@ -499,7 +519,7 @@ HttpTunnel::get_consumer(VIO *vio) { if (vio) { for (int i = 0; i < MAX_CONSUMERS; i++) { - if (consumers[i].write_vio == vio || consumers[i].vc == vio->vc_server) { + if (consumers[i].alive && (consumers[i].write_vio == vio || consumers[i].vc == vio->vc_server)) { return consumers + i; } } -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: Doc update: proxy.config.ssl.client.verify.server
This is an automated email from the ASF dual-hosted git repository. paziz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 9c305c2 Doc update: proxy.config.ssl.client.verify.server 9c305c2 is described below commit 9c305c24b8e50b8c6c0141a8911fb157fbca65ed Author: Syeda Persia AzizAuthorDate: Sun Jun 4 17:42:48 2017 -0500 Doc update: proxy.config.ssl.client.verify.server --- doc/admin-guide/files/records.config.en.rst | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index 372fd46..c5801c6 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -3324,7 +3324,11 @@ Client-Related Configuration :overridable: Configures Traffic Server to verify the origin server certificate - with the Certificate Authority (CA). + with the Certificate Authority (CA). This configuration takes a value between 0 to 2. + +:0: Server Certificate will not be verified +:1: Certificate will be verified and the connection will not be established if verification fails. +:2: The provided certificate will be verified and the connection will be established irrespective of the verification result. If verification fails the name of the server will be logged. .. ts:cv:: CONFIG proxy.config.ssl.client.cert.filename STRING NULL -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: HTTP2 non persistent metrics sticking over system crash.
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 4a09bf5 HTTP2 non persistent metrics sticking over system crash. 4a09bf5 is described below commit 4a09bf54e9ea1124de302248bda4ee9fcade6ef3 Author: Susan HinrichsAuthorDate: Thu Jun 1 20:36:46 2017 + HTTP2 non persistent metrics sticking over system crash. --- proxy/http2/HTTP2.cc | 8 1 file changed, 8 insertions(+) diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc index 7832e27..0151800 100644 --- a/proxy/http2/HTTP2.cc +++ b/proxy/http2/HTTP2.cc @@ -750,12 +750,20 @@ Http2::init() ink_release_assert(http2_settings_parameter_is_valid({HTTP2_SETTINGS_HEADER_TABLE_SIZE, header_table_size})); ink_release_assert(http2_settings_parameter_is_valid({HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE, max_header_list_size})); +#define HTTP2_CLEAR_DYN_STAT(x) \ + do { \ +RecSetRawStatSum(http2_rsb, x, 0); \ +RecSetRawStatCount(http2_rsb, x, 0); \ + } while (0); + // Setup statistics http2_rsb = RecAllocateRawStatBlock(static_cast(HTTP2_N_STATS)); RecRegisterRawStat(http2_rsb, RECT_PROCESS, HTTP2_STAT_CURRENT_CLIENT_SESSION_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast(HTTP2_STAT_CURRENT_CLIENT_SESSION_COUNT), RecRawStatSyncSum); + HTTP2_CLEAR_DYN_STAT(HTTP2_STAT_CURRENT_CLIENT_SESSION_COUNT); RecRegisterRawStat(http2_rsb, RECT_PROCESS, HTTP2_STAT_CURRENT_CLIENT_STREAM_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast(HTTP2_STAT_CURRENT_CLIENT_STREAM_COUNT), RecRawStatSyncSum); + HTTP2_CLEAR_DYN_STAT(HTTP2_STAT_CURRENT_CLIENT_STREAM_COUNT); RecRegisterRawStat(http2_rsb, RECT_PROCESS, HTTP2_STAT_TOTAL_CLIENT_STREAM_NAME, RECD_INT, RECP_PERSISTENT, static_cast(HTTP2_STAT_TOTAL_CLIENT_STREAM_COUNT), RecRawStatSyncCount); RecRegisterRawStat(http2_rsb, RECT_PROCESS, HTTP2_STAT_TOTAL_TRANSACTIONS_TIME_NAME, RECD_INT, RECP_PERSISTENT, -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: fix memory leak in SSLInitServerContext
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 0b900a6 fix memory leak in SSLInitServerContext 0b900a6 is described below commit 0b900a6d9f70300543718a0143f014d3b851f189 Author: Liss TarnellAuthorDate: Mon Jun 5 02:29:41 2017 +0100 fix memory leak in SSLInitServerContext digest is only freed in the failure path, not the success path. valgrind leak record: ==151777== 82,368 (23,568 direct, 58,800 indirect) bytes in 491 blocks are definitely lost in loss record 2,298 of 2,334 ==151777==at 0x4C2BBAF: malloc (vg_replace_malloc.c:299) ==151777==by 0x5ED59ED: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1) ==151777==by 0x7EDB41: SSLInitServerContext(SSLConfigParams const*, ssl_user_config const*, Vec &) (SSLUtils.cc:1474) ==151777==by 0x7F0EAC: SSLCreateServerContext(SSLConfigParams const*) (SSLUtils.cc:1784) ==151777==by 0x54E6EC: TSSslServerContextCreate (InkAPI.cc:9176) ==151777==by 0xAA8B8CD: secret_make_ssl_ctx (secret.c:129) ==151777==by 0xAA80D1F: build_ingress_tls (remap_build.c:147) ==151777==by 0xAA80D1F: build_ingress (remap_build.c:77) ==151777==by 0xAA80D1F: build_namespace (remap_build.c:54) ==151777==by 0xAA80D1F: remap_db_from_cluster (remap_build.c:37) ==151777==by 0xAA7C903: rebuild_maps (remap.c:52) ==151777==by 0xAA7C296: fetcher_get_all (watcher.c:517) ==151777==by 0xAA7C2E7: watcher_thread (watcher.c:543) ==151777==by 0x553C0F: ink_thread_trampoline(void*) (InkIOCoreAPI.cc:111) ==151777==by 0x6508493: start_thread (pthread_create.c:333) --- iocore/net/SSLUtils.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 91083dd..0be99ec 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -1715,6 +1715,8 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu SSLError("EVP_DigestFinal_ex failed"); goto fail; } + EVP_MD_CTX_free(digest); + digest = NULL; if (SSL_CTX_set_session_id_context(ctx, hash_buf, hash_len) == 0) { SSLError("SSL_CTX_set_session_id_context failed"); @@ -1769,7 +1771,8 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu return ctx; fail: - EVP_MD_CTX_free(digest); + if (digest) +EVP_MD_CTX_free(digest); SSL_CLEAR_PW_REFERENCES(ctx) SSLReleaseContext(ctx); for (unsigned int i = 0; i < certList.length(); i++) { -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].
[trafficserver] branch master updated: Fix for CID-1375917
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new a48fe23 Fix for CID-1375917 a48fe23 is described below commit a48fe23bd03fdb6965fce99254689a95b022cd89 Author: Susan HinrichsAuthorDate: Fri Jun 2 22:26:30 2017 + Fix for CID-1375917 If handShakeBuffer is null so is handShakeReader, but best to be explicit. --- iocore/net/SSLNetVConnection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index f36554a..ab88b18 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -512,7 +512,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread) } } // move over to the socket if we haven't already - if (this->handShakeBuffer) { + if (this->handShakeReader) { ink_release_assert(BIO_eof(SSL_get_rbio(this->ssl)) && !handShakeReader->is_read_avail_more_than(0)); // Done with the buffer after the first exchange, convert over to the socket buffer BIO *rbio = BIO_new_fd(this->get_socket(), BIO_NOCLOSE); -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" '].