diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-08-10 10:25:34 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2025-08-11 10:09:24 +0200 |
commit | 2fd016776bca60e0a2bff69a9f130e4c3415bb4c (patch) | |
tree | e419d213846d3206ae4c0ebbb1cb8d0ebfa25491 /src/ipcpd/unicast/routing.h | |
parent | 10f70a0ab27c8b80b1dcb501147d64a851e7ad06 (diff) | |
download | ouroboros-2fd016776bca60e0a2bff69a9f130e4c3415bb4c.tar.gz ouroboros-2fd016776bca60e0a2bff69a9f130e4c3415bb4c.zip |
ipcpd: Fix shutdown of link-state routing
The link_state component tried to unregister from the notifier while
it had threads running.
The deadlock happens when notifier_event had a rdlock trying to delete
a neighbour, while notifier_unreg tries to take the write lock. And
the delete can't complete in the notifier.
https://tree.taiga.io/project/dstaesse-ouroboros/us/113
We need to make sure that all threads are stopped before unregistering
from the notifier.
Updated link_state to use the start/stop() paradigm and not
create/cancel threads within init/fini().
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/unicast/routing.h')
-rw-r--r-- | src/ipcpd/unicast/routing.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ipcpd/unicast/routing.h b/src/ipcpd/unicast/routing.h index d5d833ae..9ac8a547 100644 --- a/src/ipcpd/unicast/routing.h +++ b/src/ipcpd/unicast/routing.h @@ -34,6 +34,10 @@ int routing_init(enum pol_routing pr); void routing_fini(void); +int routing_start(void); + +void routing_stop(void); + struct routing_i * routing_i_create(struct pff * pff); void routing_i_destroy(struct routing_i * instance); |