From 01c96dadca4247493730981b0884931620caddaa Mon Sep 17 00:00:00 2001 From: yangwei Date: Mon, 24 Jul 2023 11:48:39 +0800 Subject: 🐞 fix(ipv6_jump_to_layer): ipv6报文增加版本号判断 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MESA_jump_layer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MESA_jump_layer.cpp b/src/MESA_jump_layer.cpp index c24a4f0..608588b 100644 --- a/src/MESA_jump_layer.cpp +++ b/src/MESA_jump_layer.cpp @@ -806,7 +806,12 @@ static int ipv6_jump_to_layer(const char *raw_data, int raw_layer_type, int exp UINT8 *next_hdr_ptr = (UINT8 *)a_packet + sizeof(struct mesa_ip6_hdr); int skip_len = 0; int offset_to_ip6 = 0; - + + if(a_packet->ip6_flags[0]!= 0x60) + { + return -1; + } + if(raw_layer_type == expect_layer_type){ return 0; } -- cgit v1.2.3