[trafficserver] branch quic-latest updated: Release ssl in QUICTLS destructor

2018-08-08 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new cbc81bc  Release ssl in QUICTLS destructor
cbc81bc is described below

commit cbc81bcc4aae47bd4c37a28bb4ec74b39c0648e7
Author: scw00 
AuthorDate: Thu Aug 9 08:45:14 2018 +0800

Release ssl in QUICTLS destructor
---
 iocore/net/quic/QUICTLS.cc |  2 ++
 iocore/net/quic/test/test_QUICHandshakeProtocol.cc | 15 +--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/iocore/net/quic/QUICTLS.cc b/iocore/net/quic/QUICTLS.cc
index 1923e01..862c25d 100644
--- a/iocore/net/quic/QUICTLS.cc
+++ b/iocore/net/quic/QUICTLS.cc
@@ -33,6 +33,8 @@ constexpr static char tag[] = "quic_tls";
 
 QUICTLS::~QUICTLS()
 {
+  SSL_free(this->_ssl);
+
   delete this->_client_pp;
   delete this->_server_pp;
 }
diff --git a/iocore/net/quic/test/test_QUICHandshakeProtocol.cc 
b/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
index 4e46c3e..22bbfe8 100644
--- a/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
+++ b/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
@@ -175,11 +175,19 @@ TEST_CASE("QUICHandshakeProtocol Full Handshake", 
"[quic]")
   SSL_CTX_set_mode(server_ssl_ctx, SSL_MODE_QUIC_HACK);
 #endif
   BIO *crt_bio(BIO_new_mem_buf(server_crt, sizeof(server_crt)));
-  SSL_CTX_use_certificate(server_ssl_ctx, PEM_read_bio_X509(crt_bio, nullptr, 
nullptr, nullptr));
+  X509 *x509 = PEM_read_bio_X509(crt_bio, nullptr, nullptr, nullptr);
+  SSL_CTX_use_certificate(server_ssl_ctx, x509);
   BIO *key_bio(BIO_new_mem_buf(server_key, sizeof(server_key)));
-  SSL_CTX_use_PrivateKey(server_ssl_ctx, PEM_read_bio_PrivateKey(key_bio, 
nullptr, nullptr, nullptr));
+  EVP_PKEY *pkey = PEM_read_bio_PrivateKey(key_bio, nullptr, nullptr, nullptr);
+  SSL_CTX_use_PrivateKey(server_ssl_ctx, pkey);
   QUICHandshakeProtocol *server = new QUICTLS(SSL_new(server_ssl_ctx), 
NET_VCONNECTION_IN);
 
+  BIO_free(crt_bio);
+  BIO_free(key_bio);
+
+  X509_free(x509);
+  EVP_PKEY_free(pkey);
+
   CHECK(client->initialize_key_materials({reinterpret_cast("\x83\x94\xc8\xf0\x3e\x51\x57\x00"), 8}));
   CHECK(server->initialize_key_materials({reinterpret_cast("\x83\x94\xc8\xf0\x3e\x51\x57\x00"), 8}));
 
@@ -282,6 +290,9 @@ TEST_CASE("QUICHandshakeProtocol Full Handshake", "[quic]")
   // Teardown
   delete client;
   delete server;
+
+  SSL_CTX_free(server_ssl_ctx);
+  SSL_CTX_free(client_ssl_ctx);
 }
 
 // // HRR - Incorrect DHE Share



[trafficserver] branch quic-latest updated (d924cd8 -> fad804a)

2018-08-08 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from d924cd8  Fix test_QUICHandshakeProtocol
 add bc12699  Fix test_QUICHandshakeProtocol for OpenSSL with 
SSL_MODE_QUIC_HACK
 add da7f408  Ignore ZERO_RTT_PROTECTED packet on 
state_connection_established
 new 1fdeea3  Process 0-RTT packet on state_connection_established
 new fad804a  Erase "ack_only" lost packet correctly

The 2 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:
 iocore/net/QUICNetVConnection.cc   |  1 +
 iocore/net/quic/QUICLossDetector.cc| 48 ++
 iocore/net/quic/QUICLossDetector.h |  3 ++
 iocore/net/quic/test/test_QUICHandshakeProtocol.cc | 41 --
 4 files changed, 73 insertions(+), 20 deletions(-)



[trafficserver] 02/02: Erase "ack_only" lost packet correctly

2018-08-08 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit fad804a84d1a45f7ac4f24baea0d5838e15476db
Author: Masaori Koshiba 
AuthorDate: Wed Aug 8 16:48:51 2018 +0900

Erase "ack_only" lost packet correctly

To avoid heap-use-after-free caused by erasing elements in the loop
---
 iocore/net/quic/QUICLossDetector.cc | 48 -
 iocore/net/quic/QUICLossDetector.h  |  3 +++
 2 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/iocore/net/quic/QUICLossDetector.cc 
b/iocore/net/quic/QUICLossDetector.cc
index c6a5014..2773d80 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -427,36 +427,39 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber 
largest_acked_packet_num
 delay_until_lost = 5.0 / 4.0 * std::max(this->_latest_rtt, 
this->_smoothed_rtt);
   }
 
