summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-05-01 17:44:24 +0800
committeryangwei <[email protected]>2024-05-01 17:44:24 +0800
commit0b3f4fd58e72a93a9545507b0f44304799be539d (patch)
tree2b93a48217b68b040ff9c0493eeceb6b6d602dc4
parent32b40e3ba32a22b425ad1e5d4e2a69654f9f5244 (diff)
🐞 fix(identify_gtp): try fix TSG-20998, 识别GTP排除DNS和QUIC服务端口v4.3.51
-rw-r--r--src/dealpkt/deal_gprs_tunnel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dealpkt/deal_gprs_tunnel.c b/src/dealpkt/deal_gprs_tunnel.c
index 17b67f5..ab03d78 100644
--- a/src/dealpkt/deal_gprs_tunnel.c
+++ b/src/dealpkt/deal_gprs_tunnel.c
@@ -222,6 +222,9 @@ int identify_gtp(const struct streaminfo *pstream,const char *payload, unsigned
source = ntohs(pstream->addr.ipv4->source);
}
+ // exclude well knonwn ports, DNS 53, QUIC 443,
+ if(source == 53 || dest == 53 || source == 443 || dest == 443)return 0;
+
if ((source == gtp_u) || (dest == gtp_u) || ((source == gtp_v0) || (dest == gtp_v0))) {
struct gtp_hdr *gtp = (struct gtp_hdr *) payload;
unsigned short gtp_version = (gtp->flags & 0xE0) >> 5;