+ /*
+ * a this point 'ctx' has the DPO the path contributed, plus
+ * any labels from path extensions.
+ * check if there are any interpose sources that want to contribute
+ */
+ if (n_nhs < vec_len(ctx->next_hops))
+ {
+ /*
+ * the path contributed a new choice.
+ */
+ const fib_entry_src_vft_t *vft;
+
+ /*
+ * roll up the sources that are interposes
+ */
+ i32 index;
+
+ for (index = ctx->end_source_index;
+ index >= ctx->start_source_index;
+ index--)
+ {
+ const dpo_id_t *interposer;
+
+ esrc = &ctx->fib_entry->fe_srcs[index];
+ vft = fib_entry_src_get_vft(esrc);
+
+ if (!(esrc->fes_flags & FIB_ENTRY_SRC_FLAG_CONTRIBUTING) ||
+ !(esrc->fes_entry_flags & FIB_ENTRY_FLAG_INTERPOSE))
+ continue;
+
+ ASSERT(vft->fesv_contribute_interpose);
+ interposer = vft->fesv_contribute_interpose(esrc, ctx->fib_entry);
+
+ if (NULL != interposer)
+ {
+ dpo_id_t clone = DPO_INVALID;
+
+ dpo_mk_interpose(interposer,
+ &ctx->next_hops[n_nhs].path_dpo,
+ &clone);
+
+ dpo_copy(&ctx->next_hops[n_nhs].path_dpo, &clone);
+ dpo_reset(&clone);
+ }
+ }
+ }
+