diff --git a/src/lib/mdns/Advertiser_ImplMinimalMdns.cpp b/src/lib/mdns/Advertiser_ImplMinimalMdns.cpp index 65b8f55aff7fe7..12a155825390ad 100644 --- a/src/lib/mdns/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/mdns/Advertiser_ImplMinimalMdns.cpp @@ -246,7 +246,9 @@ class AdvertiserMinMdns : public ServiceAdvertiser, void AdvertiserMinMdns::OnMdnsPacketData(const BytesRange & data, const chip::Inet::IPPacketInfo * info) { #ifdef DETAIL_LOGGING - ChipLogDetail(Discovery, "MinMdns received a query."); + char srcAddressString[chip::Inet::kMaxIPAddressStringLength]; + VerifyOrDie(info->SrcAddress.ToString(srcAddressString) != nullptr); + ChipLogDetail(Discovery, "Received an mDNS query from %s", srcAddressString); #endif mCurrentSource = info; diff --git a/src/lib/mdns/minimal/ResponseSender.cpp b/src/lib/mdns/minimal/ResponseSender.cpp index b8f412146a7b87..975269d8c89120 100644 --- a/src/lib/mdns/minimal/ResponseSender.cpp +++ b/src/lib/mdns/minimal/ResponseSender.cpp @@ -161,16 +161,19 @@ CHIP_ERROR ResponseSender::FlushReply() if (mResponseBuilder.HasResponseRecords()) { + char srcAddressString[chip::Inet::kMaxIPAddressStringLength]; + VerifyOrDie(mSendState.GetSourceAddress().ToString(srcAddressString) != nullptr); if (mSendState.SendUnicast()) { - ChipLogProgress(Discovery, "Directly sending mDns reply to peer on port %d", mSendState.GetSourcePort()); + ChipLogProgress(Discovery, "Directly sending mDns reply to peer %s on port %d", srcAddressString, + mSendState.GetSourcePort()); ReturnErrorOnFailure(mServer->DirectSend(mResponseBuilder.ReleasePacket(), mSendState.GetSourceAddress(), mSendState.GetSourcePort(), mSendState.GetSourceInterfaceId())); } else { - ChipLogProgress(Discovery, "Broadcasting mDns reply"); + ChipLogProgress(Discovery, "Broadcasting mDns reply for query from %s", srcAddressString); ReturnErrorOnFailure( mServer->BroadcastSend(mResponseBuilder.ReleasePacket(), kMdnsStandardPort, mSendState.GetSourceInterfaceId())); } diff --git a/src/lib/mdns/minimal/responders/QueryResponder.cpp b/src/lib/mdns/minimal/responders/QueryResponder.cpp index 6966908656df92..0b94abe746740e 100644 --- a/src/lib/mdns/minimal/responders/QueryResponder.cpp +++ b/src/lib/mdns/minimal/responders/QueryResponder.cpp @@ -139,8 +139,6 @@ void QueryResponderBase::MarkAdditionalRepliesFor(QueryResponderIterator it) void QueryResponderBase::AddAllResponses(const chip::Inet::IPPacketInfo * source, ResponderDelegate * delegate) { - ChipLogProgress(Discovery, "Replying to DNS-SD service listing request"); - // reply to dns-sd service list request for (size_t i = 0; i < mResponderInfoSize; i++) {