bugfix: packet parser adds checks for packets with UDP port 2152 but not GTP-U
This commit is contained in:
@@ -831,12 +831,18 @@ static inline const char *parse_gtp_u(struct packet *pkt, const char *data, uint
|
||||
return data;
|
||||
}
|
||||
|
||||
uint8_t next_proto = (((const uint8_t *)(data + hdr_len))[0]) >> 4;
|
||||
if (next_proto != 4 && next_proto != 6)
|
||||
{
|
||||
// next_proto is not IPv4 or IPv6, this is not a normal GTP-U packet, fallback to UDP
|
||||
return data;
|
||||
}
|
||||
|
||||
struct raw_layer *layer = get_free_layer(pkt);
|
||||
if (unlikely(layer == NULL))
|
||||
{
|
||||
return data;
|
||||
}
|
||||
uint8_t next_proto = (((const uint8_t *)(data + hdr_len))[0]) >> 4;
|
||||
SET_LAYER(pkt, layer, LAYER_PROTO_GTP_U, hdr_len, data, len, 0);
|
||||
|
||||
switch (next_proto)
|
||||
|
||||
Reference in New Issue
Block a user