From 56e38df2af996da460bb89aed99ec31571ca5255 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 2 Dec 2020 14:48:03 +0100 Subject: ipcpd: Don't update for deallocated flows The dt component bypasses the flow allocator on the receiver side, and may try to update congestion context when the flow has already been deallocated by the receiver. I will fix this bypass and always pass through the flow allocator sometime soon; for now, I added a check in the flow allocator call to avoid the SEGV. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/fa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ipcpd/unicast/fa.c b/src/ipcpd/unicast/fa.c index 8f268a9d..b2eed7e5 100644 --- a/src/ipcpd/unicast/fa.c +++ b/src/ipcpd/unicast/fa.c @@ -627,6 +627,11 @@ void fa_ecn_update(int eid, pthread_rwlock_wrlock(&fa.flows_lock); + if (flow->r_eid == -1) { + pthread_rwlock_unlock(&fa.flows_lock); + return; + } + update = ca_ctx_update_rcv(flow->ctx, len, ecn, &ece); pthread_rwlock_unlock(&fa.flows_lock); -- cgit v1.2.3