diff options
author | 2023-05-29 02:12:19 -0700 | |
---|---|---|
committer | 2023-05-29 02:23:09 -0700 | |
commit | feb08c9c40df19c31f2fc640387b922e4c5f40ec (patch) | |
tree | 8ef5806c4262bc09af16153e47c4a81670a662d9 /src | |
parent | 6206eaba4eb5e8c312ac1c4b2023180e8cfd6c07 (diff) |
vcl: fix crash issue when connect an IP that VPP can't resolve
Type: fix
Change-Id: Id0e56906da7cee7be955e87935b073fdd04c78e7
Signed-off-by: qinyang <qiny@yusur.tech>
Diffstat (limited to 'src')
-rw-r--r-- | src/vcl/vppcom.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; |