Add missing NDPI_LOG_DBG in some dissectors (#2290)

* Add missing NDPI_LOG_DBG

* Add missing NDPI_LOG_DBG in yojimbo.c
This commit is contained in:
Vladimir Gavrilov
2024-01-29 09:25:29 +01:00
committed by GitHub
parent c807d84054
commit fb095a339d
8 changed files with 18 additions and 1 deletions
+3 -1
View File
@@ -54,7 +54,9 @@ static void ndpi_search_fins(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search Omron FINS\n");
/* FINS/TCP header is 20 bytes long, but it's usually followed
* by 10 byte FINS header and command data
*/
+2
View File
@@ -46,6 +46,8 @@ static void ndpi_search_hislip(struct ndpi_detection_module_struct *ndpi_struct,
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search HiSLIP\n");
if ((packet->payload_packet_len >= 16) &&
(memcmp(packet->payload, "HS", 2) == 0) && ((packet->payload[2] - 26) < 0x65) &&
(ndpi_ntohll(get_u_int64_t(packet->payload, 8)) == (u_int64_t)(packet->payload_packet_len - 16)))
+2
View File
@@ -34,6 +34,8 @@ static void ndpi_search_json_rpc(struct ndpi_detection_module_struct *ndpi_struc
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search JSON-RPC\n");
if (flow->detected_protocol_stack[0] == NDPI_PROTOCOL_HTTP ||
flow->detected_protocol_stack[1] == NDPI_PROTOCOL_HTTP)
{
+2
View File
@@ -34,6 +34,8 @@ static void ndpi_search_mumble(struct ndpi_detection_module_struct *ndpi_struct,
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search Mumble\n");
if (current_pkt_from_client_to_server(ndpi_struct, flow) &&
packet->payload_packet_len == 12)
{
+2
View File
@@ -35,6 +35,8 @@ static void ndpi_search_mysql_tcp(struct ndpi_detection_module_struct *ndpi_stru
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search MySQL\n");
if(packet->payload_packet_len > 70 && packet->payload_packet_len < 120) {
u_int32_t length = (packet->payload[2] << 16) + (packet->payload[1] << 8) + packet->payload[0];
+2
View File
@@ -45,6 +45,8 @@ static void ndpi_search_opc_ua(struct ndpi_detection_module_struct *ndpi_struct,
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search OPC UA\n");
/* Shortest OPC UA packet I've ever seen */
if (packet->payload_packet_len >= 16) {
/* Each OPC UA MessageChunk starts with a 3 byte ASCII code that defines
+2
View File
@@ -44,6 +44,8 @@ static void ndpi_search_radmin(struct ndpi_detection_module_struct *ndpi_struct,
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search Radmin\n");
if (current_pkt_from_client_to_server(ndpi_struct, flow) && packet->payload_packet_len == 10 &&
!flow->l4.tcp.radmin_stage)
{
+3
View File
@@ -39,6 +39,9 @@ static void ndpi_search_yojimbo(struct ndpi_detection_module_struct *ndpi_struct
struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct const * const packet = &ndpi_struct->packet;
NDPI_LOG_DBG(ndpi_struct, "search Yojimbo\n");
uint64_t const magic = 0x4e4554434f444520; // "NETCODE "
if (packet->payload_packet_len < 9)