Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion source/common/network/apple_dns_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "source/common/common/assert.h"
#include "source/common/common/fmt.h"
#include "source/common/common/stl_helpers.h"
#include "source/common/network/address_impl.h"
#include "source/common/network/utility.h"

Expand Down Expand Up @@ -210,7 +211,14 @@ std::list<DnsResponse>& AppleDnsResolverImpl::PendingResolution::finalAddressLis

void AppleDnsResolverImpl::PendingResolution::finishResolve() {
ENVOY_LOG_EVENT(debug, "apple_dns_resolution_complete",
"dns resolution for {} completed with status {}", dns_name_, pending_cb_.status_);
"dns resolution for {} completed with status={} v4_addresses={} v6_addresses={}",
dns_name_, pending_cb_.status_,
accumulateToString<Network::DnsResponse>(
pending_cb_.v4_responses_,
[](const auto& dns_response) { return dns_response.address_->asString(); }),
accumulateToString<Network::DnsResponse>(
pending_cb_.v4_responses_,
[](const auto& dns_response) { return dns_response.address_->asString(); }));
callback_(pending_cb_.status_, std::move(finalAddressList()));

if (owned_) {
Expand Down
11 changes: 8 additions & 3 deletions source/common/network/dns_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "source/common/common/assert.h"
#include "source/common/common/fmt.h"
#include "source/common/common/stl_helpers.h"
#include "source/common/common/thread.h"
#include "source/common/network/address_impl.h"
#include "source/common/network/utility.h"
Expand Down Expand Up @@ -183,9 +184,13 @@ void DnsResolverImpl::PendingResolution::onAresGetAddrInfoCallback(int status, i
// portFromTcpUrl().
// TODO(chaoqin-li1123): remove try catch pattern here once we figure how to handle unexpected
// exception in fuzz tests.
ENVOY_LOG_EVENT(debug, "cares_dns_resolution_complete",
"dns resolution for {} completed with status {}", dns_name_,
resolution_status);
ENVOY_LOG_EVENT(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For c-ares due to how it's implemented, this is not going to show all addresses, right? Like it would only show v4 and return?

debug, "cares_dns_resolution_complete",
"dns resolution for {} completed with status={} addresses={}", dns_name_,
resolution_status,
accumulateToString<Network::DnsResponse>(address_list, [](const auto& dns_response) {
return dns_response.address_->asString();
}));

TRY_NEEDS_AUDIT { callback_(resolution_status, std::move(address_list)); }
catch (const EnvoyException& e) {
Expand Down