fib_path_attached_next_hop_set(path);
break;
case FIB_PATH_TYPE_ATTACHED:
+ {
+ dpo_id_t tmp = DPO_INVALID;
+
/*
* path->attached.fp_interface
*/
{
path->fp_oper_flags &= ~FIB_PATH_OPER_FLAG_RESOLVED;
}
- dpo_set(&path->fp_dpo,
+ dpo_set(&tmp,
DPO_ADJACENCY,
path->fp_nh_proto,
fib_path_attached_get_adj(path,
dpo_proto_to_link(path->fp_nh_proto)));
+ /*
+ * re-fetch after possible mem realloc
+ */
+ path = fib_path_get(path_index);
+ dpo_copy(&path->fp_dpo, &tmp);
+
/*
* become a child of the adjacency so we receive updates
* when the interface state changes
path->fp_sibling = adj_child_add(path->fp_dpo.dpoi_index,
FIB_NODE_TYPE_PATH,
fib_path_get_index(path));
+ dpo_reset(&tmp);
break;
+ }
case FIB_PATH_TYPE_RECURSIVE:
{
/*