l2: mark l2 fib uninitialized after clearing 02/29402/1
authorMatthew Smith <mgsmith@netgate.com>
Mon, 12 Oct 2020 20:04:39 +0000 (15:04 -0500)
committerMatthew Smith <mgsmith@netgate.com>
Mon, 12 Oct 2020 20:34:23 +0000 (15:34 -0500)
commit3a97a456ab27d21d7b25bb5505d93b0d96ab4cab
treeb1bd0760e74929a61d66aa38377629ef183c1648
parent8c6988797e2a5d6da87fa73fee833ff3776b156b
l2: mark l2 fib uninitialized after clearing

Type: fix

After clearing the l2fib with 'vppctl clear l2fib', a SEGV occurs the
next time a MAC address is learned.

In l2fib_clear_table(), the l2fib bihash is freed and then
l2fib_table_init() is called to reinitialize it. l2fib_table_init()
will not do anything if l2fib_main.mac_table_initialized is set to 1.
Reset the value of l2fib_main.mac_table_initialized to 0 before
calling l2fib_table_init().

Change-Id: I87f1a3f9a46c951f36c1c0a5ab795b0ec08c81a8
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/vnet/l2/l2_fib.c