From 0304b98fac4a360bd64eb57dee641286df29221a Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Thu, 7 Nov 2024 14:10:53 -0500 Subject: [PATCH] backport a change from incall_ctrl to fix issue with the first LDU1 after an HDU being non-standard MFId causing illegal grant demands and/or grants; --- src/host/p25/packet/Voice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/host/p25/packet/Voice.cpp b/src/host/p25/packet/Voice.cpp index 2dd63ebe..8a8f530f 100644 --- a/src/host/p25/packet/Voice.cpp +++ b/src/host/p25/packet/Voice.cpp @@ -375,6 +375,12 @@ bool Voice::process(uint8_t* data, uint32_t len) } } + // bryanb: due to moronic reasons -- if this case happens, default the RID to something sane + if (srcId == 0U && !lc.isStandardMFId()) { + LogMessage(LOG_RF, P25_HDU_STR " ** source RID was 0 with non-standard MFId defaulting source RID, dstId = %u, mfId = $%02X", dstId, lc.getMFId()); + srcId = WUID_FNE; + } + // send network grant demand TDU if (m_p25->m_network != nullptr) { if (!m_p25->m_dedicatedControl && m_p25->m_convNetGrantDemand) {