RST docs + connection error on test
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user