bugfix: TSG-19996 parse the packet as GTP-U when source port or dest port is 2152.
This commit is contained in:
@@ -863,17 +863,19 @@ static inline const char *parse_udp(struct packet *handler, const char *data, ui
|
||||
struct udphdr *hdr = (struct udphdr *)data;
|
||||
SET_LAYER(handler, layer, LAYER_TYPE_UDP, sizeof(struct udphdr), data, len);
|
||||
|
||||
switch (ntohs(hdr->uh_dport))
|
||||
// VXLAN_DPORT 4789
|
||||
if (ntohs(hdr->uh_dport) == 4789)
|
||||
{
|
||||
// VXLAN_DPORT
|
||||
case 4789:
|
||||
return parse_vxlan(handler, layer->pld_ptr, layer->pld_len);
|
||||
// GTP1U_PORT
|
||||
case 2152:
|
||||
return parse_gtpv1_u(handler, layer->pld_ptr, layer->pld_len);
|
||||
default:
|
||||
return layer->pld_ptr;
|
||||
}
|
||||
|
||||
// GTP1U_PORT 2152
|
||||
if (ntohs(hdr->uh_dport) == 2152 || ntohs(hdr->uh_sport) == 2152)
|
||||
{
|
||||
return parse_gtpv1_u(handler, layer->pld_ptr, layer->pld_len);
|
||||
}
|
||||
|
||||
return layer->pld_ptr;
|
||||
}
|
||||
|
||||
static inline const char *parse_tcp(struct packet *handler, const char *data, uint16_t len)
|
||||
|
||||
Reference in New Issue
Block a user