🐞 fix(gtp计算头部): 计算GTP头部扩展时判断长度
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8...3.10)
|
||||||
|
|
||||||
set(lib_name MESA_jump_layer)
|
set(lib_name MESA_jump_layer)
|
||||||
|
|
||||||
|
|||||||
@@ -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")
|
set(MESA_SDK_PREFIX "/opt/MESA" CACHE STRING "MESA Framework Prefix")
|
||||||
|
|
||||||
|
|||||||
@@ -211,6 +211,11 @@ static int __mjl_gtp_calc_gtp_hdr_len(const struct gtp_hdr *gtph)
|
|||||||
return -1;
|
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)){
|
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
|
//todo, parse and get seq field
|
||||||
p_ext_hdr += 2; //seq field length is 2 bytes
|
p_ext_hdr += 2; //seq field length is 2 bytes
|
||||||
|
|||||||
@@ -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(${CMAKE_SOURCE_DIR}/inc)
|
||||||
include_directories(${MESA_SDK_PREFIX}/include)
|
include_directories(${MESA_SDK_PREFIX}/include)
|
||||||
|
|||||||
Reference in New Issue
Block a user