]> git.puffer.fish Git - matthieu/frr.git/commit
ospfd: fix cleanup of MaxAge LSAs on exit
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 9 Jun 2021 16:26:52 +0000 (19:26 +0300)
commit8ff13a647105577a661acad49b8b9b52b4aeef18
tree527b1562cceddd8b6f5cf4475e036968cdd55beb
parentd11e0c82eab7fb6f5e5cb334f56e071cad0bab88
ospfd: fix cleanup of MaxAge LSAs on exit

During shutdown, the ospf->maxage_lsa table is iterated over to
clean up all existing entries. While doing that, route_unlock_node()
should be called only for the nodes that have an associated entry,
otherwise the table will get corrupted and ospfd will crash.

As a side note, using a routing table to store MaxAge LSAs was a
very poor choice of a data structure, considering that a simple
rb-tree or hash table would get the job done with a much simpler
(and less error-prone) API. Something to cleanup in the future...

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ospfd/ospfd.c