fib: make sure dpo is valid even when path pool expands 44/32644/1
authorBenoît Ganne <bganne@cisco.com>
Tue, 8 Jun 2021 16:44:37 +0000 (18:44 +0200)
committerBenoît Ganne <bganne@cisco.com>
Tue, 8 Jun 2021 16:53:01 +0000 (18:53 +0200)
commite9d7b0982d7bd189097260b6581abff472da251a
tree3234ce4d5a9972bf4ac5e8f20598e89eba2fabce
parent9f10edbb46dc1937ed99469a581723cb1ac1ff45
fib: make sure dpo is valid even when path pool expands

The path pool can expand during in fib_path_attached_next_hop_get_adj()
when calling adj_nbr_add_or_lock(). If dpo points to a path->fp_dpo, its
reference becomes stale.
Use a temporary copy instead.

Type: fix

Change-Id: Ie966cb5f3f7b416425964dca12f1f586bfc2010c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/fib/fib_path.c