- u32 bi0, fib_index0;
- vlib_buffer_t *b0;
- u32 next0 = UDP_INPUT_NEXT_DROP;
- u32 error0 = UDP_ERROR_ENQUEUED;
- udp_header_t *udp0;
- ip4_header_t *ip40;
- ip6_header_t *ip60;
- u8 *data0;
- session_t *s0;
- udp_connection_t *uc0, *child0, *new_uc0;
- transport_connection_t *tc0;
- int wrote0;
- void *rmt_addr, *lcl_addr;
- session_dgram_hdr_t hdr0;
-
- /* speculatively enqueue b0 to the current next frame */
- bi0 = from[0];
- to_next[0] = bi0;
- from += 1;
- to_next += 1;
- n_left_from -= 1;
- n_left_to_next -= 1;
-
- b0 = vlib_get_buffer (vm, bi0);
-
- /* udp_local hands us a pointer to the udp data */
- data0 = vlib_buffer_get_current (b0);
- udp0 = (udp_header_t *) (data0 - sizeof (*udp0));
- fib_index0 = vnet_buffer (b0)->ip.fib_index;
-
- if (is_ip4)
- {
- /* TODO: must fix once udp_local does ip options correctly */
- ip40 = (ip4_header_t *) (((u8 *) udp0) - sizeof (*ip40));
- s0 = session_lookup_safe4 (fib_index0, &ip40->dst_address,
- &ip40->src_address, udp0->dst_port,
- udp0->src_port, TRANSPORT_PROTO_UDP);
- lcl_addr = &ip40->dst_address;
- rmt_addr = &ip40->src_address;
+ /* TODO: must fix once udp_local does ip options correctly */
+ ip40 = (ip4_header_t *) (((u8 *) udp0) - sizeof (*ip40));
+ s0 = session_lookup_safe4 (fib_index0, &ip40->dst_address,
+ &ip40->src_address, udp0->dst_port,
+ udp0->src_port, TRANSPORT_PROTO_UDP);
+ lcl_addr = &ip40->dst_address;
+ rmt_addr = &ip40->src_address;