RST docs + connection error on test

This commit is contained in:
Domingo Dirutigliano
2025-04-12 20:34:45 +02:00
parent d0b2c67554
commit 129a262704
3 changed files with 5 additions and 5 deletions

View File

@@ -295,7 +295,7 @@ class PktRequest {
if (tcp){
//If the packet has data, we have to remove it
set_data(nullptr, 0);
//For the first matched data or only for data packets, we set FIN bit
//For the first matched data or only for data packets, we set RST bit
//This only for client packets, because this will trigger server to close the connection
//Packets will be filtered anyway also if client don't send packets
if (_data_original_size != 0){
@@ -585,4 +585,4 @@ uint32_t hash_stream_id(const stream_id &sid) {
}
}}
#endif // NFQUEUE_CLASS_CPP
#endif // NFQUEUE_CLASS_CPP

View File

@@ -117,7 +117,7 @@ from firegex.nfproxy import pyfilter
from firegex.nfproxy import REJECT, ACCEPT, UNSTABLE_MANGLE, DROP
# - The filter must return one of the following values:
# - ACCEPT: The packet will be accepted
# - REJECT: The packet will be rejected (will be activated a mechanism to send a FIN packet and drop all data in the stream)
# - REJECT: The packet will be rejected (will be activated a mechanism to send a RST packet and drop all data in the stream)
# - UNSTABLE_MANGLE: The packet will be mangled and accepted
# - DROP: All the packets in this stream will be easly dropped

View File

@@ -64,7 +64,7 @@ class TcpServer:
def recv_packet(self):
try:
return self.client_sock.recv(4096)
except TimeoutError:
except (TimeoutError, ConnectionResetError):
if self.verbose:
traceback.print_exc()
return False
@@ -76,4 +76,4 @@ class TcpServer:
self.close_client()
if get_data:
return received_data
return received_data == data
return received_data == data