diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2024-01-02 19:30:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 19:30:59 +0100 |
commit | 88d1416b7007307dabccf391cd5731059b376687 (patch) | |
tree | 7a768dbe2d4d9e0ff09d0fcfe4859a3503f20a77 /src | |
parent | 0180c1f04aac3489d50c7186c899869d264ab7a9 (diff) |
STUN: fix detection of Google Meet over IPv6 (#2241)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/stun.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c index c9bb76166..59106c77e 100644 --- a/src/lib/protocols/stun.c +++ b/src/lib/protocols/stun.c @@ -575,13 +575,13 @@ static void ndpi_int_stun_add_connection(struct ndpi_detection_module_struct *nd (ntohs(flow->s_port) >= 19302 && ntohs(flow->s_port) <= 19309) || ntohs(flow->s_port) == 3478) { if(flow->is_ipv6) { - u_int64_t pref1 = 0x2001486048640005; /* 2001:4860:4864:5::/64 */ - u_int64_t pref2 = 0x2001486048640006; /* 2001:4860:4864:6::/64 */ + u_int64_t pref1 = ndpi_htonll(0x2001486048640005); /* 2001:4860:4864:5::/64 */ + u_int64_t pref2 = ndpi_htonll(0x2001486048640006); /* 2001:4860:4864:6::/64 */ - if(memcmp(&flow->c_address.v6, &pref1, sizeof(pref1)) == 0 || - memcmp(&flow->c_address.v6, &pref2, sizeof(pref2)) == 0 || - memcmp(&flow->s_address.v6, &pref1, sizeof(pref1)) == 0 || - memcmp(&flow->s_address.v6, &pref2, sizeof(pref2)) == 0) { + if(memcmp(flow->c_address.v6, &pref1, sizeof(pref1)) == 0 || + memcmp(flow->c_address.v6, &pref2, sizeof(pref2)) == 0 || + memcmp(flow->s_address.v6, &pref1, sizeof(pref1)) == 0 || + memcmp(flow->s_address.v6, &pref2, sizeof(pref2)) == 0) { app_proto = NDPI_PROTOCOL_GOOGLE_MEET; } } else { |