tcp: fix tcp_do_fastretransmits failure. 66/20066/7
authorGuoao Sun <guoao.sun@intel.com>
Tue, 11 Jun 2019 14:07:21 +0000 (22:07 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 13 Jun 2019 15:41:20 +0000 (15:41 +0000)
Type: fix

vpp would fail 'tcp_in_fastrecovery (tc)' if tcp_connection_get returns 0.

Change-Id: I512cba5234b3777f1737bec9451940e7e7975f15
Signed-off-by: Guoao Sun <guoao.sun@intel.com>
src/vnet/tcp/tcp_input.c

index e843edb..304f725 100644 (file)
@@ -1336,6 +1336,8 @@ tcp_do_fastretransmits (tcp_worker_ctx_t * wrk)
   for (i = 0; i < vec_len (ongoing_fast_rxt); i++)
     {
       tc = tcp_connection_get (ongoing_fast_rxt[i], thread_index);
+      if (!tc)
+       continue;
       if (!tcp_in_fastrecovery (tc))
        {
          tc->flags &= ~TCP_CONN_FRXT_PENDING;