diff options
author | Matthew Smith <mgsmith@netgate.com> | 2020-07-02 17:24:17 -0500 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-07-06 08:35:59 +0000 |
commit | ee167e524c6244b400045907c322862bb4f42c6c (patch) | |
tree | 7af61a07e64ef66ad69a697d89fee00c6fcfedc2 /src/vnet/fib/fib_table.h | |
parent | fbb846cfa1f95d57159f9ad6cc429f6d9d0b8696 (diff) |
fib: fix debug preprocessor directives
Type: fix
Some debugging declarations were wrapped in an 'ifdef CLIB_DEBUG'.
This seems to always evaluate true because clib.h defines CLIB_DEBUG
to 0 if its not defined.
The result is that if a route table is added and a route is added to
it and then the table is deleted, VPP exits because the debug function
fib_table_assert_empty() gets called whether VPP was started using a
debug build or a release build.
Change the ifdef to 'if CLIB_DEBUG > 0'.
Change-Id: I357dc2c299e81b95244f2f7efaadb8e0de27627a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/vnet/fib/fib_table.h')
-rw-r--r-- | src/vnet/fib/fib_table.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/fib/fib_table.h b/src/vnet/fib/fib_table.h index 7f18188bdb3..201170707a8 100644 --- a/src/vnet/fib/fib_table.h +++ b/src/vnet/fib/fib_table.h @@ -960,7 +960,7 @@ extern u8 *format_fib_table_memory(u8 *s, va_list *args); /** * Debug function */ -#ifdef CLIB_DEBUG +#if CLIB_DEBUG > 0 extern void fib_table_assert_empty(const fib_table_t *fib_table); #endif |