summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/fa.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-06-26 13:42:58 +0200
committerSander Vrijders <sander@ouroboros.rocks>2021-06-28 15:29:23 +0200
commit9d2688340bea357e2c2206f3c69ea64c866cb2ad (patch)
treef677da48234c8d38178c0af29a7e680318d229ed /src/ipcpd/unicast/fa.c
parent18b0de19830e7286ad5eecbba23013e835739cdc (diff)
downloadouroboros-9d2688340bea357e2c2206f3c69ea64c866cb2ad.tar.gz
ouroboros-9d2688340bea357e2c2206f3c69ea64c866cb2ad.zip
ipcpd: Fix unregistering fa and dt RIBs
These RIBs were not properly unregistered on shutdown. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/unicast/fa.c')
-rw-r--r--src/ipcpd/unicast/fa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/unicast/fa.c b/src/ipcpd/unicast/fa.c
index 428b5af7..de9ca83d 100644
--- a/src/ipcpd/unicast/fa.c
+++ b/src/ipcpd/unicast/fa.c
@@ -591,7 +591,6 @@ static void * fa_handle_packet(void * o)
int fa_init(void)
{
pthread_condattr_t cattr;
- char fastr[256];
if (pthread_rwlock_init(&fa.flows_lock, NULL))
goto fail_rwlock;
@@ -612,8 +611,7 @@ int fa_init(void)
list_head_init(&fa.cmds);
- sprintf(fastr, "%s", FA);
- if (rib_reg(fastr, &r_ops))
+ if (rib_reg(FA, &r_ops))
goto fail_rib_reg;
fa.eid = dt_reg_comp(&fa, &fa_post_packet, FA);
@@ -637,6 +635,8 @@ int fa_init(void)
void fa_fini(void)
{
+ rib_unreg(FA);
+
pthread_cond_destroy(&fa.cond);;
pthread_mutex_destroy(&fa.mtx);
pthread_rwlock_destroy(&fa.flows_lock);