From 6fbe913e45ff252f5d6497eb81cdcf139afc0d5d Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Fri, 13 Sep 2024 16:22:27 +0200 Subject: hsa: fix proxy ao connect Make sure that proxy server doesn't try to open connection to the target multiple times. When client is uploading huge amount of data it might happen that proxy_rx_callback is called again before connection to the target is established. Type: fix Change-Id: I4d272d37bc545f6f8790a115c8d26bcf3ea84f22 Signed-off-by: Matus Fabian --- src/plugins/hs_apps/proxy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/hs_apps/proxy.c b/src/plugins/hs_apps/proxy.c index 20110544c04..c7e7b2a653c 100644 --- a/src/plugins/hs_apps/proxy.c +++ b/src/plugins/hs_apps/proxy.c @@ -368,6 +368,13 @@ proxy_rx_callback (session_t * s) u32 max_dequeue, ps_index; int actual_transfer __attribute__ ((unused)); + /* maybe we were already here */ + if (ps->active_open_establishing) + { + clib_spinlock_unlock_if_init (&pm->sessions_lock); + return 0; + } + rx_fifo = s->rx_fifo; tx_fifo = s->tx_fifo; -- cgit 1.2.3-korg