fix a problem where the source for a grant isn't being checked for a "grant retry" condition;

3.0-maint
Bryan Biedenkapp 3 years ago
parent b7c3bb38a0
commit 320523a668

@ -867,6 +867,22 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_
}
}
else {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
// different source from the original grant
uint32_t grantedSrcId = m_tscc->m_affiliations->getGrantedSrcId(dstId);
if (srcId != grantedSrcId) {
if (!net) {
LogWarning(LOG_RF, "DMR Slot %u, DT_CSBK, CSBKO_RAND (Random Access), SVC_KIND_VOICE_CALL (Voice Call) denied, traffic in progress, dstId = %u", m_tscc->m_slotNo, dstId);
writeRF_CSBK_ACK_RSP(srcId, TS_DENY_RSN_TGT_BUSY, (grp) ? 1U : 0U);
::ActivityLog("DMR", true, "Slot %u group grant request %u to TG %u denied", m_tscc->m_slotNo, srcId, dstId);
m_slot->m_rfState = RS_RF_REJECTED;
}
return false;
}
chNo = m_tscc->m_affiliations->getGrantedCh(dstId);
slot = m_tscc->m_affiliations->getGrantedSlot(dstId);

@ -150,7 +150,7 @@ namespace lookups
/// <summary>Helper to get the channel granted for the given destination ID.</summary>
virtual uint32_t getGrantedCh(uint32_t dstId);
/// <summary>Helper to get the source ID granted for the given destination ID.</summary>
virtual uint32_t getGrantedSrcId(uint32_t srcId);
virtual uint32_t getGrantedSrcId(uint32_t dstId);
/// <summary>Helper to set RF channel data.</summary>
void setRFChData(const std::unordered_map<uint32_t, VoiceChData>& chData) { m_rfChDataTable = chData; }

@ -536,7 +536,23 @@ bool Trunk::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uint8_t servic
}
}
else {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
// different source from the original grant
uint32_t grantedSrcId = m_nxdn->m_affiliations.getGrantedSrcId(dstId);
if (srcId != grantedSrcId) {
if (!net) {
LogWarning(LOG_RF, "NXDN, " NXDN_RTCH_MSG_TYPE_VCALL_REQ " denied, traffic in progress, dstId = %u", dstId);
writeRF_Message_Deny(0U, srcId, NXDN_CAUSE_VD_QUE_GRP_BUSY, RTCH_MESSAGE_TYPE_VCALL);
::ActivityLog("NXDN", true, "group grant request from %u to TG %u denied", srcId, dstId);
m_nxdn->m_rfState = RS_RF_REJECTED;
}
return false;
}
chNo = m_nxdn->m_affiliations.getGrantedCh(dstId);
m_nxdn->m_affiliations.touchGrant(dstId);
}
}

@ -688,6 +688,9 @@ bool Trunk::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
}
}
break;
case TSBK_OSP_DVM_GIT_HASH:
// ignore
return true; // don't allow this to write to the air
default:
LogError(LOG_NET, P25_TSDU_STR ", unhandled LCO, mfId = $%02X, lco = $%02X", tsbk->getMFId(), tsbk->getLCO());
return false;
@ -2224,6 +2227,21 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
}
}
else {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
// different source from the original grant
uint32_t grantedSrcId = m_p25->m_affiliations.getGrantedSrcId(dstId);
if (srcId != grantedSrcId) {
if (!net) {
LogWarning(LOG_RF, P25_TSDU_STR ", TSBK_IOSP_GRP_VCH (Group Voice Channel Request) denied, traffic in progress, dstId = %u", dstId);
writeRF_TSDU_Deny(srcId, dstId, P25_DENY_RSN_PTT_COLLIDE, (grp) ? TSBK_IOSP_GRP_VCH : TSBK_IOSP_UU_VCH);
::ActivityLog("P25", true, "group grant request from %u to TG %u denied", srcId, dstId);
m_p25->m_rfState = RS_RF_REJECTED;
}
return false;
}
chNo = m_p25->m_affiliations.getGrantedCh(dstId);
m_p25->m_affiliations.touchGrant(dstId);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.