From 6164e97e0f2fddadea90fd24cd0ea4e629ba9b26 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 7 Feb 2019 10:31:08 -0800 Subject: [PATCH] tcp: fix fib_index for v6 ll packets Change-Id: Ie69bdb9860d61f2c599c0c80b0ea80dfdfe178bd Signed-off-by: Florin Coras --- src/vnet/tcp/tcp_input.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 7fd69258239..2aeec2f3846 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -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, -- 2.16.6