diff --git a/iocore/utils/Machine.cc b/iocore/utils/Machine.cc index 2697e040d90..f06edbc5bdd 100644 --- a/iocore/utils/Machine.cc +++ b/iocore/utils/Machine.cc @@ -66,6 +66,7 @@ Machine::Machine(char const *the_hostname, sockaddr const *addr) auto result = gethostname(localhost, sizeof(localhost)); ink_release_assert(result == 0); host_name.assign(localhost, strlen(localhost)); + insert_id(localhost); } #if HAVE_IFADDRS_H @@ -196,6 +197,7 @@ Machine::Machine(char const *the_hostname, sockaddr const *addr) Warning("Failed to find hostname for address '%s' - %s", ats_ip_ntop(addr, ipbuff, sizeof(ipbuff)), gai_strerror(status)); } else { host_name.assign(localhost); + insert_id(localhost); } }