You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by da...@apache.org on 2018/05/03 14:14:19 UTC

[trafficserver] branch master updated: Corrects marshaling of source ip and port

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

dagit 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 0120173  Corrects marshaling of source ip and port
0120173 is described below

commit 01201739e252f84e7c8a7c62c0ee31feb0def616
Author: Derek Dagit <de...@oath.com>
AuthorDate: Mon Apr 30 18:06:39 2018 -0500

    Corrects marshaling of source ip and port
---
 proxy/logging/LogAccessHttp.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index 5afc0f8..f829720 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -1056,14 +1056,14 @@ LogAccessHttp::marshal_proxy_req_server_name(char *buf)
 int
 LogAccessHttp::marshal_proxy_req_server_ip(char *buf)
 {
-  return marshal_ip(buf, m_http_sm->t_state.current.server != nullptr ? &m_http_sm->t_state.current.server->dst_addr.sa : nullptr);
+  return marshal_ip(buf, m_http_sm->t_state.current.server != nullptr ? &m_http_sm->t_state.current.server->src_addr.sa : nullptr);
 }
 
 int
 LogAccessHttp::marshal_proxy_req_server_port(char *buf)
 {
   if (buf) {
-    uint16_t port = ntohs(m_http_sm->t_state.current.server != nullptr ? m_http_sm->t_state.current.server->dst_addr.port() : 0);
+    uint16_t port = ntohs(m_http_sm->t_state.current.server != nullptr ? m_http_sm->t_state.current.server->src_addr.port() : 0);
     marshal_int(buf, port);
   }
   return INK_MIN_ALIGN;

-- 
To stop receiving notification emails like this one, please contact
dagit@apache.org.