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) {
906906 NetPermissionFlags permissionFlags = NetPermissionFlags::PF_NONE;
907907 hListenSocket.AddSocketPermissionFlags (permissionFlags);
908908 AddWhitelistPermissionFlags (permissionFlags, addr);
909- const bool noban = NetPermissions::HasFlag (permissionFlags, NetPermissionFlags::PF_NOBAN);
910909 bool legacyWhitelisted = false ;
911910 if (NetPermissions::HasFlag (permissionFlags, NetPermissionFlags::PF_ISIMPLICIT)) {
912911 NetPermissions::ClearFlag (permissionFlags, PF_ISIMPLICIT);
@@ -953,7 +952,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
953952
954953 // Don't accept connections from banned peers, but if our inbound slots aren't almost full, accept
955954 // 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 ))
957956 {
958957 LogPrint (BCLog::NET, " connection from %s dropped (banned)\n " , addr.ToString ());
959958 CloseSocket (hSocket);
You can’t perform that action at this time.
0 commit comments