}
sw_if_index = adj->rewrite_header.sw_if_index;
- vec_validate (fm->feature_count_by_sw_if_index[arc_index], sw_if_index);
- feature_count = fm->feature_count_by_sw_if_index[arc_index][sw_if_index];
-
- if (feature_count > 0)
- adj->rewrite_header.flags |= VNET_REWRITE_HAS_FEATURES;
- else
- adj->rewrite_header.flags &= ~VNET_REWRITE_HAS_FEATURES;
+ if (vec_len(fm->feature_count_by_sw_if_index[arc_index]) > sw_if_index)
+ {
+ feature_count = fm->feature_count_by_sw_if_index[arc_index][sw_if_index];
+ if (feature_count > 0)
+ adj->rewrite_header.flags |= VNET_REWRITE_HAS_FEATURES;
+ }
return;
}
adj->ia_link = link_type;
adj->ia_nh_proto = nh_proto;
adj->rewrite_header.sw_if_index = sw_if_index;
- memset(&adj->sub_type.midchain.next_dpo, 0,
- sizeof(adj->sub_type.midchain.next_dpo));
adj_nbr_evaluate_feature (adj_get_index(adj));
return (adj);
*/
void
adj_nbr_update_rewrite_internal (ip_adjacency_t *adj,
- u32 adj_next_index,
+ ip_lookup_next_t adj_next_index,
u32 this_node,
u32 next_node,
u8 *rewrite)
if (ADJ_INDEX_INVALID != walk_ai)
{
walk_adj = adj_get(walk_ai);
- if (IP_ADJ_SYNC_WALK_ACTIVE & walk_adj->ia_flags)
+ if (ADJ_FLAG_SYNC_WALK_ACTIVE & walk_adj->ia_flags)
{
do_walk = 0;
}
/*
* Prevent re-entrant walk of the same adj
*/
- walk_adj->ia_flags |= IP_ADJ_SYNC_WALK_ACTIVE;
+ walk_adj->ia_flags |= ADJ_FLAG_SYNC_WALK_ACTIVE;
do_walk = 1;
}
}
*/
if (do_walk)
{
- walk_adj->ia_flags &= ~IP_ADJ_SYNC_WALK_ACTIVE;
+ walk_adj->ia_flags &= ~ADJ_FLAG_SYNC_WALK_ACTIVE;
}
adj_unlock(adj_get_index(adj));
.function = adj_nbr_show,
};
-static ip46_type_t
-adj_proto_to_46 (fib_protocol_t proto)
-{
- switch (proto)
- {
- case FIB_PROTOCOL_IP4:
- return (IP46_TYPE_IP4);
- case FIB_PROTOCOL_IP6:
- return (IP46_TYPE_IP6);
- default:
- return (IP46_TYPE_IP4);
- }
- return (IP46_TYPE_IP4);
-}
-
u8*
format_adj_nbr_incomplete (u8* s, va_list *ap)
{
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_nbr,
.dv_mem_show = adj_mem_show,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
const static dpo_vft_t adj_nbr_incompl_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_nbr_incomplete,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
/**