STUN: improve extraction of Mapped-Address metadata (#2370)

Enable parsing of Mapped-Address attribute for all STUN flows: that
means that STUN classification might require more packets.

Add a configuration knob to enable/disable this feature.

Note that we can have (any) STUN metadata also for flows *not*
classified as STUN (because of DTLS).

Add support for ipv6.

Restore the correct extra dissection logic for Telegram flows.
This commit is contained in:
Ivan Nardi
2024-04-08 10:24:51 +02:00
committed by GitHub
parent f5905a62c7
commit 1b3ef7d7b2
35 changed files with 409 additions and 248 deletions
+5 -1
View File
@@ -301,8 +301,12 @@ typedef struct ndpi_flow_info {
struct {
struct {
u_int32_t ipv4;
union {
u_int32_t v4;
u_int8_t v6[16];
} address;
u_int16_t port;
u_int16_t is_ipv6: 1, _pad: 15;
} mapped_address;
} stun;