diff options
author | harios_niral <hari@niralnetworks.com> | 2020-10-08 07:38:43 +0200 |
---|---|---|
committer | harios_niral <hari@niralnetworks.com> | 2020-10-31 07:50:08 +0100 |
commit | beadc736bbd27da5d2bb6f2770fceea7af227ef3 (patch) | |
tree | cd3b630a3556f93fd68c80d087051882ae56e138 /ospf6d/ospf6_main.c | |
parent | Merge pull request #7333 from mjstapp/fix_multi_connected (diff) | |
download | frr-beadc736bbd27da5d2bb6f2770fceea7af227ef3.tar.xz frr-beadc736bbd27da5d2bb6f2770fceea7af227ef3.zip |
ospf6d : Transformation changes for ospf6 vrf support.
1. All the changes are related to handle ospf6 with different vrf.
2. The dependancy of global ospf6 is removed.
Co-authored-by: Kaushik <kaushik@niralnetworks.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
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 8533c1b12..4ed6e2a60 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); |