Fix dangling reference in l2fib_scan(...) 30/14030/1
authorDave Barach <[email protected]>
Tue, 7 Aug 2018 16:46:18 +0000 (12:46 -0400)
committerJohn Lo <[email protected]>
Tue, 7 Aug 2018 18:10:35 +0000 (18:10 +0000)
commit21076e5d47ce294df4aa0e16cc92c183046f071e
treede123d38faf701c406da73206f6c705903afe623
parentab955b1b44f3d606cef51a9471a6562a7135ab3e
Fix dangling reference in l2fib_scan(...)

Deleting a bihash kvp frees the bucket's backing storage when the
bucket reference count reaches zero. l2fib_scan MUST check for that
condition, and stop scanning the bucket if it occurs. One of the L2
FIB extended "make test" vectors caused this issue 100% of the time.

Change-Id: I250bcc4c1518e16042120fbc4032227a759a602e
Signed-off-by: Dave Barach <[email protected]>
(cherry picked from commit 28374cada08df61180044e24cb758fa570e73c9d)
src/vnet/l2/l2_fib.c