summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-12-02 14:48:03 +0100
committerSander Vrijders <sander@ouroboros.rocks>2020-12-02 19:23:15 +0100
commit56e38df2af996da460bb89aed99ec31571ca5255 (patch)
treeebb70edfb9d231d1e328e2a86afe59bdf7e16c41
parent0f2c87e5f52f9e88a202b851ade1e24bb2dc0985 (diff)
downloadouroboros-56e38df2af996da460bb89aed99ec31571ca5255.tar.gz
ouroboros-56e38df2af996da460bb89aed99ec31571ca5255.zip
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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
-rw-r--r--src/ipcpd/unicast/fa.c5
1 files changed, 5 insertions, 0 deletions
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);