调整解析GTP-U协议
This commit is contained in:
@@ -945,19 +945,20 @@ static inline const char *parse_udp(struct packet *handler, const char *data, ui
|
|||||||
struct udphdr *hdr = (struct udphdr *)data;
|
struct udphdr *hdr = (struct udphdr *)data;
|
||||||
SET_LAYER(handler, layer, LAYER_TYPE_UDP, sizeof(struct udphdr), data, len);
|
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)
|
||||||
{
|
{
|
||||||
// TESTED
|
|
||||||
// VXLAN_DPORT
|
|
||||||
case 4789:
|
|
||||||
return parse_vxlan(handler, layer->pld_ptr, layer->pld_len);
|
return parse_vxlan(handler, layer->pld_ptr, layer->pld_len);
|
||||||
// TESTED
|
|
||||||
// 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)
|
static inline const char *parse_tcp(struct packet *handler, const char *data, uint16_t len)
|
||||||
|
|||||||
Reference in New Issue
Block a user