diff options
author | Nardi Ivan <nardi.ivan@gmail.com> | 2020-05-09 15:41:20 +0200 |
---|---|---|
committer | Nardi Ivan <nardi.ivan@gmail.com> | 2020-05-09 15:41:20 +0200 |
commit | f8503da9e92e483c1d9839f5578646285b0dce6e (patch) | |
tree | 89eacd9dcdac4a4ffc7b683e08da6f776d50bb9f | |
parent | 39ae57e6a3d93cb91def5d76fc54e89075f01867 (diff) |
Fix NATS dissector
-rw-r--r-- | src/lib/protocols/nats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/nats.c b/src/lib/protocols/nats.c index a979fdbb9..300cc838d 100644 --- a/src/lib/protocols/nats.c +++ b/src/lib/protocols/nats.c @@ -57,7 +57,7 @@ void ndpi_search_nats_tcp(struct ndpi_detection_module_struct *ndpi_struct, if(!match) continue; if(ndpi_strnstr((const char *)match, "\r\n", - flow->packet.payload_packet_len - ((unsigned long)flow->packet.payload - (unsigned long)match)) != NULL) { + flow->packet.payload_packet_len - ((unsigned long)match - (unsigned long)flow->packet.payload)) != NULL) { NDPI_LOG_INFO(ndpi_struct, "found NATS\n"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_NATS, NDPI_PROTOCOL_UNKNOWN); |