X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fsession_node.c;h=2c425abeaf3fe5dc9d2caee2bb3454c2a930beb1;hb=aea5f39b6448b6dc2bb823f6de704dbd6c4962f5;hp=1656e2eed0e3d8c9a0bb84492e325b45fa7d8d77;hpb=1553197f9a1a3258b6954adeb9536bbe0191683d;p=vpp.git diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 1656e2eed0e..2c425abeaf3 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -132,12 +132,16 @@ session_mq_disconnected_handler (void *data) int rv = 0; mp = (session_disconnected_msg_t *) data; - s = session_get_from_handle_if_valid (mp->handle); + if (!(s = session_get_from_handle_if_valid (mp->handle))) + { + clib_warning ("could not disconnect handle %llu", mp->handle); + return; + } app_wrk = app_worker_get (s->app_wrk_index); app = application_lookup (mp->client_index); - if (!(app_wrk && s && app->app_index == app_wrk->app_index)) + if (!(app_wrk && app && app->app_index == app_wrk->app_index)) { - clib_warning ("could not disconnect session: %llu app_wrk: %u", + clib_warning ("could not disconnect session: %llu app: %u", mp->handle, mp->client_index); return; } @@ -303,7 +307,10 @@ session_tx_fifo_chain_tail (vlib_main_t * vm, session_tx_context_t * ctx, hdr->data_offset += n_bytes_read; if (hdr->data_offset == hdr->data_length) - svm_fifo_dequeue_drop (f, hdr->data_length); + { + u32 offset = hdr->data_length + SESSION_CONN_HDR_LEN; + svm_fifo_dequeue_drop (f, offset); + } } else n_bytes_read = svm_fifo_dequeue_nowait (ctx->s->server_tx_fifo,