send_lsm was being called from the event handler as well as from
lsupdate. The first one was not being locked properly.
Signed-off-by: Sander Vrijders <sander.vrijders@xxxxxxxx>
---
src/ipcpd/normal/pol/link_state.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/ipcpd/normal/pol/link_state.c
b/src/ipcpd/normal/pol/link_state.c
index 8db1a9c..e8677f0 100644
--- a/src/ipcpd/normal/pol/link_state.c
+++ b/src/ipcpd/normal/pol/link_state.c
@@ -795,7 +795,9 @@ static void handle_event(void * self,
if (lsdb_add_link(ipcpi.dt_addr, c->conn_info.addr, 0, &qs))
log_dbg("Failed to add new adjacency to LSDB.");
+ pthread_rwlock_rdlock(&ls.db_lock);
send_lsm(ipcpi.dt_addr, c->conn_info.addr, 0);
+ pthread_rwlock_unlock(&ls.db_lock);
break;
case NOTIFY_DT_CONN_DEL:
--
2.19.1