fix jump greedy for ipv6; fix compile warnning

This commit is contained in:
lijia
2024-04-18 15:41:55 +08:00
parent 71a6040f8a
commit 10330f034e
4 changed files with 26 additions and 9 deletions

View File

@@ -5,7 +5,8 @@ include_directories(${MESA_SDK_PREFIX}/include)
include_directories(${MESA_SDK_PREFIX}/include/MESA)
add_definitions(-D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
# add_definitions(-D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_definitions(-D_DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_definitions(-fPIC -std=c++11)
LINK_DIRECTORIES(/opt/MESA/lib)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src)

View File

@@ -143,7 +143,7 @@ static int jump_check_udp_pkt(const struct udphdr *uhdr, unsigned short expect_u
return 0;
}
static int jump_check_vlan_pkt(const void *vlan_hdr, unsigned int expect_vlan_hex_data)
int jump_check_vlan_pkt(const void *vlan_hdr, unsigned int expect_vlan_hex_data)
{
if(memcmp(vlan_hdr, &expect_vlan_hex_data, sizeof(int)) != 0){
printf("\033[1;31;40mMESA_net_jump_to_layer(): vlan header error!\033[0m\n");