diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2020-11-03 11:59:38 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-03 11:59:38 -0300 |
| commit | 7c62dc76d4e78cce352d511fea89f908a9ee30ce (patch) | |
| tree | b7eadd961c71dd302d2c1800cb1d6abee2677c38 /ospf6d/ospf6_main.c | |
| parent | e035e7142ecaae8f284f533b508cab5108350631 (diff) | |
| parent | 96117716ba3f194d75ef45e630b0a0b551e0a313 (diff) | |
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
ospf6d : Transformation changes for ospf6 vrf support.
Diffstat (limited to 'ospf6d/ospf6_main.c')
| -rw-r--r-- | ospf6d/ospf6_main.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 8533c1b12c..4ed6e2a604 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -81,22 +81,23 @@ static void __attribute__((noreturn)) ospf6_exit(int status) { struct vrf *vrf; struct interface *ifp; + struct ospf6 *ospf6; + struct listnode *node, *nnode; frr_early_fini(); - if (ospf6) { + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { vrf = vrf_lookup_by_id(ospf6->vrf_id); ospf6_serv_close(&ospf6->fd); + FOR_ALL_INTERFACES (vrf, ifp) + if (ifp->info != NULL) + ospf6_interface_delete(ifp->info); ospf6_delete(ospf6); ospf6 = NULL; - } else - vrf = vrf_lookup_by_id(VRF_DEFAULT); + } bfd_gbl_exit(); - FOR_ALL_INTERFACES (vrf, ifp) - if (ifp->info != NULL) - ospf6_interface_delete(ifp->info); ospf6_message_terminate(); ospf6_asbr_terminate(); @@ -216,17 +217,17 @@ int main(int argc, char *argv[], char *envp[]) } /* OSPF6 master init. */ - ospf6_master_init(); + ospf6_master_init(frr_init()); /* thread master */ - master = frr_init(); + master = om6->master; vrf_init(NULL, NULL, NULL, NULL, NULL); access_list_init(); prefix_list_init(); /* initialize ospf6 */ - ospf6_init(); + ospf6_init(master); frr_config_fork(); frr_run(master); |
