Instantaneous blacklisting and credential revocation.
This commit is contained in:
parent
32fa061700
commit
0a7a33ef8f
6 changed files with 94 additions and 41 deletions
|
@ -888,16 +888,12 @@ bool Network::_isAllowed(const SharedPtr<Peer> &peer) const
|
|||
// Assumes _lock is locked
|
||||
try {
|
||||
if (_config) {
|
||||
if (_config.isPublic()) {
|
||||
return true;
|
||||
} else {
|
||||
const Membership *m = _memberships.get(peer->address());
|
||||
if (m)
|
||||
return _config.com.agreesWith(m->com());
|
||||
}
|
||||
const Membership *const m = _memberships.get(peer->address());
|
||||
if (m)
|
||||
return m->isAllowedOnNetwork(_config);
|
||||
}
|
||||
} catch ( ... ) {
|
||||
TRACE("isAllowed() check failed for peer %s: unexpected exception: unexpected exception",peer->address().toString().c_str());
|
||||
TRACE("isAllowed() check failed for peer %s: unexpected exception",peer->address().toString().c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue