aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-05-29 16:55:53 +0200
committerGitHub <noreply@github.com>2023-05-29 16:55:53 +0200
commit346bb268e22e190e79b16091817d5178a608d4a0 (patch)
tree939efeb80b6ac3bf3696a1582037cdfe8e664c2c /src
parent82fa3a098632006cc8edffb647cabee08843524a (diff)
Avoid calling `ndpi_reconcile_protocols()` twice in `ndpi_detection_giveup()` (#1996)
`ndpi_reconcile_protocols()` is already called by `ndpi_set_detected_protocol()`
Diffstat (limited to 'src')
-rw-r--r--src/lib/ndpi_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 5b340aba1..9776b0b02 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -6432,16 +6432,15 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
if(ret.app_protocol == NDPI_PROTOCOL_UNKNOWN &&
flow->guessed_protocol_id_by_ip != NDPI_PROTOCOL_UNKNOWN) {
- ndpi_int_change_protocol(ndpi_str, flow,
- flow->guessed_protocol_id_by_ip, ret.master_protocol,
- NDPI_CONFIDENCE_MATCH_BY_IP);
+ ndpi_set_detected_protocol(ndpi_str, flow,
+ flow->guessed_protocol_id_by_ip, ret.master_protocol,
+ NDPI_CONFIDENCE_MATCH_BY_IP);
ret.app_protocol = flow->detected_protocol_stack[0];
}
if(ret.app_protocol != NDPI_PROTOCOL_UNKNOWN) {
*protocol_was_guessed = 1;
ndpi_fill_protocol_category(ndpi_str, flow, &ret);
- ndpi_reconcile_protocols(ndpi_str, flow, &ret);
}
return(ret);