From 7c98c1fbc889ac5dbe17ab58f841db7381458510 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Tue, 30 Dec 2025 17:17:36 -0500 Subject: [PATCH] BUGFIX: validate destination matches before handling TDU; --- src/patch/HostPatch.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/patch/HostPatch.cpp b/src/patch/HostPatch.cpp index 63730e96..53e89a46 100644 --- a/src/patch/HostPatch.cpp +++ b/src/patch/HostPatch.cpp @@ -990,14 +990,17 @@ void HostPatch::processP25Network(uint8_t* buffer, uint32_t length) lsd.setLSD2(lsd2); if ((duid == DUID::TDU) || (duid == DUID::TDULC)) { - // ignore TDU's that are grant demands - if (grantDemand) { - m_network->resetP25(); + // ensure destination ID matches + if (dstId != m_srcTGId && dstId != m_dstTGId) { + // ignore TDU's that are grant demands + if (grantDemand) { + m_network->resetP25(); + return; + } + + resetP25Call(srcId); return; } - - resetP25Call(srcId); - return; } if (control.getLCO() == LCO::GROUP) {