diff --git a/configs/config.example.yml b/configs/config.example.yml index 581d5ad8..de7b01fe 100644 --- a/configs/config.example.yml +++ b/configs/config.example.yml @@ -129,6 +129,8 @@ protocols: # Flag indicating whether or not the source ID validation before granting disabled. disableGrantSourceIdCheck: false + # Flag indicating whether or not a TGID will be tested for affiliations before being granted. + ignoreAffiliationCheck: false # Flag indicating whether or not received RF embedded LC data only should be transmitted. embeddedLCOnly: false # Flag indicating whether talker alias data should be dumped to the log. @@ -210,6 +212,8 @@ protocols: # (This applies only in conventional operations where channel granting is utilized and RF-only talkgroup # steering is required.) disableNetworkGrant: false + # Flag indicating whether or not a TGID will be tested for affiliations before being granted. + ignoreAffiliationCheck: false # Flag indicating that the host will attempt to automatically inhibit unauthorized RIDs (those not in the # RID ACL list). inhibitUnauthorized: false @@ -283,6 +287,8 @@ protocols: # Flag indicating whether or not the source ID validation before granting disabled. disableGrantSourceIdCheck: false + # Flag indicating whether or not a TGID will be tested for affiliations before being granted. + ignoreAffiliationCheck: false # Flag indicating the host should verify group affiliation. verifyAff: false # Flag indicating the host should verify unit registration. diff --git a/src/host/dmr/Control.cpp b/src/host/dmr/Control.cpp index ba30ac4d..a0565223 100644 --- a/src/host/dmr/Control.cpp +++ b/src/host/dmr/Control.cpp @@ -172,6 +172,10 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, ::lookups::VoiceChDa m_slot1->setFrameLossThreshold(frameLossThreshold); m_slot2->setFrameLossThreshold(frameLossThreshold); + bool ignoreAffiliationCheck = dmrProtocol["ignoreAffiliationCheck"].as(true); + m_slot1->m_ignoreAffiliationCheck = ignoreAffiliationCheck; + m_slot2->m_ignoreAffiliationCheck = ignoreAffiliationCheck; + if (printOptions) { if (enableTSCC) { LogInfo(" TSCC Slot: %u", m_tsccSlotNo); @@ -182,6 +186,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, ::lookups::VoiceChDa } } + LogInfo(" Ignore Affiliation Check: %s", ignoreAffiliationCheck ? "yes" : "no"); LogInfo(" Notify Control: %s", notifyCC ? "yes" : "no"); LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F); LogInfo(" Frame Loss Threshold: %u", frameLossThreshold); diff --git a/src/host/dmr/Slot.cpp b/src/host/dmr/Slot.cpp index 3f0d2b41..4cbe363d 100644 --- a/src/host/dmr/Slot.cpp +++ b/src/host/dmr/Slot.cpp @@ -151,6 +151,7 @@ Slot::Slot(uint32_t slotNo, uint32_t timeout, uint32_t tgHang, uint32_t queueSiz m_ccHalted(false), m_enableTSCC(false), m_dedicatedTSCC(false), + m_ignoreAffiliationCheck(false), m_tsccPayloadDstId(0U), m_tsccPayloadSrcId(0U), m_tsccPayloadGroup(false), diff --git a/src/host/dmr/Slot.h b/src/host/dmr/Slot.h index 02d17baa..185de43f 100644 --- a/src/host/dmr/Slot.h +++ b/src/host/dmr/Slot.h @@ -383,6 +383,7 @@ namespace dmr bool m_enableTSCC; bool m_dedicatedTSCC; + bool m_ignoreAffiliationCheck; uint32_t m_tsccPayloadDstId; uint32_t m_tsccPayloadSrcId; diff --git a/src/host/dmr/packet/ControlSignaling.cpp b/src/host/dmr/packet/ControlSignaling.cpp index e4077c7d..2835a18f 100644 --- a/src/host/dmr/packet/ControlSignaling.cpp +++ b/src/host/dmr/packet/ControlSignaling.cpp @@ -857,12 +857,14 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_ ::lookups::TalkgroupRuleGroupVoice groupVoice = m_tscc->m_tidLookup->find(dstId); slot = groupVoice.source().tgSlot(); - // is this an affiliation required group? - ::lookups::TalkgroupRuleGroupVoice tid = m_tscc->m_tidLookup->find(dstId, slot); - if (tid.config().affiliated()) { - if (!m_tscc->m_affiliations->hasGroupAff(dstId)) { - LogWarning(LOG_RF, "DMR Slot %u, CSBK, RAND (Random Access, GRP_VOICE_CALL (Group Voice Call) ignored, no group affiliations, dstId = %u", m_tscc->m_slotNo, dstId); - return false; + if (grp && !m_tscc->m_ignoreAffiliationCheck) { + // is this an affiliation required group? + ::lookups::TalkgroupRuleGroupVoice tid = m_tscc->m_tidLookup->find(dstId, slot); + if (tid.config().affiliated()) { + if (!m_tscc->m_affiliations->hasGroupAff(dstId)) { + LogWarning(LOG_RF, "DMR Slot %u, CSBK, RAND (Random Access, GRP_VOICE_CALL (Group Voice Call) ignored, no group affiliations, dstId = %u", m_tscc->m_slotNo, dstId); + return false; + } } } diff --git a/src/host/nxdn/Control.cpp b/src/host/nxdn/Control.cpp index fde3464c..bd1ccbbe 100644 --- a/src/host/nxdn/Control.cpp +++ b/src/host/nxdn/Control.cpp @@ -70,6 +70,7 @@ Control::Control(bool authoritative, uint32_t ran, uint32_t callHang, uint32_t q m_duplex(duplex), m_enableControl(false), m_dedicatedControl(false), + m_ignoreAffiliationCheck(false), m_rfLastLICH(), m_rfLC(), m_netLC(), @@ -202,6 +203,8 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw m_control->m_disableGrantSrcIdCheck = control["disableGrantSourceIdCheck"].as(false); + m_ignoreAffiliationCheck = nxdnProtocol["ignoreAffiliationCheck"].as(false); + yaml::Node rfssConfig = systemConf["config"]; yaml::Node controlCh = rfssConfig["controlCh"]; m_notifyCC = controlCh["notifyEnable"].as(false); @@ -303,6 +306,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw } } + LogInfo(" Ignore Affiliation Check: %s", m_ignoreAffiliationCheck ? "yes" : "no"); LogInfo(" Notify Control: %s", m_notifyCC ? "yes" : "no"); LogInfo(" Verify Affiliation: %s", m_control->m_verifyAff ? "yes" : "no"); LogInfo(" Verify Registration: %s", m_control->m_verifyReg ? "yes" : "no"); diff --git a/src/host/nxdn/Control.h b/src/host/nxdn/Control.h index 0bae153d..e29f4cc5 100644 --- a/src/host/nxdn/Control.h +++ b/src/host/nxdn/Control.h @@ -275,6 +275,7 @@ namespace nxdn bool m_duplex; bool m_enableControl; bool m_dedicatedControl; + bool m_ignoreAffiliationCheck; channel::LICH m_rfLastLICH; lc::RTCH m_rfLC; diff --git a/src/host/nxdn/packet/ControlSignaling.cpp b/src/host/nxdn/packet/ControlSignaling.cpp index 66d8a40b..8d2bc00f 100644 --- a/src/host/nxdn/packet/ControlSignaling.cpp +++ b/src/host/nxdn/packet/ControlSignaling.cpp @@ -468,12 +468,14 @@ bool ControlSignaling::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uin } if (!m_nxdn->m_affiliations.isGranted(dstId)) { - // is this an affiliation required group? - ::lookups::TalkgroupRuleGroupVoice tid = m_nxdn->m_tidLookup->find(dstId); - if (tid.config().affiliated()) { - if (!m_nxdn->m_affiliations.hasGroupAff(dstId)) { - LogWarning(LOG_RF, "NXDN, %s ignored, no group affiliations, dstId = %u", rcch->toString().c_str(), dstId); - return false; + if (grp && !m_nxdn->m_ignoreAffiliationCheck) { + // is this an affiliation required group? + ::lookups::TalkgroupRuleGroupVoice tid = m_nxdn->m_tidLookup->find(dstId); + if (tid.config().affiliated()) { + if (!m_nxdn->m_affiliations.hasGroupAff(dstId)) { + LogWarning(LOG_RF, "NXDN, %s ignored, no group affiliations, dstId = %u", rcch->toString().c_str(), dstId); + return false; + } } } diff --git a/src/host/p25/Control.cpp b/src/host/p25/Control.cpp index d483fb49..106caf49 100644 --- a/src/host/p25/Control.cpp +++ b/src/host/p25/Control.cpp @@ -77,6 +77,7 @@ Control::Control(bool authoritative, uint32_t nac, uint32_t callHang, uint32_t q m_allowExplicitSourceId(true), m_convNetGrantDemand(false), m_sndcpSupport(false), + m_ignoreAffiliationCheck(false), m_idenTable(idenTable), m_ridLookup(ridLookup), m_tidLookup(tidLookup), @@ -265,6 +266,8 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw m_sndcpSupport = p25Protocol["sndcpSupport"].as(false); + m_ignoreAffiliationCheck = p25Protocol["ignoreAffiliationCheck"].as(false); + yaml::Node control = p25Protocol["control"]; m_enableControl = control["enable"].as(false); if (m_enableControl) { @@ -479,6 +482,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw LogInfo(" SNDCP Support: %s", m_sndcpSupport ? "yes" : "no"); + LogInfo(" Ignore Affiliation Check: %s", m_ignoreAffiliationCheck ? "yes" : "no"); LogInfo(" No Status ACK: %s", m_control->m_noStatusAck ? "yes" : "no"); LogInfo(" No Message ACK: %s", m_control->m_noMessageAck ? "yes" : "no"); LogInfo(" Unit-to-Unit Availability Check: %s", m_control->m_unitToUnitAvailCheck ? "yes" : "no"); diff --git a/src/host/p25/Control.h b/src/host/p25/Control.h index f4781ac1..f81ead09 100644 --- a/src/host/p25/Control.h +++ b/src/host/p25/Control.h @@ -307,6 +307,7 @@ namespace p25 bool m_allowExplicitSourceId; bool m_convNetGrantDemand; bool m_sndcpSupport; + bool m_ignoreAffiliationCheck; ::lookups::IdenTableLookup* m_idenTable; ::lookups::RadioIdLookup* m_ridLookup; diff --git a/src/host/p25/packet/ControlSignaling.cpp b/src/host/p25/packet/ControlSignaling.cpp index 73e1cfe6..b645ec12 100644 --- a/src/host/p25/packet/ControlSignaling.cpp +++ b/src/host/p25/packet/ControlSignaling.cpp @@ -2179,12 +2179,14 @@ bool ControlSignaling::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_ } if (!m_p25->m_affiliations.isGranted(dstId)) { - // is this an affiliation required group? - ::lookups::TalkgroupRuleGroupVoice tid = m_p25->m_tidLookup->find(dstId); - if (tid.config().affiliated()) { - if (!m_p25->m_affiliations.hasGroupAff(dstId)) { - LogWarning(LOG_NET, P25_TSDU_STR ", TSBKO, IOSP_GRP_VCH (Group Voice Channel Request) ignored, no group affiliations, dstId = %u", dstId); - return false; + if (grp && !m_p25->m_ignoreAffiliationCheck) { + // is this an affiliation required group? + ::lookups::TalkgroupRuleGroupVoice tid = m_p25->m_tidLookup->find(dstId); + if (tid.config().affiliated()) { + if (!m_p25->m_affiliations.hasGroupAff(dstId)) { + LogWarning(LOG_NET, P25_TSDU_STR ", TSBKO, IOSP_GRP_VCH (Group Voice Channel Request) ignored, no group affiliations, dstId = %u", dstId); + return false; + } } }