network: refuse further requests when manager is in MANAGER_STOPPED

In that case, requests will never be processed anyway. But further more,
we cannot call link_ref() at that stage. Otherwise, we trigger assertion.
This commit is contained in:
Yu Watanabe
2024-11-03 09:14:36 +09:00
parent d980aee1e8
commit ef45f5c8d0
4 changed files with 26 additions and 0 deletions
+5
View File
@@ -948,6 +948,11 @@ void link_dirty(Link *link) {
assert(link);
assert(link->manager);
/* When the manager is in MANAGER_STOPPED, it is not necessary to update state files anymore, as they
* will be removed soon anyway. Moreover, we cannot call link_ref() in that case. */
if (link->manager->state == MANAGER_STOPPED)
return;
/* The serialized state in /run is no longer up-to-date. */
/* Also mark manager dirty as link is dirty */