Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71a6040f8a | ||
|
|
0c02227c58 | ||
|
|
320851f683 |
@@ -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,15 @@ static int __mjl_gtp_calc_gtp_hdr_len(const struct gtp_hdr *gtph)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(gtph->msg_type != 0xFF){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ntohs(gtph->len) > 1460 || ntohs(gtph->len) < 40)
|
||||||
|
{
|
||||||
|
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
|
||||||
@@ -384,6 +393,10 @@ static int __mjl_parse_l2tpv2_hdr(const struct l2tp_hdr_v2 *pl2tphdrv2, struct l
|
|||||||
|
|
||||||
if(pl2tphdrv2->offset_present){
|
if(pl2tphdrv2->offset_present){
|
||||||
offset_size = ntohs(*((unsigned short *)ptr));
|
offset_size = ntohs(*((unsigned short *)ptr));
|
||||||
|
if(offset_size > 1460)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
ptr += sizeof(short); /* 2 byte fix len offset size */
|
ptr += sizeof(short); /* 2 byte fix len offset size */
|
||||||
ptr += offset_size; /* var bytes offset value length */
|
ptr += offset_size; /* var bytes offset value length */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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