RST docs + connection error on test
This commit is contained in:
@@ -295,7 +295,7 @@ class PktRequest {
|
|||||||
if (tcp){
|
if (tcp){
|
||||||
//If the packet has data, we have to remove it
|
//If the packet has data, we have to remove it
|
||||||
set_data(nullptr, 0);
|
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
|
//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
|
//Packets will be filtered anyway also if client don't send packets
|
||||||
if (_data_original_size != 0){
|
if (_data_original_size != 0){
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ from firegex.nfproxy import pyfilter
|
|||||||
from firegex.nfproxy import REJECT, ACCEPT, UNSTABLE_MANGLE, DROP
|
from firegex.nfproxy import REJECT, ACCEPT, UNSTABLE_MANGLE, DROP
|
||||||
# - The filter must return one of the following values:
|
# - The filter must return one of the following values:
|
||||||
# - ACCEPT: The packet will be accepted
|
# - 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
|
# - UNSTABLE_MANGLE: The packet will be mangled and accepted
|
||||||
# - DROP: All the packets in this stream will be easly dropped
|
# - DROP: All the packets in this stream will be easly dropped
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class TcpServer:
|
|||||||
def recv_packet(self):
|
def recv_packet(self):
|
||||||
try:
|
try:
|
||||||
return self.client_sock.recv(4096)
|
return self.client_sock.recv(4096)
|
||||||
except TimeoutError:
|
except (TimeoutError, ConnectionResetError):
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user