Add network bool value to validateAccess
This commit is contained in:
parent
10feb892b4
commit
adc360b042
|
@ -111,9 +111,10 @@ bool DMRAccessControl::validateSrcId(unsigned int id)
|
|||
}
|
||||
}
|
||||
|
||||
bool DMRAccessControl::validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot)
|
||||
bool DMRAccessControl::validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot, bool network)
|
||||
{
|
||||
if (!DMRAccessControl::validateSrcId(src_id)) {
|
||||
// source ID validation is only applied to RF traffic
|
||||
if (!network && !DMRAccessControl::validateSrcId(src_id)) {
|
||||
LogMessage("DMR Slot %u, invalid access attempt from %u (blacklisted)", slot, src_id);
|
||||
return false;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
|
||||
static bool validateSrcId(unsigned int id);
|
||||
|
||||
static bool validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot);
|
||||
static bool validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot, bool network);
|
||||
|
||||
static void init(const std::vector<unsigned int>& DstIdBlacklistSlot1, const std::vector<unsigned int>& DstIdWhitelistSlot1, const std::vector<unsigned int>& DstIdBlacklistSlot2, const std::vector<unsigned int>& DstIdWhitelistSlot2, const std::vector<unsigned int>& SrcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes,unsigned int id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue