vcl: fix error state switch for VCL_STATE_LISTEN_NO_MQ sessions
When a VCL_STATE_LISTEN_NO_MQ session receives an ACCEPTED message, but then receives either a RESET or DISCONNECTED message from VPP before the session is unlistened, the listen session state is switched to DISCONNECT. The subsequent CLEANUP message handler attempts to send a reset reply message to VPP, but since the vpp_evt_q for the listen session is null, this leads to a crash. Type: fix Change-Id: Id7e88dcb16df3eda912b3f763730ec8d8973473a Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
This commit is contained in:
@ -513,9 +513,9 @@ vcl_session_reset_handler (vcl_worker_t * wrk,
|
||||
}
|
||||
|
||||
/* Caught a reset before actually accepting the session */
|
||||
if (session->session_state == VCL_STATE_LISTEN)
|
||||
if (session->session_state == VCL_STATE_LISTEN ||
|
||||
session->session_state == VCL_STATE_LISTEN_NO_MQ)
|
||||
{
|
||||
|
||||
if (!vcl_flag_accepted_session (session, reset_msg->handle,
|
||||
VCL_ACCEPTED_F_RESET))
|
||||
VDBG (0, "session was not accepted!");
|
||||
@ -706,7 +706,8 @@ vcl_session_disconnected_handler (vcl_worker_t * wrk,
|
||||
return 0;
|
||||
|
||||
/* Caught a disconnect before actually accepting the session */
|
||||
if (session->session_state == VCL_STATE_LISTEN)
|
||||
if (session->session_state == VCL_STATE_LISTEN ||
|
||||
session->session_state == VCL_STATE_LISTEN_NO_MQ)
|
||||
{
|
||||
if (!vcl_flag_accepted_session (session, msg->handle,
|
||||
VCL_ACCEPTED_F_CLOSED))
|
||||
|
Reference in New Issue
Block a user