]> git.proxmox.com Git - mirror_frr.git/commit - isisd/isis_lfa.c
isisd: fix memory leak for non-freed spftrees
authorFredi Raspall <fredi@voltanet.io>
Fri, 23 Apr 2021 22:01:41 +0000 (00:01 +0200)
committerFredi Raspall <fredi@voltanet.io>
Sat, 1 May 2021 13:52:10 +0000 (15:52 +0200)
commit7c3be15f3e8e554a3ce57eb1a3b69ea349c34f03
tree7135c52369207dce9715508f886f721549e5cc03
parent1af1ce4ebc9fef96ccf37913ac83793b5005981a
isisd: fix memory leak for non-freed spftrees

When enabling TI-LFA the forward SPF for neighbors adjacent to the
PLR is computed. Later, when computing the PQ spaces, the reverse
SPF trees for those adjacent neighbors affected by the protected
interface are computed.

When node protection is enabled, TI-LFA link protection is run
immediately afterwards to compute repairs in case no
node-protecting backup path exists. In this second run, the
existing code tries to compute the reverse SPF tree for the same
node, without freeing the SPF tree of the prior run.

This patch fixes this by not computing the reverse SPF again, thus
avoiding a memory leak and an unnecessary SPF run.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
isisd/isis_lfa.c