diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_main.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/zabbix.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 83c3b786e..d857c58b5 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -1867,7 +1867,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp ndpi_build_default_ports(ports_b, 5246, 5247, 0, 0, 0) /* UDP */); ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_ZABBIX, "Zabbix", NDPI_PROTOCOL_CATEGORY_NETWORK, - ndpi_build_default_ports(ports_a, 10050, 0, 0, 0, 0) /* TCP */, + ndpi_build_default_ports(ports_a, 10050, 10051, 0, 0, 0) /* TCP */, ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_S7COMM, "s7comm", NDPI_PROTOCOL_CATEGORY_NETWORK, diff --git a/src/lib/protocols/zabbix.c b/src/lib/protocols/zabbix.c index 29f5320be..528402927 100644 --- a/src/lib/protocols/zabbix.c +++ b/src/lib/protocols/zabbix.c @@ -37,13 +37,12 @@ static void ndpi_int_zabbix_add_connection(struct ndpi_detection_module_struct * static void ndpi_search_zabbix(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &ndpi_struct->packet; - u_int8_t tomatch[] = { 'Z', 'B', 'X', 'D', 0x1 }; + u_int8_t tomatch[] = { 'Z', 'B', 'X', 'D' }; NDPI_LOG_DBG(ndpi_struct, "search Zabbix\n"); - if(packet && - (packet->payload_packet_len > 4) - && (memcmp(packet->payload, tomatch, 5) == 0)) + if((packet->payload_packet_len >= 4) + && (memcmp(packet->payload, tomatch, 4) == 0)) ndpi_int_zabbix_add_connection(ndpi_struct, flow); else NDPI_EXCLUDE_PROTO(ndpi_struct, flow); |