]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: ensure that the node gets unlocked in all cases 11095/head
authorCarl Baldwin <carl@ecbaldwin.net>
Wed, 29 Dec 2021 21:32:33 +0000 (14:32 -0700)
committerCarl Baldwin <carl@ecbaldwin.net>
Tue, 26 Apr 2022 15:38:37 +0000 (09:38 -0600)
commit067ea16598a444b1ecfda5012f96acb038ba041e
treeb14c73b9f1352e34420e9c2ae44db28f6d5f2aa0
parentd45a846e5ca313e5ab132ef57c495cc0407b50d9
bgpd: ensure that the node gets unlocked in all cases

The logic to unlock dest if iteration completed without iterating the
entire node was flawed. Specifically, if iteration terminated due to
`gr_deferred == 0` then the node would not get unlocked.

This change takes into account the fact that dest will be NULL only in
the case when the entire table was iterated and all nodes were already
unlocked. In any other case, it needs to be unlocked.

Signed-off-by: Carl Baldwin <carl@ecbaldwin.net>
bgpd/bgp_route.c