]> git.puffer.fish Git - mirror/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)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 8 Jun 2021 14:41:33 +0000 (11:41 -0300)
commit69843e810acc27b152c19fe91bb2e9b67f808108
tree22f740229eec38d91b1c7be1cbb642218456b184
parentb4a970999cd9c85ebc617b130b6043ac7e9226c3
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