]> git.proxmox.com Git - mirror_frr.git/commit - ospfd/ospf_ext.c
ospfd: Solve crash after removing and adding conf.
authorOlivier Dugeon <olivier.dugeon@orange.com>
Fri, 15 May 2020 17:18:36 +0000 (19:18 +0200)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Tue, 26 May 2020 09:57:04 +0000 (11:57 +0200)
commit731271b0bdef62f96d84c77da53e519d02f6c5e5
tree4b03bc30192f08ee5cd3b14ca6e6726a4fe1a209
parent809241f44214f49e34b99a00eb2f588ee019d2cb
ospfd: Solve crash after removing and adding conf.

Issue number #6291 describes how OSPFd crashes after being deleted and then
added again with configuration when segment routing is used.

The problem occurs in ospf_ri.c because the OspfRI structures retains
the reference to the old area pointer which is mofified when ospfd is
reactivated by configuration. When segment routing is activated, the LSA Router
Information is sent with reference to the old area pointer, instead the new one,
which causes the crash. The same problem is also present in ospf_ext.c with
OspfEXT structure and Extended Link/Prefix structure.

This commit introduces Extended Link/Prefix and Router Information LSAs flusing
when OSPFd is stopped when configuration is removed and adds the correct
initialization to the area pointer in OspfRI and Extended Link/Prefix structure
when OSPFd is re-enabled with the configuration. Area pointer has been removed
from the OspfEXT structure as it is never used with this commit.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
ospfd/ospf_ext.c
ospfd/ospf_ext.h
ospfd/ospf_ri.c
tests/topotests/ospf-sr-topo1/r2/ospfd.conf