From c5e3a41bbeedcc7486f43edfbc85b63a95865773 Mon Sep 17 00:00:00 2001 From: Arthur de Kerhor Date: Tue, 1 Jun 2021 11:42:20 +0200 Subject: fib: fix flags updates when adding routes with a udp encap path When adding a route via a udp encap instance, FIB_ENTRY_FLAG_IMPORT should not be set. In particular, fib_route_attached_cross_table should always return false for such paths. Modified test_udp_encap to leverage the bug that needed to be fixed. Type: fix Signed-off-by: Arthur de Kerhor Change-Id: Iaa9489e96d1cff09751f92c62caf7999d924fd7f --- src/vnet/fib/fib_entry_src.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet') diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c index 503473a6099..12857347a9f 100644 --- a/src/vnet/fib/fib_entry_src.c +++ b/src/vnet/fib/fib_entry_src.c @@ -1504,7 +1504,7 @@ fib_route_attached_cross_table (const fib_entry_t *fib_entry, */ if (ip46_address_is_zero(&rpath->frp_addr) && (~0 != rpath->frp_sw_if_index) && - !(rpath->frp_flags & FIB_ROUTE_PATH_DVR) && + !(rpath->frp_flags & (FIB_ROUTE_PATH_DVR | FIB_ROUTE_PATH_UDP_ENCAP)) && (fib_entry->fe_fib_index != fib_table_get_index_for_sw_if_index(fib_entry_get_proto(fib_entry), rpath->frp_sw_if_index))) -- cgit 1.2.3-korg