diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-03-05 19:35:35 +0100 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-03-14 11:23:32 +0100 |
| commit | 03bcf516d67a72a6b019c0bcae7d088dcb701d8d (patch) | |
| tree | fd01b8ce94670b4c3cb16af68f3bbd709e42dccf /src/ipcpd/local/main.c | |
| parent | 369d1c90453be23270a30229cbf4f731e4080407 (diff) | |
| download | ouroboros-03bcf516d67a72a6b019c0bcae7d088dcb701d8d.tar.gz ouroboros-03bcf516d67a72a6b019c0bcae7d088dcb701d8d.zip | |
ipcpd: Fix rejected flow allocation on local
When the server rejects the flow, the local didn't send the flow_alloc
response back to the IRMd, causing the irmd and client to time out
instead of being notified of the failed allocation immediately.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/local/main.c')
| -rw-r--r-- | src/ipcpd/local/main.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index 377a7df3..2c867317 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -236,15 +236,6 @@ static int local_ipcp_flow_alloc_resp(int fd, return -1; } - if (response < 0) { - pthread_rwlock_wrlock(&local_data.lock); - if (local_data.in_out[fd] != -1) - local_data.in_out[local_data.in_out[fd]] = fd; - local_data.in_out[fd] = -1; - pthread_rwlock_unlock(&local_data.lock); - return 0; - } - pthread_rwlock_rdlock(&local_data.lock); out_fd = local_data.in_out[fd]; @@ -263,6 +254,12 @@ static int local_ipcp_flow_alloc_resp(int fd, return -1; } + if (response < 0) { + ipcp_flow_alloc_reply(out_fd, response, mpl, data); + log_info("Flow allocation rejected, fds (%d, %d).", out_fd, fd); + return 0; + } + fset_add(local_data.flows, fd); if (ipcp_flow_alloc_reply(out_fd, response, mpl, data) < 0) { |
