vcl: revert allow reads after transport cleanup 77/43477/1
authorFlorin Coras <[email protected]>
Thu, 24 Jul 2025 18:27:16 +0000 (11:27 -0700)
committerFlorin Coras <[email protected]>
Thu, 24 Jul 2025 17:55:43 +0000 (13:55 -0400)
Type: fix
Fixes: 784410190eb96fa8dea9fa67a086aa0044fe9025

Change-Id: Iad0f083c4eceb9778f5dc8099c4a0da3fa230623
Signed-off-by: Florin Coras <[email protected]>
src/vcl/vppcom.c

index ffa29ba..9da68c1 100644 (file)
@@ -2129,12 +2129,9 @@ vppcom_session_read_internal (uint32_t session_handle, void *buf, int n,
       VDBG (0, "session %u[0x%llx] is not open! state 0x%x (%s)",
            s->session_index, s->vpp_handle, s->session_state,
            vcl_session_state_str (s->session_state));
-      rx_fifo = vcl_session_is_ct (s) ? s->ct_rx_fifo : s->rx_fifo;
-      /* If application closed, e.g., mt app, or no data return error */
-      if (s->session_state == VCL_STATE_CLOSED ||
-         (s->flags & VCL_SESSION_F_APP_CLOSING) ||
-         svm_fifo_is_empty_cons (rx_fifo))
-       return vcl_session_closed_error (s);
+      /* We can't be sure vpp did not unmap the segment, so if the
+       * session is detached just return an error */
+      return vcl_session_closed_error (s);
     }
 
   if (PREDICT_FALSE (s->flags & VCL_SESSION_F_RD_SHUTDOWN))