tcp: correct tcp connection lookup condition 17/23017/3
authorRyujiro Shibuya <ryujiro.shibuya@owmobility.com>
Mon, 28 Oct 2019 00:32:12 +0000 (00:32 +0000)
committerRyujiro Shibuya <ryujiro.shibuya@owmobility.com>
Tue, 29 Oct 2019 02:21:15 +0000 (02:21 +0000)
Type: fix

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: Ibdbac568d5f765e6b5c959cab5e32dc33335064d

src/vnet/tcp/tcp_input.c

index 744c5bc..8376946 100755 (executable)
@@ -2718,14 +2718,17 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
 
       if (CLIB_DEBUG)
        {
-         tcp_connection_t *tmp;
-         tmp = tcp_lookup_connection (tc0->c_fib_index, b0, thread_index,
-                                      is_ip4);
-         if (tmp->state != tc0->state)
+         if (!(tc0->connection.flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
            {
-             if (tc0->state != TCP_STATE_CLOSED)
-               clib_warning ("state changed");
-             goto drop;
+             tcp_connection_t *tmp;
+             tmp = tcp_lookup_connection (tc0->c_fib_index, b0, thread_index,
+                                          is_ip4);
+             if (tmp->state != tc0->state)
+               {
+                 if (tc0->state != TCP_STATE_CLOSED)
+                   clib_warning ("state changed");
+                 goto drop;
+               }
            }
        }