🐞 fix(__mjl_gtp_calc_gtp_hdr_len): 修复长度计算超过包长的错误

This commit is contained in:
yangwei
2023-07-23 23:13:11 +08:00
parent 0c02227c58
commit 71a6040f8a

View File

@@ -211,7 +211,11 @@ static int __mjl_gtp_calc_gtp_hdr_len(const struct gtp_hdr *gtph)
return -1; return -1;
} }
if(gtph->len > 1460) if(gtph->msg_type != 0xFF){
return -1;
}
if(ntohs(gtph->len) > 1460 || ntohs(gtph->len) < 40)
{ {
return -1; return -1;
} }