diff --git a/backend/binsrc/classes/nfqueue.cpp b/backend/binsrc/classes/nfqueue.cpp index 9a60271..04ee946 100644 --- a/backend/binsrc/classes/nfqueue.cpp +++ b/backend/binsrc/classes/nfqueue.cpp @@ -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 \ No newline at end of file +#endif // NFQUEUE_CLASS_CPP diff --git a/frontend/src/components/NFProxy/utils.ts b/frontend/src/components/NFProxy/utils.ts index 8c53f1b..3ce66de 100644 --- a/frontend/src/components/NFProxy/utils.ts +++ b/frontend/src/components/NFProxy/utils.ts @@ -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 diff --git a/tests/utils/tcpserver.py b/tests/utils/tcpserver.py index 519ab5e..2d04547 100644 --- a/tests/utils/tcpserver.py +++ b/tests/utils/tcpserver.py @@ -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 \ No newline at end of file + return received_data == data