vpp icon indicating copy to clipboard operation
vpp copied to clipboard

[VPP-1664] Get wrong extern head by ip6_ext_header_find_t

Open vvalderrv opened this issue 10 months ago • 1 comments

Description

u8 buffer[100] = {0};

u8 *l6_header = 0;

ip6_ext_header_t *ext_head;

ip6_header_t *ip6 = (ip6_header_t *)buffer;

/* Fill in ip6 header fields */

ip6->ip_version_traffic_class_and_flow_label =

clib_host_to_net_u32 (0x6 << 28);

ip6->payload_length = clib_host_to_net_u16 (100);

ip6->protocol = IP_PROTOCOL_TCP;

ip6->hop_limit = 255;

/below is data section ,some bytes(red) just like a ext head/

l6_header = (u8*)(ip6+1);

ext_head = (ip6_ext_header_t *)l6_header;

ext_head->next_hdr = IP_PROTOCOL_IPV6_FRAGMENTATION;

ext_head->n_data_u64s = 2;

ext_head = ip6_ext_authhdr_header((ext_head));

ext_head->next_hdr = 59;/no next head/


ip6_frag_hdr_t *frag_hdr = NULL;

ip6_ext_header_t * prev0 = NULL;

ip6_ext_header_find_t (ip6, prev0, frag_hdr, IP_PROTOCOL_IPV6_FRAGMENTATION);

if(frag_hdr)

{ clib_warning(" ERROR find frag head in tcp pkg !\n"); assert(0); }

Assignee

duojiao mu

Reporter

duojiao mu

Comments

No comments.

Original issue: https://jira.fd.io/browse/VPP-1664

vvalderrv avatar Feb 02 '25 04:02 vvalderrv