-
- // TODO ugly workaround to find out whether LISP is carried by ip4 or 6
- // and needs to be fixed
- udp_hdr = (u8 *) vlib_buffer_get_current (b) - sizeof (udp_header_t);
- ip4 = (ip4_header_t *) (udp_hdr - sizeof (ip4_header_t));
- ip6 = (ip6_header_t *) (udp_hdr - sizeof (ip6_header_t));
-
- if ((ip4->ip_version_and_header_length & 0xF0) == 0x40)
- ip_hdr = (u8 *) ip4;
- else
- {
- u32 flags = clib_net_to_host_u32
- (ip6->ip_version_traffic_class_and_flow_label);
- if ((flags & 0xF0000000) == 0x60000000)
- ip_hdr = (u8 *) ip6;
- else
- {
- clib_warning ("internal error: cannot determine whether packet "
- "is ip4 or 6!");
- return;
- }
- }
-
- vlib_buffer_pull (b, sizeof (*mreq_hdr));
-
- nonce = MREQ_NONCE (mreq_hdr);
-