return (fib_entry);
}
-static void
+static fib_entry_t*
fib_entry_post_flag_update_actions (fib_entry_t *fib_entry,
fib_source_t source,
fib_entry_flag_t old_flags)
{
+ fib_node_index_t fei;
+
+ /*
+ * save the index so we can recover from pool reallocs
+ */
+ fei = fib_entry_get_index(fib_entry);
+
/*
* handle changes to attached export for import entries
*/
* no change. nothing to do.
*/
+ /*
+ * reload the entry address post possible pool realloc
+ */
+ fib_entry = fib_entry_get(fei);
+
/*
* handle changes to attached export for export entries
*/
// FIXME
}
// else FIXME
+
+ return (fib_entry);
}
static void
fib_source_t source,
fib_entry_flag_t old_flags)
{
- fib_entry_post_flag_update_actions(fib_entry, source, old_flags);
+ fib_entry = fib_entry_post_flag_update_actions(fib_entry,
+ source,
+ old_flags);
fib_entry_src_action_installed(fib_entry, source);
}
* no more sources left. this entry is toast.
*/
fib_entry_src_action_uninstall(fib_entry);
- fib_entry_post_flag_update_actions(fib_entry, source, bflags);
+ fib_entry = fib_entry_post_flag_update_actions(fib_entry,
+ source,
+ bflags);
return (FIB_ENTRY_SRC_FLAG_NONE);
}
* no more sources left. this entry is toast.
*/
fib_entry_src_action_uninstall(fib_entry);
- fib_entry_post_flag_update_actions(fib_entry, source, bflags);
+ fib_entry = fib_entry_post_flag_update_actions(fib_entry,
+ source,
+ bflags);
return (FIB_ENTRY_SRC_FLAG_NONE);
}
{
fib_entry_src_collect_forwarding_ctx_t *ctx;
fib_path_ext_t *path_ext;
+ int have_path_ext;
ctx = arg;
/*
* get the matching path-extension for the path being visited.
*/
+ have_path_ext = 0;
vec_foreach(path_ext, ctx->esrc->fes_path_exts)
{
if (path_ext->fpe_path_index == path_index)
+ {
+ have_path_ext = 1;
break;
+ }
}
- if (NULL != path_ext &&
- path_ext->fpe_path_index == path_index &&
+ if (have_path_ext &&
fib_entry_src_valid_out_label(path_ext->fpe_label_stack[0]))
{
/*