File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -906,7 +906,6 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
906
906
NetPermissionFlags permissionFlags = NetPermissionFlags::PF_NONE;
907
907
hListenSocket.AddSocketPermissionFlags (permissionFlags);
908
908
AddWhitelistPermissionFlags (permissionFlags, addr);
909
- const bool noban = NetPermissions::HasFlag (permissionFlags, NetPermissionFlags::PF_NOBAN);
910
909
bool legacyWhitelisted = false ;
911
910
if (NetPermissions::HasFlag (permissionFlags, NetPermissionFlags::PF_ISIMPLICIT)) {
912
911
NetPermissions::ClearFlag (permissionFlags, PF_ISIMPLICIT);
@@ -953,7 +952,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
953
952
954
953
// Don't accept connections from banned peers, but if our inbound slots aren't almost full, accept
955
954
// if the only banning reason was an automatic misbehavior ban.
956
- if (!noban && bannedlevel > ((nInbound + 1 < nMaxInbound) ? 1 : 0 ))
955
+ if (!NetPermissions::HasFlag (permissionFlags, NetPermissionFlags::PF_NOBAN) && bannedlevel > ((nInbound + 1 < nMaxInbound) ? 1 : 0 ))
957
956
{
958
957
LogPrint (BCLog::NET, " connection from %s dropped (banned)\n " , addr.ToString ());
959
958
CloseSocket (hSocket);
You can’t perform that action at this time.
0 commit comments