Fixed syslog false negatives. (#1582)

- RSH vs Syslog may still happen for midstream traffic

Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
Toni
2022-06-05 23:01:56 +02:00
committed by GitHub
parent 1d492c9ed8
commit 0b3f8ed849
5 changed files with 36 additions and 25 deletions
+1 -1
View File
@@ -1032,7 +1032,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SYSLOG,
"Syslog", NDPI_PROTOCOL_CATEGORY_SYSTEM_OS,
ndpi_build_default_ports(ports_a, 514, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 514, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DHCP,
"DHCP", NDPI_PROTOCOL_CATEGORY_NETWORK,
+2 -1
View File
@@ -73,7 +73,8 @@ void ndpi_search_syslog(struct ndpi_detection_module_struct
if (ndpi_isalnum(packet->payload[i]) == 0)
{
if (packet->payload[i] == ' ' || packet->payload[i] == ':' ||
packet->payload[i] == '=')
packet->payload[i] == '=' || packet->payload[i] == '[' ||
packet->payload[i] == '-')
{
break;
}