aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/xbox.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-01-16 16:19:00 +0100
committerGitHub <noreply@github.com>2022-01-16 16:19:00 +0100
commit611c753da5e1736ff97fca570d495f0ed2c52c2f (patch)
tree95bf406da0d652a3541a99327a3723c993ab09c4 /src/lib/protocols/xbox.c
parentf3af39ee42b954ec0486986c7cfac9ee44cd63e4 (diff)
XBox, Diameter: fix dissectors initialization (#1405)
These dissectors have *never* been triggered because their registration functions use the wrong parameter/bitmask. Diameter code is buggy since the origianl commit (1d108234), while XBox code since 5266c726. Fix some false positives in Xbox code.
Diffstat (limited to 'src/lib/protocols/xbox.c')
-rw-r--r--src/lib/protocols/xbox.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/protocols/xbox.c b/src/lib/protocols/xbox.c
index 0878f933c..8b2ed2b84 100644
--- a/src/lib/protocols/xbox.c
+++ b/src/lib/protocols/xbox.c
@@ -80,12 +80,17 @@ void ndpi_search_xbox(struct ndpi_detection_module_struct *ndpi_struct, struct n
NDPI_LOG_DBG(ndpi_struct, "maybe xbox\n");
flow->l4.udp.xbox_stage++;
return;
- } else if ((dport == 3075 || dport == 3076 || dport == 3077 || dport == 3078) ||
+ }
+/* Disable this code. These checks are quite weak and these ports are not mentioned at
+ https://support.xbox.com/en-US/help/hardware-network/connect-network/network-ports-used-xbox-live */
+#if 0
+ else if ((dport == 3075 || dport == 3076 || dport == 3077 || dport == 3078) ||
(sport == 3075 || sport == 3076 || sport == 3077 || sport == 3078)) {
ndpi_int_xbox_add_connection(ndpi_struct, flow);
NDPI_LOG_INFO(ndpi_struct, "found xbox udp port connection detected\n");
return;
}
+#endif
/* exclude here all non matched udp traffic, exclude here tcp only if http has been excluded, because xbox could use http */
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_HTTP) != 0) {
@@ -102,7 +107,7 @@ void init_xbox_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int
NDPI_PROTOCOL_XBOX,
ndpi_search_xbox,
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_UDP_WITH_PAYLOAD,
- NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN,
+ SAVE_DETECTION_BITMASK_AS_UNKNOWN,
ADD_TO_DETECTION_BITMASK);
*id += 1;