bugfix: GTP-U only header no payload
This commit is contained in:
@@ -819,6 +819,19 @@ static inline const char *parse_gtp_u(struct packet *pkt, const char *data, uint
|
||||
return data;
|
||||
}
|
||||
|
||||
if (hdr_len == len)
|
||||
{
|
||||
// only GTP-U header, no payload
|
||||
struct layer_private *layer = get_free_layer(pkt);
|
||||
if (unlikely(layer == NULL))
|
||||
{
|
||||
return data;
|
||||
}
|
||||
SET_LAYER(pkt, layer, LAYER_PROTO_GTP_U, hdr_len, data, len, 0);
|
||||
return layer->pld_ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t next_proto = (((const uint8_t *)(data + hdr_len))[0]) >> 4;
|
||||
if (next_proto != 4 && next_proto != 6)
|
||||
{
|
||||
@@ -844,6 +857,7 @@ static inline const char *parse_gtp_u(struct packet *pkt, const char *data, uint
|
||||
return layer->pld_ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char *parse_gtp_c(struct packet *pkt, const char *data, uint16_t len)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user