mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Add forgot define enabling banlist redundant check
This commit is contained in:
parent
1599689eab
commit
0eee4adaa8
@ -1240,9 +1240,11 @@ int pqissl::accept_locked( SSL *ssl, int fd,
|
|||||||
constexpr int success = 1;
|
constexpr int success = 1;
|
||||||
|
|
||||||
#ifdef RS_PQISSL_BANLIST_REDUNDANT_CHECK
|
#ifdef RS_PQISSL_BANLIST_REDUNDANT_CHECK
|
||||||
/* TODO: It make no sense to check banlist at this point, as we are actively
|
/* At this point, as we are actively attempting the connection, we decide
|
||||||
* attempting the connection, we decide the address to which to connect to,
|
* the address to which to connect to, banned addresses should never get
|
||||||
* banned addresses should never get here */
|
* here as the filtering for banned addresses happens much before, this
|
||||||
|
* check is therefore redundant, and if it trigger something really fishy
|
||||||
|
* must be happening (a bug somewhere else in the code). */
|
||||||
uint32_t check_result;
|
uint32_t check_result;
|
||||||
uint32_t checking_flags = RSBANLIST_CHECKING_FLAGS_BLACKLIST;
|
uint32_t checking_flags = RSBANLIST_CHECKING_FLAGS_BLACKLIST;
|
||||||
|
|
||||||
@ -1253,11 +1255,13 @@ int pqissl::accept_locked( SSL *ssl, int fd,
|
|||||||
checking_flags,
|
checking_flags,
|
||||||
&check_result ) )
|
&check_result ) )
|
||||||
{
|
{
|
||||||
std::cerr << __PRETTY_FUNCTION__
|
RsErr() << __PRETTY_FUNCTION__
|
||||||
<< " (SS) refusing incoming SSL connection from blacklisted "
|
<< " Refusing incoming SSL connection from blacklisted "
|
||||||
<< "foreign address "
|
<< "foreign address " << foreign_addr
|
||||||
<< sockaddr_storage_iptostring(foreign_addr)
|
<< ". Reason: " << check_result << ". This should never happen "
|
||||||
<< ". Reason: " << check_result << "." << std::endl;
|
<< "at this point! Please report full log to developers!"
|
||||||
|
<< std::endl;
|
||||||
|
print_stacktrace();
|
||||||
|
|
||||||
RsServer::notify()->AddFeedItem(
|
RsServer::notify()->AddFeedItem(
|
||||||
RS_FEED_ITEM_SEC_IP_BLACKLISTED,
|
RS_FEED_ITEM_SEC_IP_BLACKLISTED,
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#define RS_PQISSL_AUTH_REDUNDANT_CHECK 1
|
#define RS_PQISSL_AUTH_REDUNDANT_CHECK 1
|
||||||
|
|
||||||
|
#define RS_PQISSL_BANLIST_REDUNDANT_CHECK 1
|
||||||
|
|
||||||
|
|
||||||
#define WAITING_NOT 0
|
#define WAITING_NOT 0
|
||||||
#define WAITING_DELAY 1
|
#define WAITING_DELAY 1
|
||||||
|
Loading…
Reference in New Issue
Block a user