diff options
author | Nardi Ivan <nardi.ivan@gmail.com> | 2022-08-12 16:40:41 +0200 |
---|---|---|
committer | Toni <matzeton@googlemail.com> | 2022-09-14 17:51:39 +0200 |
commit | 7571f48392ef3b79eb25b94f1da6932a137c4f02 (patch) | |
tree | cf983fb14349660a262b611035ddabb2ac7718ae /src/lib/protocols/telnet.c | |
parent | b4f52437169b8b3c92811566af3965719b4e0c2c (diff) |
Dissectors shouldn't update `flow->guessed_host_protocol_id`
The field `flow->guessed_host_protocol_id` is set at the beginning of
the flow analysis and it represents the "classification by ip" of the flow
itself.
This field should never be changed. Dissectors which want to provide an
"hint" about the classification, should update `flow->guessed_protocol_id`
instead. Such "hint" is useless if the dissector set the "extra-dissection"
data-path.
Rename such field to `guessed_protocol_id_by_ip` to better describe its
role.
Preliminary work necessary for #1687
Diffstat (limited to 'src/lib/protocols/telnet.c')
-rw-r--r-- | src/lib/protocols/telnet.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lib/protocols/telnet.c b/src/lib/protocols/telnet.c index ed0808596..5bec572e6 100644 --- a/src/lib/protocols/telnet.c +++ b/src/lib/protocols/telnet.c @@ -130,8 +130,6 @@ static int search_telnet_again(struct ndpi_detection_module_struct *ndpi_struct, static void ndpi_int_telnet_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { - flow->guessed_host_protocol_id = flow->guessed_protocol_id = NDPI_PROTOCOL_TELNET; - flow->max_extra_packets_to_check = 64; flow->extra_packets_func = search_telnet_again; |