🐞 fix(gtp计算头部): 计算GTP头部扩展时判断长度

This commit is contained in:
yangwei
2023-07-23 11:10:15 +08:00
parent 6fb4738f19
commit 320851f683
4 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 2.8...3.10)
set(lib_name MESA_jump_layer)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8...3.10)
set(MESA_SDK_PREFIX "/opt/MESA" CACHE STRING "MESA Framework Prefix")

View File

@@ -211,6 +211,11 @@ static int __mjl_gtp_calc_gtp_hdr_len(const struct gtp_hdr *gtph)
return -1;
}
if(gtph->len > 1460)
{
return -1;
}
if(gtph->flags & (GTP_HDR_FLAG_SEQ_NUM | GTP_HDR_FLAG_N_PDU | GTP_HDR_FLAG_NEXT_EXT_HDR)){
//todo, parse and get seq field
p_ext_hdr += 2; //seq field length is 2 bytes

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/inc)
include_directories(${MESA_SDK_PREFIX}/include)