ensure SysView always is permitted and violatess even inclusion rules;

r05a06_dev
Bryan Biedenkapp 6 days ago
parent 3033a5889c
commit 79e2da156c

@ -566,12 +566,18 @@ bool TagAnalogData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32
connection = m_network->m_peers[peerId]; connection = m_network->m_peers[peerId];
} }
// is this peer a replica peer?
if (connection != nullptr) { if (connection != nullptr) {
// is this peer a replica peer?
if (connection->isReplica()) { if (connection->isReplica()) {
return true; // replica peers are *always* allowed to receive traffic and no other rules may filter return true; // replica peers are *always* allowed to receive traffic and no other rules may filter
// these peers // these peers
} }
// is this peer a SysView peer?
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) {
return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter
// these peers
}
} }
// is this a group call? // is this a group call?
@ -616,11 +622,11 @@ bool TagAnalogData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32
} }
} }
// is this peer a SysView or console peer? // is this peer a console peer?
if (connection != nullptr) { if (connection != nullptr) {
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) {
fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check
// for SysView or console peers // for console peers
} }
} }

@ -975,12 +975,18 @@ bool TagDMRData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32_t
connection = m_network->m_peers[peerId]; connection = m_network->m_peers[peerId];
} }
// is this peer a replica peer?
if (connection != nullptr) { if (connection != nullptr) {
// is this peer a replica peer?
if (connection->isReplica()) { if (connection->isReplica()) {
return true; // replica peers are *always* allowed to receive traffic and no other rules may filter return true; // replica peers are *always* allowed to receive traffic and no other rules may filter
// these peers // these peers
} }
// is this peer a SysView peer?
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) {
return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter
// these peers
}
} }
// is this a group call? // is this a group call?
@ -1025,11 +1031,11 @@ bool TagDMRData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32_t
} }
} }
// is this peer a SysView or console peer? // is this peer a console peer?
if (connection != nullptr) { if (connection != nullptr) {
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) {
fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check
// for SysView or console peers // for console peers
} }
} }

@ -849,12 +849,18 @@ bool TagNXDNData::isPeerPermitted(uint32_t peerId, lc::RTCH& lc, uint8_t message
connection = m_network->m_peers[peerId]; connection = m_network->m_peers[peerId];
} }
// is this peer a replica peer?
if (connection != nullptr) { if (connection != nullptr) {
// is this peer a replica peer?
if (connection->isReplica()) { if (connection->isReplica()) {
return true; // replica peers are *always* allowed to receive traffic and no other rules may filter return true; // replica peers are *always* allowed to receive traffic and no other rules may filter
// these peers // these peers
} }
// is this peer a SysView peer?
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) {
return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter
// these peers
}
} }
// is this a group call? // is this a group call?
@ -899,11 +905,11 @@ bool TagNXDNData::isPeerPermitted(uint32_t peerId, lc::RTCH& lc, uint8_t message
} }
} }
// is this peer a SysView or console peer? // is this peer a console peer?
if (connection != nullptr) { if (connection != nullptr) {
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) {
fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check
// for SysView or console peers // for console peers
} }
} }

@ -1372,12 +1372,18 @@ bool TagP25Data::isPeerPermitted(uint32_t peerId, lc::LC& control, DUID::E duid,
connection = m_network->m_peers[peerId]; connection = m_network->m_peers[peerId];
} }
// is this peer a replica peer?
if (connection != nullptr) { if (connection != nullptr) {
// is this peer a replica peer?
if (connection->isReplica()) { if (connection->isReplica()) {
return true; // replica peers are *always* allowed to receive traffic and no other rules may filter return true; // replica peers are *always* allowed to receive traffic and no other rules may filter
// these peers // these peers
} }
// is this peer a SysView peer?
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) {
return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter
// these peers
}
} }
// always permit a TSDU or PDU // always permit a TSDU or PDU
@ -1467,11 +1473,11 @@ bool TagP25Data::isPeerPermitted(uint32_t peerId, lc::LC& control, DUID::E duid,
} }
} }
// is this peer a SysView or console peer? // is this peer a console peer?
if (connection != nullptr) { if (connection != nullptr) {
if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) {
fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check
// for SysView or console peers // for console peers
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.