From f1c5a6cba9382b6b659a4aaead260a47f34e2b90 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 9 Jun 2021 14:43:02 +0200 Subject: [PATCH] Do not use an undefined node id for mdns advertising --- src/app/server/Mdns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/server/Mdns.cpp b/src/app/server/Mdns.cpp index 3bab44a92f2661..1f9c1895bc2dbb 100644 --- a/src/app/server/Mdns.cpp +++ b/src/app/server/Mdns.cpp @@ -48,7 +48,7 @@ NodeId GetCurrentNodeId() // Search for one admin pairing and use its node id. auto pairing = GetGlobalAdminPairingTable().cbegin(); - if (pairing != GetGlobalAdminPairingTable().cend()) + if (pairing != GetGlobalAdminPairingTable().cend() && pairing->GetNodeId() != kUndefinedNodeId) { ChipLogProgress(Discovery, "Found admin pairing for admin %" PRIX16 ", node 0x" ChipLogFormatX64, pairing->GetAdminId(), ChipLogValueX64(pairing->GetNodeId()));