Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1664

Get wrong extern head by ip6_ext_header_find_t

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 24.02
    • 19.04
    • IP

      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); }

            mu.duojiao duojiao mu
            mu.duojiao duojiao mu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified