tcp: fix fib_index for v6 ll packets 07/17407/2
authorFlorin Coras <fcoras@cisco.com>
Thu, 7 Feb 2019 18:31:08 +0000 (10:31 -0800)
committerDamjan Marion <dmarion@me.com>
Thu, 7 Feb 2019 22:28:53 +0000 (22:28 +0000)
Change-Id: Ie69bdb9860d61f2c599c0c80b0ea80dfdfe178bd
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/tcp/tcp_input.c

index 7fd6925..2aeec2f 100644 (file)
@@ -3368,6 +3368,13 @@ tcp_input_lookup_buffer (vlib_buffer_t * b, u8 thread_index, u32 * error,
          *error = TCP_ERROR_LENGTH;
          return 0;
        }
+      if (PREDICT_FALSE
+         (ip6_address_is_link_local_unicast (&ip6->dst_address)))
+       {
+         ip4_main_t *im = &ip4_main;
+         fib_index = vec_elt (im->fib_index_by_sw_if_index,
+                              vnet_buffer (b)->sw_if_index[VLIB_RX]);
+       }
 
       tc = session_lookup_connection_wt6 (fib_index, &ip6->dst_address,
                                          &ip6->src_address, tcp->dst_port,