From feb08c9c40df19c31f2fc640387b922e4c5f40ec Mon Sep 17 00:00:00 2001 From: qinyang Date: Mon, 29 May 2023 02:12:19 -0700 Subject: vcl: fix crash issue when connect an IP that VPP can't resolve Type: fix Change-Id: Id0e56906da7cee7be955e87935b073fdd04c78e7 Signed-off-by: qinyang --- src/vcl/vppcom.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 3b265d29ab8..94a49618099 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -3034,6 +3034,7 @@ vcl_epoll_wait_handle_mq_event (vcl_worker_t * wrk, session_event_t * e, u64 session_evt_data = ~0; vcl_session_t *s; u8 add_event = 0; + svm_fifo_t *txf; switch (e->event_type) { @@ -3099,9 +3100,11 @@ vcl_epoll_wait_handle_mq_event (vcl_worker_t * wrk, session_event_t * e, if (!(EPOLLOUT & session_events)) break; /* We didn't have a fifo when the event was added */ - svm_fifo_add_want_deq_ntf ( - (vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo), - SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL); + txf = vcl_session_is_ct (s) ? s->ct_tx_fifo : s->tx_fifo; + if (txf) + { + svm_fifo_add_want_deq_ntf (txf, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL); + } add_event = 1; events[*num_ev].events = EPOLLOUT; session_evt_data = s->vep.ev.data.u64; -- cgit 1.2.3-korg