fib: fix crash on exporter tracker remove 22/33822/3
authorVladislav Grishenko <themiron@yandex-team.ru>
Sat, 18 Sep 2021 12:32:17 +0000 (17:32 +0500)
committerNeale Ranns <neale@graphiant.com>
Mon, 27 Sep 2021 11:13:13 +0000 (11:13 +0000)
commitc022b2fe399809eda173a748ca050ffc34c18025
tree7d86500812e8571c9847115eea3d8c6ed304f43e
parented40167e2b21e52d4177b4ae62fff1b7d8784e1a
fib: fix crash on exporter tracker remove

Exported entries are tracked only when the prefix found in the export
FIB is really attached, exporter tracker is not set if the export
entry is not valid for export, ex. for special FIB entries - default
route, zeronet, mcast and broadcast prefixes.
When imported entries need to be purged, such unset exporter tracker is
being removed by non-initialized index with absent delegate entries,
causing corresponding assert and crash.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ib24a2e7853a03a960577872480213e1e8097da5a
src/plugins/unittest/fib_test.c
src/vnet/fib/fib_attached_export.c