You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/10/20 02:57:06 UTC

[trafficserver] branch master updated: Skip Link Local address to mitigate slow getnameinfo(3) problem on macOS

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

masaori 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 bc33954  Skip Link Local address to mitigate slow getnameinfo(3) problem on macOS
bc33954 is described below

commit bc3395439c9e00c2d6a7e1cac41c2d04e12e08fa
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Oct 20 10:22:19 2017 +0900

    Skip Link Local address to mitigate slow getnameinfo(3) problem on macOS
---
 iocore/utils/Machine.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/utils/Machine.cc b/iocore/utils/Machine.cc
index 82e71cb..1fa21c5 100644
--- a/iocore/utils/Machine.cc
+++ b/iocore/utils/Machine.cc
@@ -175,7 +175,7 @@ Machine::Machine(char const *the_hostname, sockaddr const *addr)
           ink_zero(localhost);
           ats_ip_ntop(ifip, ip_strbuf, sizeof(ip_strbuf));
           insert_id(ip_strbuf);
-          if (getnameinfo(ifip, ats_ip_size(ifip), localhost, sizeof(localhost) - 1, nullptr, 0, 0) == 0) {
+          if (spot_type != LL && getnameinfo(ifip, ats_ip_size(ifip), localhost, sizeof(localhost) - 1, nullptr, 0, 0) == 0) {
             insert_id(localhost);
           }
           IpAddr *ipaddr = new IpAddr(ifip);

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