-  for (auto  : this->_sent_packets) {
-if (unacked.first >= largest_acked_packet_number) {
+  for (auto it = this->_sent_packets.begin(); it != 
this->_sent_packets.end();) {
+if (it->first >= largest_acked_packet_number) {
   break;
 }
-ink_hrtime time_since_sent = Thread::get_hrtime() - unacked.second->time;
-uint64_t delta = largest_acked_packet_number - 
unacked.second->packet_number;
+ink_hrtime time_since_sent = Thread::get_hrtime() - it->second->time;
+uint64_t delta = largest_acked_packet_number - 
it->second->packet_number;
 if (time_since_sent > delay_until_lost || delta > 
this->_reordering_threshold) {
   if (time_since_sent > delay_until_lost) {
 QUICLDDebug("Lost: time since sent is too long (PN=%" PRId64 " sent=%" 
PRId64 ", delay=%lf, fraction=%lf, lrtt=%" PRId64
 ", srtt=%" PRId64 ")",
-unacked.first, time_since_sent, delay_until_lost, 
this->_time_reordering_fraction, this->_latest_rtt,
+it->first, time_since_sent, delay_until_lost, 
this->_time_reordering_fraction, this->_latest_rtt,
 this->_smoothed_rtt);
   } else {
 QUICLDDebug("Lost: packet delta is too large (PN=%" PRId64 " 
largest=%" PRId64 " unacked=%" PRId64 " threshold=%" PRId32
 ")",
-unacked.first, largest_acked_packet_number, 
unacked.second->packet_number, this->_reordering_threshold);
+it->first, largest_acked_packet_number, 
it->second->packet_number, this->_reordering_threshold);
   }
 
-  if (!unacked.second->ack_only) {
-lost_packets.insert({unacked.first, unacked.second.get()});
+  if (!it->second->ack_only) {
+lost_packets.insert({it->first, it->second.get()});
   } else {
 // -- ADDITIONAL CODE --
 // We remove only "ack-only" packets for life time management of 
packets.
 // Packets in lost_packets will be removed from sent_packet later.
-this->_remove_from_sent_packet_list(unacked.first);
+it = this->_remove_from_sent_packet_list(it);
+continue;
 // -- END OF ADDITIONAL CODE --
   }
 } else if (this->_loss_time == 0 && delay_until_lost != INFINITY) {
   this->_loss_time = Thread::get_hrtime() + delay_until_lost - 
time_since_sent;
 }
+
+++it;
   }
 
   // Inform the congestion controller of lost packets and
@@ -582,21 +585,34 @@ 
QUICLossDetector::_remove_from_sent_packet_list(QUICPacketNumber packet_number)
 {
   SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
 
-  // Decrement counters
   auto ite = this->_sent_packets.find(packet_number);
-  if (ite != this->_sent_packets.end()) {
-if (ite->second->handshake) {
+  this->_decrement_outstanding_counters(ite);
+  this->_sent_packets.erase(packet_number);
+}
+
+std::map::iterator
+QUICLossDetector::_remove_from_sent_packet_list(std::map::iterator it)
+{
+  SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
+
+  this->_decrement_outstanding_counters(it);
+  return this->_sent_packets.erase(it);
+}
+
+void
+QUICLossDetector::_decrement_outstanding_counters(std::map::iterator it)
+{
+  if (it != this->_sent_packets.end()) {
+// Decrement counters
+if (it->second->handshake) {
   ink_assert(this->_handshake_outstanding.load() > 0);
   --this->_handshake_outstanding;
 }
-if (!ite->second->ack_only) {
+if (!it->second->ack_only) {
   ink_assert(this->_retransmittable_outstanding.load() > 0);
   --this->_retransmittable_outstanding;
 }
   }
-
-  // Remove from the list
-  this->_sent_packets.erase(packet_number);
 }
 
 ink_hrtime
diff --git a/iocore/net/quic/QUICLossDetector.h 
b/iocore/net/quic/QUICLossDetector.h
index 48249a1..4bb26ec 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -163,6 +163,9 @@ private:
   std::atomic 

[trafficserver] 01/02: Process 0-RTT packet on state_connection_established

2018-08-08 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 1fdeea385abbe66f2e2ed051a46a54716e08e038
Author: Masaori Koshiba 
AuthorDate: Wed Aug 8 11:53:36 2018 +0900

Process 0-RTT packet on state_connection_established

Some client send STREAM frame on 0-RTT packet after handshake is completed.
Need to clarify, but it looks not prohibited in draft-13.
---
 iocore/net/QUICNetVConnection.cc | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 6cc1c75..6b92aed 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -1014,15 +1014,10 @@ QUICNetVConnection::_state_common_receive_packet()
   break;
 case QUICPacketType::INITIAL:
 case QUICPacketType::HANDSHAKE:
+case QUICPacketType::ZERO_RTT_PROTECTED:
   // Pass packet to _recv_and_ack to send ack to the packet. Stream data 
will be discarded by offset mismatch.
   error = this->_recv_and_ack(std::move(p));
   break;
-case QUICPacketType::ZERO_RTT_PROTECTED:
-  // Probably retransmitted unintentionally. Do nothing.
-  QUICConDebug("Ignore %s(%" PRIu8 ")", 
QUICDebugNames::packet_type(p->type()), static_cast(p->type()));
-
-  error = QUICErrorUPtr(new QUICNoError());
-  break;
 default:
   QUICConDebug("Unknown packet type: %s(%" PRIu8 ")", 
QUICDebugNames::packet_type(p->type()), static_cast(p->type()));
 



[trafficserver] branch quic-latest updated (fad804a -> d924cd8)

2018-08-08 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


omit fad804a  Erase "ack_only" lost packet correctly
omit 1fdeea3  Process 0-RTT packet on state_connection_established
omit da7f408  Ignore ZERO_RTT_PROTECTED packet on 
state_connection_established
omit bc12699  Fix test_QUICHandshakeProtocol for OpenSSL with 
SSL_MODE_QUIC_HACK

This update removed existing revisions from the reference, leaving the
reference pointing at a previous point in the repository history.

 * -- * -- N   refs/heads/quic-latest (d924cd8)
\
 O -- O -- O   (fad804a)

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 iocore/net/QUICNetVConnection.cc   |  1 -
 iocore/net/quic/QUICLossDetector.cc| 48 --
 iocore/net/quic/QUICLossDetector.h |  3 --
 iocore/net/quic/test/test_QUICHandshakeProtocol.cc | 41 ++
 4 files changed, 20 insertions(+), 73 deletions(-)



[trafficserver] branch 7.1.x updated: Fix typo in header_normalize plugin.

2018-08-08 Thread zwoop
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 2c6b96c  Fix typo in header_normalize plugin.
2c6b96c is described below

commit 2c6b96c8859d7000491bbc491b27f31fe2cd9ead
Author: Susan Hinrichs 
AuthorDate: Wed Aug 8 16:27:36 2018 +

Fix typo in header_normalize plugin.

(cherry picked from commit 9d2e6df5f8a4f5899fe0f7f7441fda7dedf3d15c)
---
 plugins/experimental/header_normalize/header_normalize.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/experimental/header_normalize/header_normalize.cc 
b/plugins/experimental/header_normalize/header_normalize.cc
index c4d9e6b..192c82a 100644
--- a/plugins/experimental/header_normalize/header_normalize.cc
+++ b/plugins/experimental/header_normalize/header_normalize.cc
@@ -171,7 +171,7 @@ TSRemapNewInstance(int /* argc */, char * /* argv[] */, 
void ** /* ih */, char *
 }
 
 void
-TSRemapDelteInstance(void * /* ih */)
+TSRemapDeleteInstance(void * /* ih */)
 {
 }
 



[trafficserver] branch 8.0.x updated: Updated ChangeLog

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 43bb698  Updated ChangeLog
43bb698 is described below

commit 43bb6982283832c1cc882169aef31db64d199786
Author: Leif Hedstrom 
AuthorDate: Wed Aug 8 13:40:24 2018 -0600

Updated ChangeLog
---
 CHANGELOG-8.0.0 | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG-8.0.0 b/CHANGELOG-8.0.0
index c3e3e0b..4e09479 100644
--- a/CHANGELOG-8.0.0
+++ b/CHANGELOG-8.0.0
@@ -1099,6 +1099,7 @@ Changes with Apache Traffic Server 8.0.0
   #3821 - Generalize started thread counter
   #3822 - Fix broken out of tree build
   #3824 - This removes the second CacheSM, and related APIs
+  #3825 - Detects compiler support of C++17 at configure time
   #3826 - BWF: Fix asserts for clang-analyzer.
   #3828 - Set LDFLAGS when building with jemalloc
   #3829 - Fixed coredump with origin throttling
@@ -1141,7 +1142,6 @@ Changes with Apache Traffic Server 8.0.0
   #3918 - Fix configuration problem for host-targeted user response pages
   #3919 - Clarifies alternate # selected in log output
   #3920 - CPPApi Intercept Plugin: Changed destroy logic
-  #3924 - Remove INKContInternal warning.
   #3929 - Log lock cleanup
   #3933 - Removed assignment of unused variable
   #3934 - cachekey: running as global plugin
@@ -1164,7 +1164,17 @@ Changes with Apache Traffic Server 8.0.0
   #4002 - Fixes spelling
   #4004 - Dockerfile for CentOS/Fedora, i.e. yum dependencies
   #4011 - Modifies init script to add start/reload hooks
+  #4014 - fix outputlog, diagslog rolling size overflow
+  #4025 - Removes non-FS ciphers to make SSLLabs not warn on weak ciphers
   #4027 - Fixes ticket loading from filesystems without a mtime
   #4035 - Fixing copy paste error in SNI yaml parsing
   #4036 - Removes more references to traffic_cop and cop related functionality
   #4043 - Change the defauilt connect_ports docs to reflect the code
+  #4045 - Mark log collation as deprecated
+  #4048 - Cached object should not be removed when write is aborted
+  #4061 - Fix tunnel routing documentation
+  #4068 - Cleans up README and sample config for compress plugin
+  #4070 - Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet
+  #4076 - traffic_manager: fix --tsArgs to work.
+  #4081 - Fix typo in header_normalize plugin.
+  #4083 - Links server_push_preload plugin against libatscppapi



[trafficserver] branch 7.1.x updated: Added 7.1.5 CHANGELOG

2018-08-08 Thread zwoop
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 94bfbd6  Added 7.1.5 CHANGELOG
94bfbd6 is described below

commit 94bfbd6b550277daa5a5ec293f91f22c08881055
Author: Leif Hedstrom 
AuthorDate: Wed Aug 8 13:37:01 2018 -0600

Added 7.1.5 CHANGELOG
---
 CHANGELOG-7.1.5 | 5 +
 1 file changed, 5 insertions(+)

diff --git a/CHANGELOG-7.1.5 b/CHANGELOG-7.1.5
new file mode 100644
index 000..aaf6c3f
--- /dev/null
+++ b/CHANGELOG-7.1.5
@@ -0,0 +1,5 @@
+Changes with Apache Traffic Server 7.1.5
+  #4058 - Remove Http2ConnectionState::continued_buffer
+  #4079 - Enable ECDH explicitly only if OpenSSL version is v1.0.2 or lower
+  #4080 - Add diags log message when cache wraps.
+  #4084 - Fixed http/2 issue with Http2Stream being updated after it was 
destroyed



[trafficserver] branch 8.0.x updated: Updates the default ciphers to avoid weak ciphers(non FS)

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 7edb6b9  Updates the default ciphers to avoid weak ciphers(non FS)
7edb6b9 is described below

commit 7edb6b97294842c8ed40a70e4ebaf0f5052ef894
Author: Leif Hedstrom 
AuthorDate: Fri Jul 27 12:37:25 2018 -0600

Updates the default ciphers to avoid weak ciphers(non FS)

This is as reported by SSLLabs, and doing this change eliminates
their warnings about weak non-FS ciphers.

(cherry picked from commit 2ded01373984e47d3dd94669d2ae1f57f027ef6a)
---
 configs/records.config.default.in | 2 +-
 mgmt/RecordsConfig.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/records.config.default.in 
b/configs/records.config.default.in
index daf04b4..ddeed00 100644
--- a/configs/records.config.default.in
+++ b/configs/records.config.default.in
@@ -166,7 +166,7 @@ CONFIG proxy.config.reverse_proxy.enabled INT 1
 ##
 CONFIG proxy.config.ssl.client.verify.server INT 0
 CONFIG proxy.config.ssl.client.CA.cert.filename STRING NULL
-CONFIG proxy.config.ssl.server.cipher_suite STRING 
TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:TLS-CHACHA20-POLY1305-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:EC
 [...]
+CONFIG proxy.config.ssl.server.cipher_suite STRING 
TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:TLS-CHACHA20-POLY1305-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:EC
 [...]
 
 ##
 # Debugging. Docs:
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index b7c03f8..e16b130 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1092,7 +1092,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.ssl.client.TLSv1_2", RECD_INT, "1", 
RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.cipher_suite", RECD_STRING, 
"TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:TLS-CHACHA20-POLY1305-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-R
 [...]
+  {RECT_CONFIG, "proxy.config.ssl.server.cipher_suite", RECD_STRING, 
"TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:TLS-CHACHA20-POLY1305-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-R
 [...]
   ,
   {RECT_CONFIG, "proxy.config.ssl.client.cipher_suite", RECD_STRING, nullptr, 
RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,



[trafficserver] branch 8.0.x updated: Links server_push_preload plugin against libatscppapi

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 636014f  Links server_push_preload plugin against libatscppapi
636014f is described below

commit 636014f52ab134d524bc2eb1f76f6764eebe89b8
Author: Randall Meyer 
AuthorDate: Wed Aug 8 11:21:39 2018 -0700

Links server_push_preload plugin against libatscppapi

(cherry picked from commit aa5e7ae056bc445dff269d017e972ddbd6e1f0df)
---
 plugins/experimental/server_push_preload/Makefile.inc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/plugins/experimental/server_push_preload/Makefile.inc 
b/plugins/experimental/server_push_preload/Makefile.inc
index 4d8fd47..0f91e65 100644
--- a/plugins/experimental/server_push_preload/Makefile.inc
+++ b/plugins/experimental/server_push_preload/Makefile.inc
@@ -18,3 +18,10 @@ pkglib_LTLIBRARIES += 
experimental/server_push_preload/server_push_preload.la
 
 experimental_server_push_preload_server_push_preload_la_SOURCES = \
   experimental/server_push_preload/server_push_preload.cc
+
+experimental_server_push_preload_server_push_preload_la_LDFLAGS = \
+  $(AM_LDFLAGS) \
+  -L$(top_builddir)/lib/cppapi
+
+experimental_server_push_preload_server_push_preload_la_LIBADD = \
+  -latscppapi



[trafficserver] branch 8.0.x updated: Fix typo in header_normalize plugin.

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 21c9fea  Fix typo in header_normalize plugin.
21c9fea is described below

commit 21c9fea32822e3f36d9d05df4312296cf57d6205
Author: Susan Hinrichs 
AuthorDate: Wed Aug 8 16:27:36 2018 +

Fix typo in header_normalize plugin.

(cherry picked from commit 9d2e6df5f8a4f5899fe0f7f7441fda7dedf3d15c)
---
 plugins/experimental/header_normalize/header_normalize.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/experimental/header_normalize/header_normalize.cc 
b/plugins/experimental/header_normalize/header_normalize.cc
index d573ae6..1dddf35 100644
--- a/plugins/experimental/header_normalize/header_normalize.cc
+++ b/plugins/experimental/header_normalize/header_normalize.cc
@@ -172,7 +172,7 @@ TSRemapNewInstance(int /* argc */, char * /* argv[] */, 
void ** /* ih */, char *
 }
 
 void
-TSRemapDelteInstance(void * /* ih */)
+TSRemapDeleteInstance(void * /* ih */)
 {
 }
 



[trafficserver] branch master updated: Links server_push_preload plugin against libatscppapi

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm 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 aa5e7ae  Links server_push_preload plugin against libatscppapi
aa5e7ae is described below

commit aa5e7ae056bc445dff269d017e972ddbd6e1f0df
Author: Randall Meyer 
AuthorDate: Wed Aug 8 11:21:39 2018 -0700

Links server_push_preload plugin against libatscppapi
---
 plugins/experimental/server_push_preload/Makefile.inc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/plugins/experimental/server_push_preload/Makefile.inc 
b/plugins/experimental/server_push_preload/Makefile.inc
index 4d8fd47..0f91e65 100644
--- a/plugins/experimental/server_push_preload/Makefile.inc
+++ b/plugins/experimental/server_push_preload/Makefile.inc
@@ -18,3 +18,10 @@ pkglib_LTLIBRARIES += 
experimental/server_push_preload/server_push_preload.la
 
 experimental_server_push_preload_server_push_preload_la_SOURCES = \
   experimental/server_push_preload/server_push_preload.cc
+
+experimental_server_push_preload_server_push_preload_la_LDFLAGS = \
+  $(AM_LDFLAGS) \
+  -L$(top_builddir)/lib/cppapi
+
+experimental_server_push_preload_server_push_preload_la_LIBADD = \
+  -latscppapi



[trafficserver] branch 7.1.x updated: Fixed http/2 issue with Http2Stream being updated after it was destroyed

2018-08-08 Thread zwoop
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 350bb1b  Fixed http/2 issue with Http2Stream being updated after it 
was destroyed
350bb1b is described below

commit 350bb1b6bfe472493dc4d337ce1584be4afdb7a6
Author: Bryan Call 
AuthorDate: Tue Jul 10 17:30:28 2018 -0700

Fixed http/2 issue with Http2Stream being updated after it was destroyed

(cherry picked from commit e57679c565effcc066945d19e99314cb6a3b7724)
---
 proxy/http2/Http2Stream.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index f4c2994..faa86bf 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -663,6 +663,7 @@ void
 Http2Stream::send_response_body(bool call_update)
 {
   Http2ClientSession *parent = static_cast(this->get_parent());
+  inactive_timeout_at= Thread::get_hrtime() + inactive_timeout;
 
   if (Http2::stream_priority_enabled) {
 SCOPED_MUTEX_LOCK(lock, parent->connection_state.mutex, this_ethread());
@@ -673,8 +674,9 @@ Http2Stream::send_response_body(bool call_update)
 SCOPED_MUTEX_LOCK(lock, parent->connection_state.mutex, this_ethread());
 parent->connection_state.send_data_frames(this);
 this->signal_write_event(call_update);
+// XXX The call to signal_write_event can destroy/free the Http2Stream.
+// Don't modify the Http2Stream after calling this method.
   }
-  inactive_timeout_at = Thread::get_hrtime() + inactive_timeout;
 }
 
 void



[trafficserver] branch master updated: Fix typo in header_normalize plugin.

2018-08-08 Thread shinrich
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 9d2e6df  Fix typo in header_normalize plugin.
9d2e6df is described below

commit 9d2e6df5f8a4f5899fe0f7f7441fda7dedf3d15c
Author: Susan Hinrichs 
AuthorDate: Wed Aug 8 16:27:36 2018 +

Fix typo in header_normalize plugin.
---
 plugins/experimental/header_normalize/header_normalize.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/experimental/header_normalize/header_normalize.cc 
b/plugins/experimental/header_normalize/header_normalize.cc
index d573ae6..1dddf35 100644
--- a/plugins/experimental/header_normalize/header_normalize.cc
+++ b/plugins/experimental/header_normalize/header_normalize.cc
@@ -172,7 +172,7 @@ TSRemapNewInstance(int /* argc */, char * /* argv[] */, 
void ** /* ih */, char *
 }
 
 void
-TSRemapDelteInstance(void * /* ih */)
+TSRemapDeleteInstance(void * /* ih */)
 {
 }
 



[trafficserver] 06/06: Cleans up Main.h

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit b17097c699d9014f1bb43efdd0711a30cae863e5
Author: Randall Meyer 
AuthorDate: Tue Aug 7 12:36:20 2018 -0700

Cleans up Main.h

Removes unused macros, variables and functions from Main.
Moves externs where needed.
Removes inclusion of Main.h where possible.
---
 iocore/hostdb/HostDB.cc  |  1 +
 iocore/net/P_NetVCTest.h |  1 +
 lib/ts/Trie.h|  1 +
 proxy/CacheControl.h |  1 -
 proxy/ControlBase.cc |  1 -
 proxy/ControlMatcher.cc  |  1 -
 proxy/IPAllow.cc |  1 -
 proxy/IPAllow.h  |  1 -
 proxy/Main.h | 39 ++--
 proxy/ParentSelection.cc |  1 -
 proxy/ParentSelection.h  |  1 -
 proxy/Plugin.cc  |  1 -
 proxy/ReverseProxy.cc|  1 -
 proxy/http/HttpBodyFactory.h |  1 -
 proxy/http/HttpProxyServerMain.cc|  1 -
 proxy/http/remap/AclFiltering.cc |  1 -
 proxy/http/remap/AclFiltering.h  |  1 -
 proxy/http/remap/UrlMapping.h|  1 -
 proxy/logging/Log.cc |  1 -
 proxy/logging/LogConfig.cc   |  1 -
 proxy/logging/LogStandalone.cc   |  1 -
 src/traffic_server/Crash.cc  |  3 +++
 src/traffic_server/InkAPI.cc |  3 +++
 src/traffic_server/traffic_server.cc |  4 ++--
 24 files changed, 13 insertions(+), 56 deletions(-)

diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 2726e7c..832b0e2 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -21,6 +21,7 @@
   limitations under the License.
  */
 
+#include "Main.h"
 #include "P_HostDB.h"
 #include "P_RefCountCacheSerializer.h"
 #include "ts/I_Layout.h"
diff --git a/iocore/net/P_NetVCTest.h b/iocore/net/P_NetVCTest.h
index 3e73599..85efd01 100644
--- a/iocore/net/P_NetVCTest.h
+++ b/iocore/net/P_NetVCTest.h
@@ -37,6 +37,7 @@
 #pragma once
 
 #include "ts/ink_platform.h"
+#include "ts/Regression.h"
 
 class VIO;
 class MIOBuffer;
diff --git a/lib/ts/Trie.h b/lib/ts/Trie.h
index e371c95..cbf26a0 100644
--- a/lib/ts/Trie.h
+++ b/lib/ts/Trie.h
@@ -27,6 +27,7 @@
 #include 
 
 #include "ts/List.h"
+#include "ts/Diags.h"
 
 // Note that you should provide the class to use here, but we'll store
 // pointers to such objects internally.
diff --git a/proxy/CacheControl.h b/proxy/CacheControl.h
index 8383179..523fa3a 100644
--- a/proxy/CacheControl.h
+++ b/proxy/CacheControl.h
@@ -30,7 +30,6 @@
 
 #pragma once
 
-#include "Main.h"
 #include "P_EventSystem.h"
 #include "ControlBase.h"
 #include "ts/Result.h"
diff --git a/proxy/ControlBase.cc b/proxy/ControlBase.cc
index cfa08c8..d37f709 100644
--- a/proxy/ControlBase.cc
+++ b/proxy/ControlBase.cc
@@ -32,7 +32,6 @@
 #include "ts/ink_defs.h"
 #include "ts/ink_time.h"
 
-#include "Main.h"
 #include "URL.h"
 #include "ts/Tokenizer.h"
 #include "ControlBase.h"
diff --git a/proxy/ControlMatcher.cc b/proxy/ControlMatcher.cc
index d717d1d..c55fdc6 100644
--- a/proxy/ControlMatcher.cc
+++ b/proxy/ControlMatcher.cc
@@ -33,7 +33,6 @@
 #include "ts/ink_config.h"
 #include "ts/MatcherUtils.h"
 #include "ts/Tokenizer.h"
-#include "Main.h"
 #include "ProxyConfig.h"
 #include "ControlMatcher.h"
 #include "CacheControl.h"
diff --git a/proxy/IPAllow.cc b/proxy/IPAllow.cc
index 09fe6f6..3d26841 100644
--- a/proxy/IPAllow.cc
+++ b/proxy/IPAllow.cc
@@ -29,7 +29,6 @@
  /
 
 #include "ts/ink_platform.h"
-#include "Main.h"
 #include "IPAllow.h"
 #include "ProxyConfig.h"
 #include "P_EventSystem.h"
diff --git a/proxy/IPAllow.h b/proxy/IPAllow.h
index 7039095..2d620a9 100644
--- a/proxy/IPAllow.h
+++ b/proxy/IPAllow.h
@@ -30,7 +30,6 @@
 
 #pragma once
 
-#include "Main.h"
 #include "hdrs/HTTP.h"
 #include "ts/IpMap.h"
 #include "ProxyConfig.h"
diff --git a/proxy/Main.h b/proxy/Main.h
index 14e36e3..9963287 100644
--- a/proxy/Main.h
+++ b/proxy/Main.h
@@ -20,61 +20,26 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
+
 #pragma once
 
 #include "ts/ink_platform.h"
-#include "ts/ink_apidefs.h"
-#include 
-#include "ts/Regression.h"
-#include "ts/I_Version.h"
 
 //
 // Constants
 //
 #define ET_CACHE ET_CALL
 
-// TODO: consolidate location of these defaults
-#define DEFAULT_ROOT_DIRECTORY PREFIX
-#define DEFAULT_LOCAL_STATE_DIRECTORY "var/trafficserver"
-#define DEFAULT_SYSTEM_CONFIG_DIRECTORY "etc/trafficserver"
-#define DEFAULT_LOG_DIRECTORY "var/log/trafficserver"
-#define DEFAULT_BIND_STDOUT ""
-#define DEFAULT_BIND_STDERR ""
-
 //
 // Global Data
 //
 // Global Configuration
+
 extern int accept_till_done;
-extern int http_accept_file_descriptor;
-extern int command_flag;
 extern int 

[trafficserver] 05/06: Removes dead/unused/unreferenced code from proxy/logging

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit af5b4dda167d3a1bc4c28fddfaeccb7b057f8c80
Author: Randall Meyer 
AuthorDate: Thu Aug 2 17:15:47 2018 -0700

Removes dead/unused/unreferenced code from proxy/logging
---
 proxy/logging/Log.h| 12 +---
 proxy/logging/LogBuffer.cc | 10 --
 proxy/logging/LogBuffer.h  |  1 -
 proxy/logging/LogField.h   |  2 --
 proxy/logging/LogFile.cc   |  4 
 proxy/logging/LogFile.h|  4 
 6 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/proxy/logging/Log.h b/proxy/logging/Log.h
index cdf0e56..2d7db9c 100644
--- a/proxy/logging/Log.h
+++ b/proxy/logging/Log.h
@@ -64,7 +64,6 @@ class LogAccess;
 class LogFieldList;
 class LogFilterList;
 class LogFormatList;
-// class LogBufferList; vl: we don't need it here
 struct LogBufferHeader;
 class LogFile;
 class LogBuffer;
@@ -136,14 +135,7 @@ public:
 LOGCAT   = 4,
   };
 
-  enum CollationMode {
-NO_COLLATION = 0,
-COLLATION_HOST,
-SEND_STD_FMTS,
-SEND_NON_XML_CUSTOM_FMTS,
-SEND_STD_AND_NON_XML_CUSTOM_FMTS,
-N_COLLATION_MODES
-  };
+  enum CollationMode { NO_COLLATION = 0, COLLATION_HOST, N_COLLATION_MODES };
 
   enum RollingEnabledValues {
 NO_ROLLING = 0,
@@ -190,8 +182,6 @@ public:
   inkcoreapi static LogObject *error_log;
   static LogConfig *config;
   static LogFieldList global_field_list;
-  //static LogBufferList global_buffer_full_list; vl: not used
-  //static LogBufferList global_buffer_delete_list; vl: not used
   static InkHashTable *field_symbol_hash;
   static LogFormat *global_scrap_format;
   static LogObject *global_scrap_object;
diff --git a/proxy/logging/LogBuffer.cc b/proxy/logging/LogBuffer.cc
index 86b1344..f17ecef 100644
--- a/proxy/logging/LogBuffer.cc
+++ b/proxy/logging/LogBuffer.cc
@@ -63,16 +63,6 @@ int32_t LogBuffer::M_ID;
   -*/
 
 char *
-LogBufferHeader::fmt_name()
-{
-  char *addr = nullptr;
-  if (fmt_name_offset) {
-addr = (char *)this + fmt_name_offset;
-  }
-  return addr;
-}
-
-char *
 LogBufferHeader::fmt_fieldlist()
 {
   char *addr = nullptr;
diff --git a/proxy/logging/LogBuffer.h b/proxy/logging/LogBuffer.h
index 1a7138e..e613e87 100644
--- a/proxy/logging/LogBuffer.h
+++ b/proxy/logging/LogBuffer.h
@@ -87,7 +87,6 @@ struct LogBufferHeader {
 
   // some helper functions to return the header strings
 
-  char *fmt_name(); // not used
   char *fmt_fieldlist();
   char *fmt_printf();
   char *src_hostname();
diff --git a/proxy/logging/LogField.h b/proxy/logging/LogField.h
index c892091..e76f9e0 100644
--- a/proxy/logging/LogField.h
+++ b/proxy/logging/LogField.h
@@ -207,8 +207,6 @@ public:
   LogField =(const LogField ) = delete;
 
 private:
-  // luis, check where this is used and what it does
-  //void init (char *name, char *symbol, Type type);
   LogField();
 };
 
diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index 87898f4..a9cd90c 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -636,7 +636,3 @@ LogFile::get_fd()
 return -1;
   }
 }
-
-/***
- LogFileList IS NOT USED
-/
diff --git a/proxy/logging/LogFile.h b/proxy/logging/LogFile.h
index 1b72d6a..bb14969 100644
--- a/proxy/logging/LogFile.h
+++ b/proxy/logging/LogFile.h
@@ -131,7 +131,3 @@ private:
   // -- member functions not allowed --
   LogFile();
 };
-
-/***
- LogFileList IS NOT USED
-/



[trafficserver] 02/06: Converts more source files to #pragma once

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 02712425c8d178253c5a8901699aeaa0e6f728c5
Author: Randall Meyer 
AuthorDate: Mon Jul 30 13:44:53 2018 -0700

Converts more source files to #pragma once
---
 iocore/utils/I_Machine.h| 5 +
 lib/records/test_RecordsConfig.h| 4 +---
 lib/ts/ink_config.h.in  | 5 +
 plugins/esi/lib/SpecialIncludeHandler.h | 6 +-
 proxy/TimeTrace.h   | 7 ---
 5 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/iocore/utils/I_Machine.h b/iocore/utils/I_Machine.h
index c673061..fa16af0 100644
--- a/iocore/utils/I_Machine.h
+++ b/iocore/utils/I_Machine.h
@@ -28,8 +28,7 @@
 
  */
 
-#ifndef _I_Machine_h
-#define _I_Machine_h
+#pragma once
 
 #include "ts/ink_inet.h"
 #include "ts/ink_uuid.h"
@@ -93,5 +92,3 @@ protected:
   InkHashTable *machine_id_strings;
   InkHashTable *machine_id_ipaddrs;
 };
-
-#endif
diff --git a/lib/records/test_RecordsConfig.h b/lib/records/test_RecordsConfig.h
index df1884b..e4b8c48 100644
--- a/lib/records/test_RecordsConfig.h
+++ b/lib/records/test_RecordsConfig.h
@@ -21,8 +21,6 @@
   limitations under the License.
  */
 
-#ifndef _TEST_RECORDS_CONFIG_H_
+#pragma once
 
 void RecordsConfigRegister();
-
-#endif
diff --git a/lib/ts/ink_config.h.in b/lib/ts/ink_config.h.in
index f4b491b..c45487f 100644
--- a/lib/ts/ink_config.h.in
+++ b/lib/ts/ink_config.h.in
@@ -22,8 +22,7 @@
   limitations under the License.
  */
 
-#ifndef _ink_config_h
-#define _ink_config_h
+#pragma once
 
 // Note: All "defines" should be prefixed with TS_ when appropriate, please
 // don't use ATS_ any more.
@@ -127,5 +126,3 @@
 /* clang-format on */
 
 static const int DEFAULT_STACKSIZE = @default_stack_size@;
-
-#endif /* _ink_config_h */
diff --git a/plugins/esi/lib/SpecialIncludeHandler.h 
b/plugins/esi/lib/SpecialIncludeHandler.h
index 29a9109..5caab7a 100644
--- a/plugins/esi/lib/SpecialIncludeHandler.h
+++ b/plugins/esi/lib/SpecialIncludeHandler.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_SPECIAL_INCLUDE_HANDLER
-
-#define _ESI_SPECIAL_INCLUDE_HANDLER
+#pragma once
 
 #include "HttpDataFetcher.h"
 #include "Variables.h"
@@ -69,5 +67,3 @@ protected:
   HttpDataFetcher &_http_fetcher;
 };
 }; // namespace EsiLib
-
-#endif
diff --git a/proxy/TimeTrace.h b/proxy/TimeTrace.h
index fb3f42f..66becc2 100644
--- a/proxy/TimeTrace.h
+++ b/proxy/TimeTrace.h
@@ -21,13 +21,6 @@
   limitations under the License.
  */
 
-/
-
-  TimeTrace.h
-
-
- /
-
 #pragma once
 
 // #define ENABLE_TIME_TRACE



[trafficserver] 01/06: mgmt: General cleanup

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 2f305a59b5201f94d872c7176df65d71dfd88557
Author: Randall Meyer 
AuthorDate: Mon Jul 30 13:23:28 2018 -0700

mgmt: General cleanup

Including:
* removing unused/unrequired includes
* moving file description to top comment
* pragma once conversion
* remove unused preprocessor macros
---
 mgmt/Alarms.cc  |  2 --
 mgmt/Alarms.h   | 20 +++-
 mgmt/BaseManager.cc | 14 +-
 mgmt/BaseManager.h  | 21 ++---
 mgmt/FileManager.cc | 10 +-
 mgmt/FileManager.h  | 15 +++
 mgmt/LocalManager.cc|  1 +
 mgmt/LocalManager.h | 18 +-
 mgmt/MgmtDefs.h | 12 +---
 mgmt/ProcessManager.cc  |  3 ---
 mgmt/ProcessManager.h   | 16 +++-
 mgmt/ProxyConfig.cc |  5 +++--
 mgmt/ProxyConfig.h  | 14 +-
 mgmt/RecordsConfig.h|  2 --
 mgmt/RecordsConfigUtils.cc  |  9 -
 mgmt/Rollback.cc| 16 
 mgmt/Rollback.h | 25 ++---
 mgmt/WebMgmtUtils.cc| 13 +
 mgmt/WebMgmtUtils.h | 26 ++
 mgmt/api/CoreAPI.cc |  2 +-
 mgmt/api/EventControlMain.h |  1 +
 21 files changed, 43 insertions(+), 202 deletions(-)

diff --git a/mgmt/Alarms.cc b/mgmt/Alarms.cc
index 0f02a1c..f2e67b9 100644
--- a/mgmt/Alarms.cc
+++ b/mgmt/Alarms.cc
@@ -25,10 +25,8 @@
 #include "ts/ink_string.h"
 #include "ts/ink_file.h"
 #include "ts/ink_time.h"
-#include "LocalManager.h"
 #include "MgmtUtils.h"
 #include "Alarms.h"
-#include "ts/Diags.h"
 
 #include "P_RecCore.h"
 
diff --git a/mgmt/Alarms.h b/mgmt/Alarms.h
index 229df0f..8eb55e0 100644
--- a/mgmt/Alarms.h
+++ b/mgmt/Alarms.h
@@ -1,6 +1,7 @@
 /** @file
 
-  A brief file description
+  Class definitions for alarms keeper, class keeps a queue of Alarm
+  objects. Can be polled on status of alarms.
 
   @section license License
 
@@ -21,22 +22,8 @@
   limitations under the License.
  */
 
-/*
- *
- * Alarms.h
- *   Class definitions for alarms keeper, class keeps a queue of Alarm
- * objects. Can be polled on status of alarms.
- *
- * $Date: 2007-10-05 16:56:44 $
- *
- *
- */
-
 #pragma once
 
-#include 
-#include 
-
 #include "ts/ink_hash_table.h"
 #include "ts/ink_mutex.h"
 
@@ -45,8 +32,7 @@ class AppVersionInfo;
 /***
  *
  * MODULARIZATTION: if you are adding new alarms, please ensure to add
- * the corresponding alarms in librecords/I_RecAlarms.h
- *
+ * the corresponding alarms in lib/records/I_RecAlarms.h
  *
  ***/
 
diff --git a/mgmt/BaseManager.cc b/mgmt/BaseManager.cc
index e2209f7..9e2e4d5 100644
--- a/mgmt/BaseManager.cc
+++ b/mgmt/BaseManager.cc
@@ -1,6 +1,6 @@
 /** @file
 
-  A brief file description
+  Member function definitions for Base Manager class.
 
   @section license License
 
@@ -21,18 +21,6 @@
   limitations under the License.
  */
 
-/**
- *
- * BaseManager.cc
- *   Member function definitions for Base Manager class.
- *
- * $Date: 2003-06-01 18:37:18 $
- *
- *
- */
-
-#include "ts/ink_platform.h"
-#include "ts/ink_hash_table.h"
 #include "ts/ink_memory.h"
 #include "BaseManager.h"
 
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index 238ffe5..25152a7 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -1,6 +1,6 @@
 /** @file
 
-  A brief file description
+  Base Manager Class, base class for all managers.
 
   @section license License
 
@@ -21,16 +21,6 @@
   limitations under the License.
  */
 
-/**
- *
- * BaseManager.h
- *   Base Manager Class, base class for all managers.
- *
- * $Date: 2004-02-03 22:12:02 $
- *
- *
- */
-
 #pragma once
 
 #include "ts/ink_thread.h"
@@ -41,17 +31,10 @@
 #include "MgmtDefs.h"
 #include "MgmtMarshall.h"
 
-/***
- * used by LocalManager and in Proxy Main. *
- */
-#define MAX_OPTION_SIZE 2048
-#define MAX_PROXY_SERVER_PORTS 2048
-#define MAX_ATTR_LEN 5
-/***/
-
 /*
  * MgmtEvent defines.
  */
+
 // Event flows: traffic manager -> traffic server
 #define MGMT_EVENT_SYNC_KEY 1
 #define MGMT_EVENT_SHUTDOWN 10001
diff --git a/mgmt/FileManager.cc b/mgmt/FileManager.cc
index ad2de62..35adfb9 100644
--- a/mgmt/FileManager.cc
+++ b/mgmt/FileManager.cc
@@ -21,23 +21,15 @@
   limitations under the License.
  */
 
+#include "FileManager.h"
 #include "ts/ink_platform.h"
 #include "ts/ink_file.h"
-#include "ts/I_Layout.h"
-#include "FileManager.h"
-#include "Main.h"
 #include "Rollback.h"
 #include 

[trafficserver] 04/06: Removes weird comment 'MAGIC_EDITING_TAG'

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 0242647ae91ad226ad6a857d17857d3d4b1a42c1
Author: Randall Meyer 
AuthorDate: Tue Jul 31 21:08:46 2018 -0700

Removes weird comment 'MAGIC_EDITING_TAG'
---
 iocore/dns/DNS.cc| 2 +-
 iocore/eventsystem/UnixEventProcessor.cc | 2 +-
 lib/ts/Tokenizer.cc  | 2 +-
 lib/ts/ink_defs.cc   | 2 +-
 lib/ts/ink_error.cc  | 2 +-
 proxy/hdrs/HttpCompat.cc | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index fc38127..479a22a 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -21,7 +21,7 @@
   limitations under the License.
  */
 
-#include "P_DNS.h" /* MAGIC_EDITING_TAG */
+#include "P_DNS.h"
 #include 
 
 #ifdef SPLIT_DNS
diff --git a/iocore/eventsystem/UnixEventProcessor.cc 
b/iocore/eventsystem/UnixEventProcessor.cc
index d2e86c7..8344650 100644
--- a/iocore/eventsystem/UnixEventProcessor.cc
+++ b/iocore/eventsystem/UnixEventProcessor.cc
@@ -21,7 +21,7 @@
   limitations under the License.
  */
 
-#include "P_EventSystem.h" /* MAGIC_EDITING_TAG */
+#include "P_EventSystem.h"
 #include 
 #if TS_USE_HWLOC
 #if HAVE_ALLOCA_H
diff --git a/lib/ts/Tokenizer.cc b/lib/ts/Tokenizer.cc
index 13a3330..8fc2a2d 100644
--- a/lib/ts/Tokenizer.cc
+++ b/lib/ts/Tokenizer.cc
@@ -33,7 +33,7 @@
  *
  *
  *
- / 
/* MAGIC_EDITING_TAG */
+ /
 
 Tokenizer::Tokenizer(const char *StrOfDelimiters)
 {
diff --git a/lib/ts/ink_defs.cc b/lib/ts/ink_defs.cc
index 65b02f5..6b28c1e 100644
--- a/lib/ts/ink_defs.cc
+++ b/lib/ts/ink_defs.cc
@@ -36,7 +36,7 @@
 #endif
 #if defined(linux)
 #include 
-#endif /* MAGIC_EDITING_TAG */
+#endif
 
 int off = 0;
 int on  = 1;
diff --git a/lib/ts/ink_error.cc b/lib/ts/ink_error.cc
index cfa1868..f0bc6b8 100644
--- a/lib/ts/ink_error.cc
+++ b/lib/ts/ink_error.cc
@@ -27,7 +27,7 @@
 #include "ts/ink_stack_trace.h"
 
 #include 
-#include  /* MAGIC_EDITING_TAG */
+#include 
 
 /**
   This routine prints/logs an error message given the printf format
diff --git a/proxy/hdrs/HttpCompat.cc b/proxy/hdrs/HttpCompat.cc
index 4ce1008..313e1a8 100644
--- a/proxy/hdrs/HttpCompat.cc
+++ b/proxy/hdrs/HttpCompat.cc
@@ -23,7 +23,7 @@
 
 #include "ts/ink_platform.h"
 #include "HttpCompat.h"
-#include "HdrUtils.h" /* MAGIC_EDITING_TAG */
+#include "HdrUtils.h"
 
 //
 //



[trafficserver] 03/06: Removes unused prefetch related code

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 96c4f99401b5abfc4cd5b54c292a0c562b3cb32a
Author: Randall Meyer 
AuthorDate: Mon Jul 30 13:51:31 2018 -0700

Removes unused prefetch related code

This was originally removed in 0f7128b04b4fc277ebda1c91e51b39e35b4217d8
---
 iocore/eventsystem/I_Event.h |  1 -
 proxy/Transform.cc   |  6 --
 proxy/TransformInternal.h| 15 ---
 3 files changed, 22 deletions(-)

diff --git a/iocore/eventsystem/I_Event.h b/iocore/eventsystem/I_Event.h
index e964636..e039b0a 100644
--- a/iocore/eventsystem/I_Event.h
+++ b/iocore/eventsystem/I_Event.h
@@ -88,7 +88,6 @@
 
 // define misc events here
 #define ONE_WAY_TUNNEL_EVENT_PEER_CLOSE (SIMPLE_EVENT_EVENTS_START + 1)
-#define PREFETCH_EVENT_SEND_URL (SIMPLE_EVENT_EVENTS_START + 2)
 
 typedef int EventType;
 const int ET_CALL = 0;
diff --git a/proxy/Transform.cc b/proxy/Transform.cc
index d45d2df..516f8e9 100644
--- a/proxy/Transform.cc
+++ b/proxy/Transform.cc
@@ -65,9 +65,6 @@
 #include "HdrUtils.h"
 #include "Log.h"
 
-#define ART 1
-#define AGIF 2
-
 TransformProcessor transformProcessor;
 
 /*-
@@ -76,9 +73,6 @@ TransformProcessor transformProcessor;
 void
 TransformProcessor::start()
 {
-#ifdef PREFETCH
-  prefetchProcessor.start();
-#endif
 }
 
 /*-
diff --git a/proxy/TransformInternal.h b/proxy/TransformInternal.h
index 6ba655b..754b241 100644
--- a/proxy/TransformInternal.h
+++ b/proxy/TransformInternal.h
@@ -24,9 +24,6 @@
 #pragma once
 
 #include "HttpSM.h"
-#include "MIME.h"
-#include "Transform.h"
-#include "P_EventSystem.h"
 
 class TransformVConnection;
 
@@ -116,7 +113,6 @@ public:
  int content_type_len, int64_t content_length);
   ~RangeTransform();
 
-  // void parse_range_and_compare();
   int handle_event(int event, void *edata);
 
   void transform_to_range();
@@ -129,7 +125,6 @@ public:
   MIOBuffer *m_output_buf;
   IOBufferReader *m_output_reader;
 
-  // MIMEField *m_range_field;
   HTTPHdr *m_transform_resp;
   VIO *m_output_vio;
   int64_t m_range_content_length;
@@ -142,13 +137,3 @@ public:
   int64_t m_output_cl;
   int64_t m_done;
 };
-
-#ifdef PREFETCH
-class PrefetchProcessor
-{
-public:
-  void start();
-};
-
-extern PrefetchProcessor prefetchProcessor;
-#endif // PREFETCH



[trafficserver] branch master updated (47cb274 -> b17097c)

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 47cb274  Detects compiler support of C++17 at configure time
 new 2f305a5  mgmt: General cleanup
 new 0271242  Converts more source files to #pragma once
 new 96c4f99  Removes unused prefetch related code
 new 0242647  Removes weird comment 'MAGIC_EDITING_TAG'
 new af5b4dd  Removes dead/unused/unreferenced code from proxy/logging
 new b17097c  Cleans up Main.h

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:
 iocore/dns/DNS.cc|  2 +-
 iocore/eventsystem/I_Event.h |  1 -
 iocore/eventsystem/UnixEventProcessor.cc |  2 +-
 iocore/hostdb/HostDB.cc  |  1 +
 iocore/net/P_NetVCTest.h |  1 +
 iocore/utils/I_Machine.h |  5 +---
 lib/records/test_RecordsConfig.h |  4 +---
 lib/ts/Tokenizer.cc  |  2 +-
 lib/ts/Trie.h|  1 +
 lib/ts/ink_config.h.in   |  5 +---
 lib/ts/ink_defs.cc   |  2 +-
 lib/ts/ink_error.cc  |  2 +-
 mgmt/Alarms.cc   |  2 --
 mgmt/Alarms.h| 20 +++-
 mgmt/BaseManager.cc  | 14 +---
 mgmt/BaseManager.h   | 21 ++---
 mgmt/FileManager.cc  | 10 +---
 mgmt/FileManager.h   | 15 +++-
 mgmt/LocalManager.cc |  1 +
 mgmt/LocalManager.h  | 18 ---
 mgmt/MgmtDefs.h  | 12 +-
 mgmt/ProcessManager.cc   |  3 ---
 mgmt/ProcessManager.h| 16 +++--
 mgmt/ProxyConfig.cc  |  5 ++--
 mgmt/ProxyConfig.h   | 14 +---
 mgmt/RecordsConfig.h |  2 --
 mgmt/RecordsConfigUtils.cc   |  9 
 mgmt/Rollback.cc | 16 +
 mgmt/Rollback.h  | 25 ++--
 mgmt/WebMgmtUtils.cc | 13 +--
 mgmt/WebMgmtUtils.h  | 26 ++---
 mgmt/api/CoreAPI.cc  |  2 +-
 mgmt/api/EventControlMain.h  |  1 +
 plugins/esi/lib/SpecialIncludeHandler.h  |  6 +
 proxy/CacheControl.h |  1 -
 proxy/ControlBase.cc |  1 -
 proxy/ControlMatcher.cc  |  1 -
 proxy/IPAllow.cc |  1 -
 proxy/IPAllow.h  |  1 -
 proxy/Main.h | 39 ++--
 proxy/ParentSelection.cc |  1 -
 proxy/ParentSelection.h  |  1 -
 proxy/Plugin.cc  |  1 -
 proxy/ReverseProxy.cc|  1 -
 proxy/TimeTrace.h|  7 --
 proxy/Transform.cc   |  6 -
 proxy/TransformInternal.h| 15 
 proxy/hdrs/HttpCompat.cc |  2 +-
 proxy/http/HttpBodyFactory.h |  1 -
 proxy/http/HttpProxyServerMain.cc|  1 -
 proxy/http/remap/AclFiltering.cc |  1 -
 proxy/http/remap/AclFiltering.h  |  1 -
 proxy/http/remap/UrlMapping.h|  1 -
 proxy/logging/Log.cc |  1 -
 proxy/logging/Log.h  | 12 +-
 proxy/logging/LogBuffer.cc   | 10 
 proxy/logging/LogBuffer.h|  1 -
 proxy/logging/LogConfig.cc   |  1 -
 proxy/logging/LogField.h |  2 --
 proxy/logging/LogFile.cc |  4 
 proxy/logging/LogFile.h  |  4 
 proxy/logging/LogStandalone.cc   |  1 -
 src/traffic_server/Crash.cc  |  3 +++
 src/traffic_server/InkAPI.cc |  3 +++
 src/traffic_server/traffic_server.cc |  4 ++--
 65 files changed, 67 insertions(+), 341 deletions(-)



[trafficserver] branch 8.0.x updated: Detects compiler support of C++17 at configure time

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 287c793  Detects compiler support of C++17 at configure time
287c793 is described below

commit 287c793365a2f11202f582562191afc48251cc5b
Author: Randall Meyer 
AuthorDate: Wed Jun 13 10:18:11 2018 -0700

Detects compiler support of C++17 at configure time

Addresses issue #3769

(cherry picked from commit 47cb274d799d5331dad19027705d8c5719959b8c)
---
 configure.ac | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/configure.ac b/configure.ac
index c78d04b..3992869 100644
--- a/configure.ac
+++ b/configure.ac
@@ -624,6 +624,25 @@ CXXFLAGS="${_ts_saved_CXXFLAGS}"
 # All compilers we support have 'gnu99' as an available C standard
 TS_ADDTO(AM_CFLAGS, [-std=gnu99])
 
+ac_save_CXX="$CXX"
+CXX="$CXX -std=c++17"
+AC_LANG_PUSH(C++)
+AC_MSG_CHECKING([checking whether $CXX supports -std=c++17])
+AC_COMPILE_IFELSE([
+AC_LANG_PROGRAM([
+#if __cplusplus < 201703L
+#error "This is not C++17"
+#endif
+], []
+)], [
+AC_MSG_RESULT(yes)
+], [
+AC_MSG_RESULT(no)
+AC_MSG_ERROR([*** A compiler with support for -std=c++17 is required.])
+])
+AC_LANG_POP
+CXX="$ac_save_CXX"
+
 TS_ADDTO(AM_CXXFLAGS, [-std=c++17])
 
 dnl AC_PROG_SED is only available from version 2.6 (released in 2003). CentosOS



[trafficserver] branch 8.0.x updated: Cleans up README and sample config for compress plugin

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 29e3462  Cleans up README and sample config for compress plugin
29e3462 is described below

commit 29e34623d789fe21da445f0fdc5ee91777365257
Author: Randall Meyer 
AuthorDate: Mon Aug 6 09:46:31 2018 -0700

Cleans up README and sample config for compress plugin

Removes the duplicated sample config and configuration option documentation
in README.

(cherry picked from commit a5e1ff18c02585e4b1329ebdf0c44e56ff6d574b)
---
 plugins/compress/README | 57 ++---
 plugins/compress/sample.compress.config | 13 +---
 2 files changed, 11 insertions(+), 59 deletions(-)

diff --git a/plugins/compress/README b/plugins/compress/README
index 279de7e..797ea58 100644
--- a/plugins/compress/README
+++ b/plugins/compress/README
@@ -2,7 +2,7 @@ What this plugin does:
 
 =
 this plugin compresses responses, via gzip or brotli, whichever is applicable
-it can compress origin respones as well as cached responses
+it can compress origin responses as well as cached responses
 
 installation:
 make && sudo make install
@@ -22,60 +22,9 @@ in this case, the plugin will use a default behaviour:
 - no urls are disallowed from compression
 
 alternatively, a configuration can also be specified:
-compress.so /sample.compress.config
+compress.so /sample.compress.config
 
 after modifying plugin.config, restart traffic server (sudo traffic_ctl server 
restart)
 the configuration is re-read when a management update is given (sudo 
traffic_ctl config reload)
 
-a sample configuration (sample.compress.config):
-
-##
-#flags and options are:
-#
-# enable-gzip: default true, set true/false to enable/disable plugin for 
specific host
-#
-# remove-accept-encoding: this sets if the plugin should hide the accept 
encoding from origin servers
-# - to ease the load on the origins
-# - for when the proxy parses responses, and the resulting 
compression/decompression
-#   is wastefull
-#
-# cache: when set, the plugin stores the uncompressed and compressed response 
as alternates
-#
-# compressible-content-type: wildcard pattern for matching compressible 
content types
-#
-# allow: wildcard pattern for enabling compression on urls. prefix with ! to 
exclude from compression
-#
-# supported-algorithms: compression algorithms supported. comma separated 
algorithms. Default is gzip
-#
-##
-
-#first, we configure the default/global plugin behaviour
-enabled true
-remove-accept-encoding true
-cache false
-
-compressible-content-type text/*
-compressible-content-type *javascript*
-#disabling is possible too
-compressible-content-type !text/javascript
-
-allow */here/*
-#disabling is possible too
-allow !*/nothere/*
-
-#supported algorithms
-supported-algorithms br,gzip
-
-#override the global configuration for a host.
-#www.foo.nl does NOT inherit anything
-[www.foo.nl]
-enabled true
-remove-accept-encoding true
-compressible-content-type text/*
-
-cache false
-allow !/notthis/*.js
-allow !/notthat*
-
-allow /this/*.js
-allow !/notthat/*.css
+See sample.config.compress for an example configuration and the options that 
are available
diff --git a/plugins/compress/sample.compress.config 
b/plugins/compress/sample.compress.config
index 61151a4..b1431a9 100644
--- a/plugins/compress/sample.compress.config
+++ b/plugins/compress/sample.compress.config
@@ -23,7 +23,7 @@
 # remove-accept-encoding: this sets if the plugin should hide the accept 
encoding from origin servers
 # - to ease the load on the origins
 # - for when the proxy parses responses, and the resulting 
compression/decompression
-#   is wastefull
+#   is wasteful
 #
 # cache: when set, the plugin stores the uncompressed and compressed response 
as alternates
 #
@@ -46,25 +46,28 @@ cache false
 
 compressible-content-type text/*
 compressible-content-type *javascript*
+#disabling is possible too
+compressible-content-type !text/javascript
+
 compressible-status-code 200
 allow !/notthis/*.js
 allow !/notthat*
 allow !*/bla*
 
 minimum-content-length 1024
+#supported algorithms
+supported-algorithms br,gzip
 
 #override the global configuration for a host.
 #www.foo.nl does NOT inherit anything
 [www.foo.nl]
 enabled true
+cache true
 remove-accept-encoding true
 compressible-content-type text/*
-#disable a content type
-compressible-content-type !text/javascript
-
 compressible-status-code 200,206,409
 minimum-content-length 1024
 
-cache false
 allow /this/*.js
+allow !/notthis/*.js
 allow !/notthat*



[trafficserver] branch master updated: Detects compiler support of C++17 at configure time

2018-08-08 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm 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 47cb274  Detects compiler support of C++17 at configure time
47cb274 is described below

commit 47cb274d799d5331dad19027705d8c5719959b8c
Author: Randall Meyer 
AuthorDate: Wed Jun 13 10:18:11 2018 -0700

Detects compiler support of C++17 at configure time

Addresses issue #3769
---
 configure.ac | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/configure.ac b/configure.ac
index e85747e..ab0d2d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -663,6 +663,25 @@ CXXFLAGS="${_ts_saved_CXXFLAGS}"
 # All compilers we support have 'gnu99' as an available C standard
 TS_ADDTO(AM_CFLAGS, [-std=gnu99])
 
+ac_save_CXX="$CXX"
+CXX="$CXX -std=c++17"
+AC_LANG_PUSH(C++)
+AC_MSG_CHECKING([checking whether $CXX supports -std=c++17])
+AC_COMPILE_IFELSE([
+AC_LANG_PROGRAM([
+#if __cplusplus < 201703L
+#error "This is not C++17"
+#endif
+], []
+)], [
+AC_MSG_RESULT(yes)
+], [
+AC_MSG_RESULT(no)
+AC_MSG_ERROR([*** A compiler with support for -std=c++17 is required.])
+])
+AC_LANG_POP
+CXX="$ac_save_CXX"
+
 TS_ADDTO(AM_CXXFLAGS, [-std=c++17])
 
 dnl AC_PROG_SED is only available from version 2.6 (released in 2003). CentosOS



[trafficserver] branch 8.0.x updated: Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet

2018-08-08 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
 new 1f8fe8f  Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet
1f8fe8f is described below

commit 1f8fe8fb8520ec5f618f779d3811bbc6902df338
Author: Leif Hedstrom 
AuthorDate: Mon Aug 6 16:36:06 2018 -0600

Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet

This also adds a new API, TSHttpTxnStatusGet(TSHttpTxn txnp),
which is the corresponding Getter for this functionality.

(cherry picked from commit 0570c2945dcf9e0c8ac996c2f854f501d2cf3a35)
---
 example/remap/remap.cc |  2 +-
 example/secure_link/secure_link.c  |  2 +-
 lib/cppapi/Transaction.cc  |  2 +-
 plugins/authproxy/authproxy.cc |  2 +-
 plugins/experimental/geoip_acl/geoip_acl.cc|  2 +-
 plugins/experimental/hipes/hipes.cc| 22 +++---
 .../memcached_remap/memcached_remap.cc |  2 +-
 plugins/experimental/mp4/mp4.cc|  2 +-
 plugins/experimental/mysql_remap/mysql_remap.cc|  2 +-
 plugins/experimental/uri_signing/uri_signing.c |  2 +-
 plugins/experimental/url_sig/url_sig.c |  2 +-
 plugins/header_rewrite/operators.cc|  6 +++---
 plugins/lua/ts_lua_http.c  |  4 ++--
 plugins/regex_remap/regex_remap.cc |  6 +++---
 plugins/s3_auth/s3_auth.cc |  4 ++--
 proxy/api/ts/ts.h  |  4 ++--
 src/traffic_server/InkAPI.cc   | 15 ---
 tests/tools/plugins/custom204plugin.cc |  2 +-
 18 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/example/remap/remap.cc b/example/remap/remap.cc
index 302a261..26aeb86 100644
--- a/example/remap/remap.cc
+++ b/example/remap/remap.cc
@@ -283,7 +283,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo 
*rri)
 
 size_t len = snprintf(tmp, 255, "This is very small example of TS API 
usage!\nIteration %d!\nHTTP return code %d\n",
   my_local_counter, TS_HTTP_STATUS_CONTINUE + 
my_local_counter);
-TSHttpTxnSetHttpRetStatus((TSHttpTxn)rh, 
(TSHttpStatus)((int)TS_HTTP_STATUS_CONTINUE + my_local_counter));
+TSHttpTxnStatusSet((TSHttpTxn)rh, 
(TSHttpStatus)((int)TS_HTTP_STATUS_CONTINUE + my_local_counter));
 TSHttpTxnErrorBodySet((TSHttpTxn)rh, tmp, len, nullptr); // Defaults to 
text/html
 my_local_counter++;
   }
diff --git a/example/secure_link/secure_link.c 
b/example/secure_link/secure_link.c
index 7116021..9bf8506 100644
--- a/example/secure_link/secure_link.c
+++ b/example/secure_link/secure_link.c
@@ -126,7 +126,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo 
*rri)
 }
 if (sli->strict) {
   TSDebug(PLUGIN_NAME, "request is DENY");
-  TSHttpTxnSetHttpRetStatus(rh, TS_HTTP_STATUS_FORBIDDEN);
+  TSHttpTxnStatusSet(rh, TS_HTTP_STATUS_FORBIDDEN);
   i = TSREMAP_NO_REMAP;
 } else {
   TSDebug(PLUGIN_NAME, "request is PASS");
diff --git a/lib/cppapi/Transaction.cc b/lib/cppapi/Transaction.cc
index afc2019..e4f7c18 100644
--- a/lib/cppapi/Transaction.cc
+++ b/lib/cppapi/Transaction.cc
@@ -200,7 +200,7 @@ void
 Transaction::setStatusCode(HttpStatus code)
 {
   LOG_DEBUG("Transaction tshttptxn=%p setting status code: %d", state_->txn_, 
code);
-  TSHttpTxnSetHttpRetStatus(state_->txn_, static_cast(code));
+  TSHttpTxnStatusSet(state_->txn_, static_cast(code));
 }
 
 bool
diff --git a/plugins/authproxy/authproxy.cc b/plugins/authproxy/authproxy.cc
index f3f0345..1537398 100644
--- a/plugins/authproxy/authproxy.cc
+++ b/plugins/authproxy/authproxy.cc
@@ -602,7 +602,7 @@ StateUnauthorized(AuthRequestContext *auth, void *)
 {
   static const char msg[] = "authorization denied\n";
 
-  TSHttpTxnSetHttpRetStatus(auth->txn, TS_HTTP_STATUS_FORBIDDEN);
+  TSHttpTxnStatusSet(auth->txn, TS_HTTP_STATUS_FORBIDDEN);
   TSHttpTxnErrorBodySet(auth->txn, TSstrdup(msg), sizeof(msg) - 1, 
TSstrdup("text/plain"));
 
   TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_ERROR);
diff --git a/plugins/experimental/geoip_acl/geoip_acl.cc 
b/plugins/experimental/geoip_acl/geoip_acl.cc
index 07d227c..baa9d9a 100644
--- a/plugins/experimental/geoip_acl/geoip_acl.cc
+++ b/plugins/experimental/geoip_acl/geoip_acl.cc
@@ -106,7 +106,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo 
*rri)
 
 if (!a->eval(rri, rh)) {
   TSDebug(PLUGIN_NAME, "denying request");
-  TSHttpTxnSetHttpRetStatus((TSHttpTxn)rh, (TSHttpStatus)403);
+  TSHttpTxnStatusSet((TSHttpTxn)rh, (TSHttpStatus)403);
   a->send_html((TSHttpTxn)rh);
 }
   }
diff --git a/plugins/experimental/hipes/hipes.cc 
b/plugins/experimental/hipes/hipes.cc
index 

[trafficserver] branch master updated: Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet

2018-08-08 Thread zwoop
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 0570c29  Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet
0570c29 is described below

commit 0570c2945dcf9e0c8ac996c2f854f501d2cf3a35
Author: Leif Hedstrom 
AuthorDate: Mon Aug 6 16:36:06 2018 -0600

Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet

This also adds a new API, TSHttpTxnStatusGet(TSHttpTxn txnp),
which is the corresponding Getter for this functionality.
---
 example/remap/remap.cc |  2 +-
 example/secure_link/secure_link.c  |  2 +-
 lib/cppapi/Transaction.cc  |  2 +-
 plugins/authproxy/authproxy.cc |  2 +-
 plugins/experimental/geoip_acl/geoip_acl.cc|  2 +-
 plugins/experimental/hipes/hipes.cc| 22 +++---
 .../memcached_remap/memcached_remap.cc |  2 +-
 plugins/experimental/mp4/mp4.cc|  2 +-
 plugins/experimental/mysql_remap/mysql_remap.cc|  2 +-
 plugins/experimental/uri_signing/uri_signing.c |  2 +-
 plugins/experimental/url_sig/url_sig.c |  2 +-
 plugins/header_rewrite/operators.cc|  6 +++---
 plugins/lua/ts_lua_http.c  |  4 ++--
 plugins/regex_remap/regex_remap.cc |  6 +++---
 plugins/s3_auth/s3_auth.cc |  4 ++--
 proxy/api/ts/ts.h  |  4 ++--
 src/traffic_server/InkAPI.cc   | 15 ---
 tests/tools/plugins/custom204plugin.cc |  2 +-
 18 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/example/remap/remap.cc b/example/remap/remap.cc
index 302a261..26aeb86 100644
--- a/example/remap/remap.cc
+++ b/example/remap/remap.cc
@@ -283,7 +283,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo 
*rri)
 
 size_t len = snprintf(tmp, 255, "This is very small example of TS API 
usage!\nIteration %d!\nHTTP return code %d\n",
   my_local_counter, TS_HTTP_STATUS_CONTINUE + 
my_local_counter);
-TSHttpTxnSetHttpRetStatus((TSHttpTxn)rh, 
(TSHttpStatus)((int)TS_HTTP_STATUS_CONTINUE + my_local_counter));
+TSHttpTxnStatusSet((TSHttpTxn)rh, 
(TSHttpStatus)((int)TS_HTTP_STATUS_CONTINUE + my_local_counter));
 TSHttpTxnErrorBodySet((TSHttpTxn)rh, tmp, len, nullptr); // Defaults to 
text/html
 my_local_counter++;
   }
diff --git a/example/secure_link/secure_link.c 
b/example/secure_link/secure_link.c
index 7116021..9bf8506 100644
--- a/example/secure_link/secure_link.c
+++ b/example/secure_link/secure_link.c
@@ -126,7 +126,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo 
*rri)
 }
 if (sli->strict) {
   TSDebug(PLUGIN_NAME, "request is DENY");
-  TSHttpTxnSetHttpRetStatus(rh, TS_HTTP_STATUS_FORBIDDEN);
+  TSHttpTxnStatusSet(rh, TS_HTTP_STATUS_FORBIDDEN);
   i = TSREMAP_NO_REMAP;
 } else {
   TSDebug(PLUGIN_NAME, "request is PASS");
diff --git a/lib/cppapi/Transaction.cc b/lib/cppapi/Transaction.cc
index afc2019..e4f7c18 100644
--- a/lib/cppapi/Transaction.cc
+++ b/lib/cppapi/Transaction.cc
@@ -200,7 +200,7 @@ void
 Transaction::setStatusCode(HttpStatus code)
 {
   LOG_DEBUG("Transaction tshttptxn=%p setting status code: %d", state_->txn_, 
code);
-  TSHttpTxnSetHttpRetStatus(state_->txn_, static_cast(code));
+  TSHttpTxnStatusSet(state_->txn_, static_cast(code));
 }
 
 bool
diff --git a/plugins/authproxy/authproxy.cc b/plugins/authproxy/authproxy.cc
index f3f0345..1537398 100644
--- a/plugins/authproxy/authproxy.cc
+++ b/plugins/authproxy/authproxy.cc
@@ -602,7 +602,7 @@ StateUnauthorized(AuthRequestContext *auth, void *)
 {
   static const char msg[] = "authorization denied\n";
 
-  TSHttpTxnSetHttpRetStatus(auth->txn, TS_HTTP_STATUS_FORBIDDEN);
+  TSHttpTxnStatusSet(auth->txn, TS_HTTP_STATUS_FORBIDDEN);
   TSHttpTxnErrorBodySet(auth->txn, TSstrdup(msg), sizeof(msg) - 1, 
TSstrdup("text/plain"));
 
   TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_ERROR);
diff --git a/plugins/experimental/geoip_acl/geoip_acl.cc 
b/plugins/experimental/geoip_acl/geoip_acl.cc
index 07d227c..baa9d9a 100644
--- a/plugins/experimental/geoip_acl/geoip_acl.cc
+++ b/plugins/experimental/geoip_acl/geoip_acl.cc
@@ -106,7 +106,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo 
*rri)
 
 if (!a->eval(rri, rh)) {
   TSDebug(PLUGIN_NAME, "denying request");
-  TSHttpTxnSetHttpRetStatus((TSHttpTxn)rh, (TSHttpStatus)403);
+  TSHttpTxnStatusSet((TSHttpTxn)rh, (TSHttpStatus)403);
   a->send_html((TSHttpTxn)rh);
 }
   }
diff --git a/plugins/experimental/hipes/hipes.cc 
b/plugins/experimental/hipes/hipes.cc
index a93b9a5..dfcff4e 100644
--- a/plugins/experimental/hipes/hipes.cc
+++ 

[trafficserver] branch 7.1.x updated: Enable ECDH explicitly only if OpenSSL version is v1.0.2 or lower

2018-08-08 Thread zwoop
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 583f9e0  Enable ECDH explicitly only if OpenSSL version is v1.0.2 or 
lower
583f9e0 is described below

commit 583f9e0038794326ef5ef5e9b2c69f30eb4f7bcb
Author: Masaori Koshiba 
AuthorDate: Tue Jul 31 14:13:44 2018 +0900

Enable ECDH explicitly only if OpenSSL version is v1.0.2 or lower

SSL_CTX_set_ecdh_auto() has been removed and ECDH is enabled in default
since OpenSSL v1.1.0.

(cherry picked from commit 034c25b5b8ebe764e94f5bb3beca6a2599c40c66)
---
 iocore/net/SSLUtils.cc | 5 +
 1 file changed, 5 insertions(+)

diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 40792dc..6bdd05b 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -539,9 +539,13 @@ ssl_context_enable_dhe(const char *dhparams_file, SSL_CTX 
*ctx)
   return ctx;
 }
 
+// SSL_CTX_set_ecdh_auto() is removed by OpenSSL v1.1.0 and ECDH is enabled in 
default.
+// TODO: remove this function when we drop support of OpenSSL v1.0.2* and 
lower.
 static SSL_CTX *
 ssl_context_enable_ecdh(SSL_CTX *ctx)
 {
+#if OPENSSL_VERSION_NUMBER < 0x1010
+
 #if TS_USE_TLS_ECKEY
 
 #if defined(SSL_CTRL_SET_ECDH_AUTO)
@@ -555,6 +559,7 @@ ssl_context_enable_ecdh(SSL_CTX *ctx)
   }
 #endif
 #endif
+#endif
 
   return ctx;
 }



[trafficserver] branch 7.1.x updated: Add diags log message when cache wraps.

2018-08-08 Thread zwoop
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 239236f  Add diags log message when cache wraps.
239236f is described below

commit 239236f92c19742d8e1e2c62f3351f6c0e2e920c
Author: Susan Hinrichs 
AuthorDate: Fri Jan 27 22:28:00 2017 +

Add diags log message when cache wraps.

(cherry picked from commit 307eb5582861f51e5c9c3e5a26080bba6e82f816)
---
 iocore/cache/CacheWrite.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index 78f9786..72efb68 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -926,6 +926,7 @@ Vol::agg_wrap()
   {
 Vol *vol = this;
 CACHE_INCREMENT_DYN_STAT(cache_directory_wrap_stat);
+Note("Cache volume %d on disk '%s' wraps around", 
vol->cache_vol->vol_number, vol->hash_text.get());
   }
   periodic_scan();
 }



[trafficserver] branch master updated: In conf_remap plugin, print name of non-existent or non-overriddable configuration variable in a file to error log.

2018-08-08 Thread shinrich
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 342b311  In conf_remap plugin, print name of non-existent or 
non-overriddable configuration variable in a file to error log.
342b311 is described below

commit 342b3116731abb80134411e624c68b1c58cf9ed3
Author: Walter Karas 
AuthorDate: Tue Aug 7 18:27:11 2018 -0500

In conf_remap plugin, print name of non-existent or non-overriddable 
configuration variable in a file to error log.
---
 plugins/conf_remap/conf_remap.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/conf_remap/conf_remap.cc b/plugins/conf_remap/conf_remap.cc
index d5dc7f4..6a01772 100644
--- a/plugins/conf_remap/conf_remap.cc
+++ b/plugins/conf_remap/conf_remap.cc
@@ -173,7 +173,8 @@ RemapConfigs::parse_file(const char *filename)
 // Find the configuration name
 tok = strtok_r(nullptr, " \t", );
 if (TSHttpTxnConfigFind(tok, -1, , _type) != TS_SUCCESS) {
-  TSError("[%s] File %s, line %d: no records.config name given", 
PLUGIN_NAME, path.c_str(), line_num);
+  TSError("[%s] File %s, line %d: %s is not a configuration variable or 
cannot be overridden", PLUGIN_NAME, path.c_str(),
+  line_num, tok);
   continue;
 }
 



[trafficserver] branch quic-latest updated: Erase "ack_only" lost packet correctly

2018-08-08 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new fad804a  Erase "ack_only" lost packet correctly
fad804a is described below

commit fad804a84d1a45f7ac4f24baea0d5838e15476db
Author: Masaori Koshiba 
AuthorDate: Wed Aug 8 16:48:51 2018 +0900

Erase "ack_only" lost packet correctly

To avoid heap-use-after-free caused by erasing elements in the loop
---
 iocore/net/quic/QUICLossDetector.cc | 48 -
 iocore/net/quic/QUICLossDetector.h  |  3 +++
 2 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/iocore/net/quic/QUICLossDetector.cc 
b/iocore/net/quic/QUICLossDetector.cc
index c6a5014..2773d80 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -427,36 +427,39 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber 
largest_acked_packet_num
 delay_until_lost = 5.0 / 4.0 * std::max(this->_latest_rtt, 
this->_smoothed_rtt);
   }
 
-  for (auto  : this->_sent_packets) {
-if (unacked.first >= largest_acked_packet_number) {
+  for (auto it = this->_sent_packets.begin(); it != 
this->_sent_packets.end();) {
+if (it->first >= largest_acked_packet_number) {
   break;
 }
-ink_hrtime time_since_sent = Thread::get_hrtime() - unacked.second->time;
-uint64_t delta = largest_acked_packet_number - 
unacked.second->packet_number;
+ink_hrtime time_since_sent = Thread::get_hrtime() - it->second->time;
+uint64_t delta = largest_acked_packet_number - 
it->second->packet_number;
 if (time_since_sent > delay_until_lost || delta > 
this->_reordering_threshold) {
   if (time_since_sent > delay_until_lost) {
 QUICLDDebug("Lost: time since sent is too long (PN=%" PRId64 " sent=%" 
PRId64 ", delay=%lf, fraction=%lf, lrtt=%" PRId64
 ", srtt=%" PRId64 ")",
-unacked.first, time_since_sent, delay_until_lost, 
this->_time_reordering_fraction, this->_latest_rtt,
+it->first, time_since_sent, delay_until_lost, 
this->_time_reordering_fraction, this->_latest_rtt,
 this->_smoothed_rtt);
   } else {
 QUICLDDebug("Lost: packet delta is too large (PN=%" PRId64 " 
largest=%" PRId64 " unacked=%" PRId64 " threshold=%" PRId32
 ")",
-unacked.first, largest_acked_packet_number, 
unacked.second->packet_number, this->_reordering_threshold);
+it->first, largest_acked_packet_number, 
it->second->packet_number, this->_reordering_threshold);
   }
 
-  if (!unacked.second->ack_only) {
-lost_packets.insert({unacked.first, unacked.second.get()});
+  if (!it->second->ack_only) {
+lost_packets.insert({it->first, it->second.get()});
   } else {
 // -- ADDITIONAL CODE --
 // We remove only "ack-only" packets for life time management of 
packets.
 // Packets in lost_packets will be removed from sent_packet later.
-this->_remove_from_sent_packet_list(unacked.first);
+it = this->_remove_from_sent_packet_list(it);
+continue;
 // -- END OF ADDITIONAL CODE --
   }
 } else if (this->_loss_time == 0 && delay_until_lost != INFINITY) {
   this->_loss_time = Thread::get_hrtime() + delay_until_lost - 
time_since_sent;
 }
+
+++it;
   }
 
   // Inform the congestion controller of lost packets and
@@ -582,21 +585,34 @@ 
QUICLossDetector::_remove_from_sent_packet_list(QUICPacketNumber packet_number)
 {
   SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
 
-  // Decrement counters
   auto ite = this->_sent_packets.find(packet_number);
-  if (ite != this->_sent_packets.end()) {
-if (ite->second->handshake) {
+  this->_decrement_outstanding_counters(ite);
+  this->_sent_packets.erase(packet_number);
+}
+
+std::map::iterator
+QUICLossDetector::_remove_from_sent_packet_list(std::map::iterator it)
+{
+  SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
+
+  this->_decrement_outstanding_counters(it);
+  return this->_sent_packets.erase(it);
+}
+
+void
+QUICLossDetector::_decrement_outstanding_counters(std::map::iterator it)
+{
+  if (it != this->_sent_packets.end()) {
+// Decrement counters
+if (it->second->handshake) {
   ink_assert(this->_handshake_outstanding.load() > 0);
   --this->_handshake_outstanding;
 }
-if (!ite->second->ack_only) {
+if (!it->second->ack_only) {
   ink_assert(this->_retransmittable_outstanding.load() > 0);
   --this->_retransmittable_outstanding;
 }
   }
-
-  // Remove from the list
-  this->_sent_packets.erase(packet_number);
 }
 
 ink_hrtime
diff --git a/iocore/net/quic/QUICLossDetector.h 
b/iocore/net/quic/QUICLossDetector.h
index