aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/thunder.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-01-30 19:18:12 +0100
committerGitHub <noreply@github.com>2022-01-30 19:18:12 +0100
commit5bb5bec477e1a10a404fd9228ddc0f5041b51123 (patch)
tree923e8b698416595cf18e853215394fe6c66c8e02 /src/lib/protocols/thunder.c
parent1fdcddb33d105a45061da1ceaefcb6a00542322f (diff)
Remove `struct ndpi_id_struct` (#1427)
Remove the last uses of `struct ndpi_id_struct`. That code is not really used and it has not been updated for a very long time: see #1279 for details. Correlation among flows is achieved via LRU caches. This change allows to further reduce memory consumption (see also 91bb77a8). At nDPI 4.0 (more precisly, at a6b10cf, because memory stats were wrong until that commit): ``` nDPI Memory statistics: nDPI Memory (once): 221.15 KB Flow Memory (per flow): 2.94 KB ``` Now: ``` nDPI Memory statistics: nDPI Memory (once): 235.27 KB Flow Memory (per flow): 688 B <-------- ``` i.e. memory usage per flow has been reduced by 77%. Close #1279
Diffstat (limited to 'src/lib/protocols/thunder.c')
-rw-r--r--src/lib/protocols/thunder.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/protocols/thunder.c b/src/lib/protocols/thunder.c
index 7b5625511..caafa4e4c 100644
--- a/src/lib/protocols/thunder.c
+++ b/src/lib/protocols/thunder.c
@@ -135,11 +135,9 @@ void ndpi_int_search_thunder_http(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct *packet = &ndpi_struct->packet;
- struct ndpi_id_struct *src = flow->src;
- struct ndpi_id_struct *dst = flow->dst;
if (packet->payload_packet_len > 5
- && memcmp(packet->payload, "GET /", 5) == 0 && NDPI_SRC_OR_DST_HAS_PROTOCOL(src, dst, NDPI_PROTOCOL_THUNDER)) {
+ && memcmp(packet->payload, "GET /", 5) == 0) {
NDPI_LOG_DBG2(ndpi_struct, "HTTP packet detected\n");
ndpi_parse_packet_line_info(ndpi_struct, flow);