aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-09-13 16:22:27 +0200
committerMatus Fabian <matfabia@cisco.com>2024-09-13 16:22:27 +0200
commit6fbe913e45ff252f5d6497eb81cdcf139afc0d5d (patch)
tree40b460344ea1f2a9319c2f5636bed7477afa1882 /src/plugins
parent9a3f387c3010e6beecb14bac595cad306cc8e661 (diff)
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 <matfabia@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/hs_apps/proxy.c7
1 files changed, 7 insertions, 0 deletions
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;