add support to selectively revert to previous logic ignoring affiliation checks;

pull/72/head
Bryan Biedenkapp 1 year ago
parent b0369d272a
commit cc274ba78e

@ -129,6 +129,8 @@ protocols:
# Flag indicating whether or not the source ID validation before granting disabled. # Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false 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. # Flag indicating whether or not received RF embedded LC data only should be transmitted.
embeddedLCOnly: false embeddedLCOnly: false
# Flag indicating whether talker alias data should be dumped to the log. # 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 # (This applies only in conventional operations where channel granting is utilized and RF-only talkgroup
# steering is required.) # steering is required.)
disableNetworkGrant: false 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 # Flag indicating that the host will attempt to automatically inhibit unauthorized RIDs (those not in the
# RID ACL list). # RID ACL list).
inhibitUnauthorized: false inhibitUnauthorized: false
@ -283,6 +287,8 @@ protocols:
# Flag indicating whether or not the source ID validation before granting disabled. # Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false 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. # Flag indicating the host should verify group affiliation.
verifyAff: false verifyAff: false
# Flag indicating the host should verify unit registration. # Flag indicating the host should verify unit registration.

@ -172,6 +172,10 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, ::lookups::VoiceChDa
m_slot1->setFrameLossThreshold(frameLossThreshold); m_slot1->setFrameLossThreshold(frameLossThreshold);
m_slot2->setFrameLossThreshold(frameLossThreshold); m_slot2->setFrameLossThreshold(frameLossThreshold);
bool ignoreAffiliationCheck = dmrProtocol["ignoreAffiliationCheck"].as<bool>(true);
m_slot1->m_ignoreAffiliationCheck = ignoreAffiliationCheck;
m_slot2->m_ignoreAffiliationCheck = ignoreAffiliationCheck;
if (printOptions) { if (printOptions) {
if (enableTSCC) { if (enableTSCC) {
LogInfo(" TSCC Slot: %u", m_tsccSlotNo); 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(" Notify Control: %s", notifyCC ? "yes" : "no");
LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F); LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F);
LogInfo(" Frame Loss Threshold: %u", frameLossThreshold); LogInfo(" Frame Loss Threshold: %u", frameLossThreshold);

@ -151,6 +151,7 @@ Slot::Slot(uint32_t slotNo, uint32_t timeout, uint32_t tgHang, uint32_t queueSiz
m_ccHalted(false), m_ccHalted(false),
m_enableTSCC(false), m_enableTSCC(false),
m_dedicatedTSCC(false), m_dedicatedTSCC(false),
m_ignoreAffiliationCheck(false),
m_tsccPayloadDstId(0U), m_tsccPayloadDstId(0U),
m_tsccPayloadSrcId(0U), m_tsccPayloadSrcId(0U),
m_tsccPayloadGroup(false), m_tsccPayloadGroup(false),

@ -383,6 +383,7 @@ namespace dmr
bool m_enableTSCC; bool m_enableTSCC;
bool m_dedicatedTSCC; bool m_dedicatedTSCC;
bool m_ignoreAffiliationCheck;
uint32_t m_tsccPayloadDstId; uint32_t m_tsccPayloadDstId;
uint32_t m_tsccPayloadSrcId; uint32_t m_tsccPayloadSrcId;

@ -857,6 +857,7 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_
::lookups::TalkgroupRuleGroupVoice groupVoice = m_tscc->m_tidLookup->find(dstId); ::lookups::TalkgroupRuleGroupVoice groupVoice = m_tscc->m_tidLookup->find(dstId);
slot = groupVoice.source().tgSlot(); slot = groupVoice.source().tgSlot();
if (grp && !m_tscc->m_ignoreAffiliationCheck) {
// is this an affiliation required group? // is this an affiliation required group?
::lookups::TalkgroupRuleGroupVoice tid = m_tscc->m_tidLookup->find(dstId, slot); ::lookups::TalkgroupRuleGroupVoice tid = m_tscc->m_tidLookup->find(dstId, slot);
if (tid.config().affiliated()) { if (tid.config().affiliated()) {
@ -865,6 +866,7 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_
return false; return false;
} }
} }
}
uint32_t availChNo = m_tscc->m_affiliations->getAvailableChannelForSlot(slot); uint32_t availChNo = m_tscc->m_affiliations->getAvailableChannelForSlot(slot);
if (!m_tscc->m_affiliations->rfCh()->isRFChAvailable() || availChNo == 0U) { if (!m_tscc->m_affiliations->rfCh()->isRFChAvailable() || availChNo == 0U) {

@ -70,6 +70,7 @@ Control::Control(bool authoritative, uint32_t ran, uint32_t callHang, uint32_t q
m_duplex(duplex), m_duplex(duplex),
m_enableControl(false), m_enableControl(false),
m_dedicatedControl(false), m_dedicatedControl(false),
m_ignoreAffiliationCheck(false),
m_rfLastLICH(), m_rfLastLICH(),
m_rfLC(), m_rfLC(),
m_netLC(), 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<bool>(false); m_control->m_disableGrantSrcIdCheck = control["disableGrantSourceIdCheck"].as<bool>(false);
m_ignoreAffiliationCheck = nxdnProtocol["ignoreAffiliationCheck"].as<bool>(false);
yaml::Node rfssConfig = systemConf["config"]; yaml::Node rfssConfig = systemConf["config"];
yaml::Node controlCh = rfssConfig["controlCh"]; yaml::Node controlCh = rfssConfig["controlCh"];
m_notifyCC = controlCh["notifyEnable"].as<bool>(false); m_notifyCC = controlCh["notifyEnable"].as<bool>(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(" Notify Control: %s", m_notifyCC ? "yes" : "no");
LogInfo(" Verify Affiliation: %s", m_control->m_verifyAff ? "yes" : "no"); LogInfo(" Verify Affiliation: %s", m_control->m_verifyAff ? "yes" : "no");
LogInfo(" Verify Registration: %s", m_control->m_verifyReg ? "yes" : "no"); LogInfo(" Verify Registration: %s", m_control->m_verifyReg ? "yes" : "no");

@ -275,6 +275,7 @@ namespace nxdn
bool m_duplex; bool m_duplex;
bool m_enableControl; bool m_enableControl;
bool m_dedicatedControl; bool m_dedicatedControl;
bool m_ignoreAffiliationCheck;
channel::LICH m_rfLastLICH; channel::LICH m_rfLastLICH;
lc::RTCH m_rfLC; lc::RTCH m_rfLC;

@ -468,6 +468,7 @@ bool ControlSignaling::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uin
} }
if (!m_nxdn->m_affiliations.isGranted(dstId)) { if (!m_nxdn->m_affiliations.isGranted(dstId)) {
if (grp && !m_nxdn->m_ignoreAffiliationCheck) {
// is this an affiliation required group? // is this an affiliation required group?
::lookups::TalkgroupRuleGroupVoice tid = m_nxdn->m_tidLookup->find(dstId); ::lookups::TalkgroupRuleGroupVoice tid = m_nxdn->m_tidLookup->find(dstId);
if (tid.config().affiliated()) { if (tid.config().affiliated()) {
@ -476,6 +477,7 @@ bool ControlSignaling::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uin
return false; return false;
} }
} }
}
if (!m_nxdn->m_affiliations.rfCh()->isRFChAvailable()) { if (!m_nxdn->m_affiliations.rfCh()->isRFChAvailable()) {
if (grp) { if (grp) {

@ -77,6 +77,7 @@ Control::Control(bool authoritative, uint32_t nac, uint32_t callHang, uint32_t q
m_allowExplicitSourceId(true), m_allowExplicitSourceId(true),
m_convNetGrantDemand(false), m_convNetGrantDemand(false),
m_sndcpSupport(false), m_sndcpSupport(false),
m_ignoreAffiliationCheck(false),
m_idenTable(idenTable), m_idenTable(idenTable),
m_ridLookup(ridLookup), m_ridLookup(ridLookup),
m_tidLookup(tidLookup), m_tidLookup(tidLookup),
@ -265,6 +266,8 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
m_sndcpSupport = p25Protocol["sndcpSupport"].as<bool>(false); m_sndcpSupport = p25Protocol["sndcpSupport"].as<bool>(false);
m_ignoreAffiliationCheck = p25Protocol["ignoreAffiliationCheck"].as<bool>(false);
yaml::Node control = p25Protocol["control"]; yaml::Node control = p25Protocol["control"];
m_enableControl = control["enable"].as<bool>(false); m_enableControl = control["enable"].as<bool>(false);
if (m_enableControl) { 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(" 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 Status ACK: %s", m_control->m_noStatusAck ? "yes" : "no");
LogInfo(" No Message ACK: %s", m_control->m_noMessageAck ? "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"); LogInfo(" Unit-to-Unit Availability Check: %s", m_control->m_unitToUnitAvailCheck ? "yes" : "no");

@ -307,6 +307,7 @@ namespace p25
bool m_allowExplicitSourceId; bool m_allowExplicitSourceId;
bool m_convNetGrantDemand; bool m_convNetGrantDemand;
bool m_sndcpSupport; bool m_sndcpSupport;
bool m_ignoreAffiliationCheck;
::lookups::IdenTableLookup* m_idenTable; ::lookups::IdenTableLookup* m_idenTable;
::lookups::RadioIdLookup* m_ridLookup; ::lookups::RadioIdLookup* m_ridLookup;

@ -2179,6 +2179,7 @@ bool ControlSignaling::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_
} }
if (!m_p25->m_affiliations.isGranted(dstId)) { if (!m_p25->m_affiliations.isGranted(dstId)) {
if (grp && !m_p25->m_ignoreAffiliationCheck) {
// is this an affiliation required group? // is this an affiliation required group?
::lookups::TalkgroupRuleGroupVoice tid = m_p25->m_tidLookup->find(dstId); ::lookups::TalkgroupRuleGroupVoice tid = m_p25->m_tidLookup->find(dstId);
if (tid.config().affiliated()) { if (tid.config().affiliated()) {
@ -2187,6 +2188,7 @@ bool ControlSignaling::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_
return false; return false;
} }
} }
}
if (!m_p25->m_affiliations.rfCh()->isRFChAvailable()) { if (!m_p25->m_affiliations.rfCh()->isRFChAvailable()) {
if (grp) { if (grp) {

Loading…
Cancel
Save

Powered by TurnKey Linux.