return (clib_host_to_net_u32 (vtcfl));
}
-static_always_inline bool
-ip4_map_ip6_lookup_bypass (vlib_buffer_t * p0, ip4_header_t * ip)
-{
-#ifdef MAP_SKIP_IP6_LOOKUP
- if (FIB_NODE_INDEX_INVALID != pre_resolved[FIB_PROTOCOL_IP6].fei)
- {
- vnet_buffer (p0)->ip.adj_index[VLIB_TX] =
- pre_resolved[FIB_PROTOCOL_IP6].dpo.dpoi_index;
- return (true);
- }
-#endif
- return (false);
-}
-
/*
* ip4_map_ttl
*/
*error = ttl <= 0 ? IP4_ERROR_TIME_EXPIRED : *error;
/* Verify checksum. */
- ASSERT (ip->checksum == ip4_header_checksum (ip));
+ ASSERT (ip4_header_checksum_is_valid (ip));
}
static u32
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = mm->domain_counters;
u32 thread_index = vm->thread_index;
+ u32 *buffer0 = 0;
while (n_left_from > 0)
{
ip6_header_t *ip6h0;
u32 next0 = IP4_MAP_NEXT_IP6_LOOKUP;
u32 map_domain_index0 = ~0;
- u32 *buffer0 = 0;
bool free_original_buffer0 = false;
u32 *frag_from0, frag_left0;
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
+ vec_free (buffer0);
return frame->n_vectors;
}
-static char *map_error_strings[] = {
-#define _(sym,string) string,
- foreach_map_error
-#undef _
-};
-
-
-/* *INDENT-OFF* */
VNET_FEATURE_INIT (ip4_map_feature, static) =
{
.arc_name = "ip4-unicast",
.type = VLIB_NODE_TYPE_INTERNAL,
.n_errors = MAP_N_ERROR,
- .error_strings = map_error_strings,
+ .error_counters = map_error_counters,
.n_next_nodes = IP4_MAP_N_NEXT,
.next_nodes = {
[IP4_MAP_NEXT_DROP] = "error-drop",
},
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON