-static void
-bier_fmask_resolve (bier_fmask_t *bfm)
-{
- if (bfm->bfm_flags & BIER_FMASK_FLAG_DISP)
- {
- bier_disp_table_lock(bfm->bfm_disp);
- }
- else
- {
- /*
- * source a recursive route through which we resolve.
- */
- fib_prefix_t pfx = {
- .fp_addr = bfm->bfm_id.bfmi_nh,
- .fp_proto = (ip46_address_is_ip4(&(bfm->bfm_id.bfmi_nh)) ?
- FIB_PROTOCOL_IP4 :
- FIB_PROTOCOL_IP6),
- .fp_len = (ip46_address_is_ip4(&(bfm->bfm_id.bfmi_nh)) ? 32 : 128),
- };
-
- bfm->bfm_fei = fib_table_entry_special_add(0, // default table
- &pfx,
- FIB_SOURCE_RR,
- FIB_ENTRY_FLAG_NONE);
-
- bfm->bfm_sibling = fib_entry_child_add(bfm->bfm_fei,
- FIB_NODE_TYPE_BIER_FMASK,
- bier_fmask_get_index(bfm));
- }
-
- bier_fmask_stack(bfm);
-}
-
-static void
-bier_fmask_unresolve (bier_fmask_t *bfm)
-{
- if (bfm->bfm_flags & BIER_FMASK_FLAG_DISP)
- {
- bier_disp_table_unlock(bfm->bfm_disp);
- }
- else
- {
- /*
- * un-source the recursive route through which we resolve.
- */
- fib_prefix_t pfx = {
- .fp_addr = bfm->bfm_id.bfmi_nh,
- .fp_proto = (ip46_address_is_ip4(&(bfm->bfm_id.bfmi_nh)) ?
- FIB_PROTOCOL_IP4 :
- FIB_PROTOCOL_IP6),
- .fp_len = (ip46_address_is_ip4(&(bfm->bfm_id.bfmi_nh)) ? 32 : 128),
- };
-
- fib_entry_child_remove(bfm->bfm_fei, bfm->bfm_sibling);
- fib_table_entry_special_remove(0, &pfx, FIB_SOURCE_RR);
- }
- dpo_reset(&bfm->bfm_dpo);
-}
-