|
|
|
|
@ -714,11 +714,7 @@ void FNENetwork::taskNetworkRx(NetPacketRequest* req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!network->m_peerListLookup->isPeerAllowed(peerId) && !network->m_peerListLookup->isPeerListEmpty()) {
|
|
|
|
|
if (network->m_peerListLookup->getMode() == lookups::PeerListLookup::BLACKLIST) {
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTL, blacklisted from access", peerId);
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTL, failed whitelist check", peerId);
|
|
|
|
|
}
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTL, failed peer ACL check", peerId);
|
|
|
|
|
|
|
|
|
|
network->writePeerNAK(peerId, TAG_REPEATER_LOGIN, NET_CONN_NAK_PEER_ACL, req->address, req->addrLen);
|
|
|
|
|
|
|
|
|
|
@ -751,11 +747,7 @@ void FNENetwork::taskNetworkRx(NetPacketRequest* req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!network->m_peerListLookup->isPeerAllowed(peerId) && !network->m_peerListLookup->isPeerListEmpty()) {
|
|
|
|
|
if (network->m_peerListLookup->getMode() == lookups::PeerListLookup::BLACKLIST) {
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTL, blacklisted from access", peerId);
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTL, failed whitelist check", peerId);
|
|
|
|
|
}
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTL, failed peer ACL check", peerId);
|
|
|
|
|
|
|
|
|
|
network->writePeerNAK(peerId, TAG_REPEATER_LOGIN, NET_CONN_NAK_PEER_ACL, req->address, req->addrLen);
|
|
|
|
|
|
|
|
|
|
@ -805,12 +797,7 @@ void FNENetwork::taskNetworkRx(NetPacketRequest* req)
|
|
|
|
|
bool validAcl = true;
|
|
|
|
|
if (network->m_peerListLookup->getACL()) {
|
|
|
|
|
if (!network->m_peerListLookup->isPeerAllowed(peerId) && !network->m_peerListLookup->isPeerListEmpty()) {
|
|
|
|
|
if (network->m_peerListLookup->getMode() == lookups::PeerListLookup::BLACKLIST) {
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTK, blacklisted from access", peerId);
|
|
|
|
|
} else {
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTK, failed whitelist check", peerId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LogWarning(LOG_NET, "PEER %u RPTK, failed peer ACL check", peerId);
|
|
|
|
|
validAcl = false;
|
|
|
|
|
} else {
|
|
|
|
|
lookups::PeerId peerEntry = network->m_peerListLookup->find(peerId);
|
|
|
|
|
@ -1158,7 +1145,6 @@ void FNENetwork::taskNetworkRx(NetPacketRequest* req)
|
|
|
|
|
if (connection->connected() && connection->address() == ip) {
|
|
|
|
|
// is this peer allowed to request keys?
|
|
|
|
|
if (network->m_peerListLookup->getACL()) {
|
|
|
|
|
if (network->m_peerListLookup->getMode() == lookups::PeerListLookup::WHITELIST) {
|
|
|
|
|
lookups::PeerId peerEntry = network->m_peerListLookup->find(peerId);
|
|
|
|
|
if (peerEntry.peerDefault()) {
|
|
|
|
|
break;
|
|
|
|
|
@ -1169,7 +1155,6 @@ void FNENetwork::taskNetworkRx(NetPacketRequest* req)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<KMMFrame> frame = KMMFactory::create(req->buffer + 11U);
|
|
|
|
|
if (frame == nullptr) {
|
|
|
|
|
|