session: use session index instead of fifo for evt
Avoids derefrencing fifo pointers whose segments could have been
unmapped.
Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c
index 7c88888..85a6fed 100644
--- a/src/vnet/session/application_worker.c
+++ b/src/vnet/session/application_worker.c
@@ -562,7 +562,7 @@
ASSERT (!svm_msg_q_msg_is_invalid (&msg));
evt = (session_event_t *) svm_msg_q_msg_data (mq, &msg);
- evt->fifo = s->rx_fifo;
+ evt->session_index = s->rx_fifo->client_session_index;
evt->event_type = SESSION_IO_EVT_RX;
(void) svm_fifo_set_event (s->rx_fifo);
@@ -599,7 +599,7 @@
evt = (session_event_t *) svm_msg_q_msg_data (mq, &msg);
evt->event_type = SESSION_IO_EVT_TX;
- evt->fifo = s->tx_fifo;
+ evt->session_index = s->tx_fifo->client_session_index;
return app_enqueue_evt (mq, &msg, lock);
}