ple->ge = yang_dnode_get_uint8(args->dnode, NULL);
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
ple->le = yang_dnode_get_uint8(args->dnode, NULL);
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
ple->ge = 0;
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
ple->le = 0;
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
return NB_OK;
}
+static void
+lib_prefix_list_entry_apply_finish(struct nb_cb_apply_finish_args *args)
+{
+ struct prefix_list_entry *ple;
+
+ ple = nb_running_get_entry(args->dnode, NULL, true);
+
+ /*
+ * Finish prefix entry update procedure. The procedure is started in
+ * children callbacks. `prefix_list_entry_update_start` can be called
+ * multiple times if multiple children are modified, but it is actually
+ * executed only once because of the protection by `ple->installed`.
+ */
+ prefix_list_entry_update_finish(ple);
+}
+
/*
* XPath: /frr-filter:lib/prefix-list/entry/action
*/
else
ple->type = PREFIX_DENY;
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
prefix_copy(&ple->prefix, &p);
}
-
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
memset(&ple->prefix, 0, sizeof(ple->prefix));
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
break;
}
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
ple->any = false;
- /* Finish prefix entry update procedure. */
- prefix_list_entry_update_finish(ple);
-
return NB_OK;
}
.cbs = {
.create = lib_prefix_list_entry_create,
.destroy = lib_prefix_list_entry_destroy,
+ .apply_finish = lib_prefix_list_entry_apply_finish,
.cli_cmp = prefix_list_cmp,
.cli_show = prefix_list_show,
}