From caaa63322307b28bc8cf9796f642d9a068722ba5 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 13 Sep 2023 17:21:04 +0200 Subject: fib: log an error when destroying non-empty tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Destroying a non-empty fib table can lead to difficult to diagnose bugs, like dandling fib entries preventing entries to be inserting to the mtrie. Always log an error to help diagnose those issues. Type: improvement Change-Id: I2c771a80595035b440931b74cca4429af22161a2 Signed-off-by: Benoît Ganne --- src/vnet/fib/ip6_fib.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/vnet/fib/ip6_fib.c') diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c index d37b77e08a4..ccf8e22f5a7 100644 --- a/src/vnet/fib/ip6_fib.c +++ b/src/vnet/fib/ip6_fib.c @@ -160,10 +160,7 @@ ip6_fib_table_destroy (u32 fib_index) /* * validate no more routes. */ -#if CLIB_DEBUG > 0 - if (0 != fib_table->ft_total_route_counts) - fib_table_assert_empty(fib_table); -#endif + fib_table_assert_empty(fib_table); vec_foreach_index(source, fib_table->ft_src_route_counts) { -- cgit 1.2.3-korg