diff options
author | lns <matzeton@googlemail.com> | 2023-10-10 15:53:29 +0200 |
---|---|---|
committer | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-10-11 16:44:26 +0200 |
commit | 304747f1fac02038c64dca004a80768db43eeb65 (patch) | |
tree | 0a9967bc7248a8a90ea8a071fb43821e72f3f762 /src | |
parent | 4a0eda69ad9755aa6f922a2c786b3bf93c777f77 (diff) |
Improved MGCP detection by allowing '\r' as line feed.
Signed-off-by: lns <matzeton@googlemail.com>
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/mgcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/protocols/mgcp.c b/src/lib/protocols/mgcp.c index a27959fb6..876325bd3 100644 --- a/src/lib/protocols/mgcp.c +++ b/src/lib/protocols/mgcp.c @@ -1,7 +1,7 @@ /* * mgcp.c * - * Copyright (C) 2017-22 - ntop.org + * Copyright (C) 2017-23 - ntop.org * * This file is part of nDPI, an open source deep packet inspection * library based on the OpenDPI and PACE technology by ipoque GmbH @@ -50,7 +50,9 @@ static void ndpi_search_mgcp(struct ndpi_detection_module_struct *ndpi_struct, s if (packet->payload_packet_len < 8) break; /* packet must end with 0x0d0a or with 0x0a */ - if (packet->payload[packet->payload_packet_len - 1] != 0x0a) break; + if (packet->payload[packet->payload_packet_len - 1] != 0x0a && + packet->payload[packet->payload_packet_len - 1] != 0x0d) + break; if (packet->payload[0] != 'A' && packet->payload[0] != 'C' && packet->payload[0] != 'D' && packet->payload[0] != 'E' && packet->payload[0] != 'M' && packet->payload[0] != 'N' && |