diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2021-05-31 15:27:51 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2021-06-08 16:41:33 +0200 |
commit | 51f8588eb999429eb2181f1897742fa503c17a51 (patch) | |
tree | fe9a63e81bc64dbac4cf9add48a11942076a538f /ospfd/ospfd.c | |
parent | Merge pull request #8727 from opensourcerouting/ospfv3-nssa (diff) | |
download | frr-51f8588eb999429eb2181f1897742fa503c17a51.tar.xz frr-51f8588eb999429eb2181f1897742fa503c17a51.zip |
ospfd: fix GR helper initialization and termination
Since a single ospfd process can have multiple OSPF interfaces
configured, we need to separate the global GR initialization and
termination from per-instance initialization and termination.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 38c0ca2b6..106ce3bd7 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -386,7 +386,7 @@ struct ospf *ospf_new_alloc(unsigned short instance, const char *name) new->proactive_arp = OSPF_PROACTIVE_ARP_DEFAULT; - ospf_gr_helper_init(new); + ospf_gr_helper_instance_init(new); ospf_asbr_external_aggregator_init(new); @@ -651,6 +651,9 @@ void ospf_terminate(void) for (ALL_LIST_ELEMENTS(om->ospf, node, nnode, ospf)) ospf_finish(ospf); + /* Cleanup GR */ + ospf_gr_helper_stop(); + /* Cleanup route maps */ route_map_finish(); @@ -900,7 +903,7 @@ static void ospf_finish_final(struct ospf *ospf) list_delete(&ospf->oi_write_q); /* Reset GR helper data structers */ - ospf_gr_helper_stop(ospf); + ospf_gr_helper_instance_stop(ospf); close(ospf->fd); stream_free(ospf->ibuf); |