diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2022-02-26 17:44:06 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2022-03-03 12:05:57 +0100 |
commit | 865515e2fe4651978f355613c5972dcdcfd92ddd (patch) | |
tree | 1b48b7a5ea35230b8259a892ee8290696528b659 /src/lib/frct.c | |
parent | eab2c79a66bbedc7548167e077740ef93002f961 (diff) | |
download | ouroboros-865515e2fe4651978f355613c5972dcdcfd92ddd.tar.gz ouroboros-865515e2fe4651978f355613c5972dcdcfd92ddd.zip |
lib: Fix lock reversal in timerwheel
There was a lock reversal in the timerwheel. There still is a thorough
revision needed of the locking in dev.c after the FRCP logic is
completed and tuned.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/frct.c')
-rw-r--r-- | src/lib/frct.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/lib/frct.c b/src/lib/frct.c index 2793f3c4..42ce2152 100644 --- a/src/lib/frct.c +++ b/src/lib/frct.c @@ -233,8 +233,6 @@ static void __send_frct_pkt(int fd, f = &ai.flows[fd]; - pthread_rwlock_rdlock(&ai.lock); - if (f->qs.cypher_s > 0 && crypt_encrypt(f, sdb) < 0) goto fail; @@ -247,12 +245,9 @@ static void __send_frct_pkt(int fd, shm_flow_set_notify(f->set, f->flow_id, FLOW_PKT); - pthread_rwlock_unlock(&ai.lock); - return; fail: - pthread_rwlock_unlock(&ai.lock); ipcp_sdb_release(sdb); return; } |