]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: fix LU label callback crash
authorEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 18 Jun 2019 09:14:28 +0000 (11:14 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 24 Jun 2019 09:35:44 +0000 (11:35 +0200)
commitea63ff6bbd15e1f105fedee071ba3917daa41c7a
tree2ece8417c6421c60b67d74b8e78b40db1be93bf7
parent0c3bbed4e670a24134bd0bcb18b56634c542fcf5
bgpd: fix LU label callback crash

under some conditions, the callback to get a label for
a LU bgp path could be called after the path had already
been freed. In this case we would be reading garbage
and potentially crash. Lock the path info before
queueing the callback, and unlock as the first step
of the callback, exiting gracefully if the path info
is now NULL.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
bgpd/bgp_label.c
bgpd/bgp_labelpool.c