Introduce a new flag NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING that allows the creation of overlapping checkpoints. Before, and by default, checkpoints that reference a same device conflict, and creating such a checkpoint failed.
Now, allow this. But during rollback automatically destroy all overlapping checkpoints that were created after the checkpoint that is about to rollback.
With this, you can create a series of checkpoints, and rollback them individually. With the restriction, that if you once rolled back to an older checkpoint, you no longer can roll"forward" to a younger one.
What this implies and what is new here, is that the checkpoint might be automatically destroyed by NetworkManager before the timeout expires. When the user later would try to manually destroy/rollback such a checkpoint, it would fail because the checkpoint no longer exists.
5c283356a checkpoint: allow overlapping checkpoints
libnm-core/nm-dbus-interface.h | 13 ++++++++++
src/nm-checkpoint-manager.c | 56 ++++++++++++++++++++++--------------------
src/nm-checkpoint.c | 33 ++++++++++++++++++++++---
src/nm-checkpoint.h | 6 ++++-
4 files changed, 78 insertions(+), 30 deletions(-)