diff options
author | Kaushik <kaushiknath.null@gmail.com> | 2021-03-25 12:29:51 +0100 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2021-06-04 12:23:10 +0200 |
commit | ad500b22b5fc3bc34009b7212c7c3b2f6c4375aa (patch) | |
tree | f24f206101ffcbfc968ad97fd54a71b94c134ccb /ospf6d/ospf6_top.c | |
parent | Merge pull request #8776 from anlancs/fix-ospf-cli-passive-interface (diff) | |
download | frr-ad500b22b5fc3bc34009b7212c7c3b2f6c4375aa.tar.xz frr-ad500b22b5fc3bc34009b7212c7c3b2f6c4375aa.zip |
ospf6d: Support for nssa in ospfv3
The following is implemented.
1. Configuring area as NSSA.
2. Generating Type 7 LSA.
3. Conversion of Type 7 to Type 5 ( Default Behavior).
4. NSSA ABR selection.
Reviewed-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Co-authored-by: Kaushik <kaushiknath.null@gmail.com>
Co-authored-by: Soman K.S <somanks@gmail.com>
Signed-off-by: Kaushik <kaushiknath.null@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 42405ca35..33b5dd196 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -52,6 +52,7 @@ #include "ospf6_spf.h" #include "ospf6d.h" #include "lib/json.h" +#include "ospf6_nssa.h" DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_TOP, "OSPF6 top"); @@ -259,7 +260,15 @@ static void ospf6_top_lsdb_hook_remove(struct ospf6_lsa *lsa) static void ospf6_top_route_hook_add(struct ospf6_route *route) { - struct ospf6 *ospf6 = route->table->scope; + struct ospf6 *ospf6 = NULL; + struct ospf6_area *oa = NULL; + + if (route->table->scope_type == OSPF6_SCOPE_TYPE_GLOBAL) + ospf6 = route->table->scope; + else if (route->table->scope_type == OSPF6_SCOPE_TYPE_AREA) { + oa = (struct ospf6_area *)route->table->scope; + ospf6 = oa->ospf6; + } ospf6_abr_originate_summary(route, ospf6); ospf6_zebra_route_update_add(route, ospf6); @@ -267,7 +276,15 @@ static void ospf6_top_route_hook_add(struct ospf6_route *route) static void ospf6_top_route_hook_remove(struct ospf6_route *route) { - struct ospf6 *ospf6 = route->table->scope; + struct ospf6 *ospf6 = NULL; + struct ospf6_area *oa = NULL; + + if (route->table->scope_type == OSPF6_SCOPE_TYPE_GLOBAL) + ospf6 = route->table->scope; + else if (route->table->scope_type == OSPF6_SCOPE_TYPE_AREA) { + oa = (struct ospf6_area *)route->table->scope; + ospf6 = oa->ospf6; + } route->flag |= OSPF6_ROUTE_REMOVE; ospf6_abr_originate_summary(route, ospf6); @@ -917,8 +934,10 @@ DEFUN (ospf6_interface_area, ospf6_interface_enable(oi); /* If the router is ABR, originate summary routes */ - if (ospf6_is_router_abr(ospf6)) + if (ospf6_is_router_abr(ospf6)) { ospf6_abr_enable_area(oa); + ospf6_schedule_abr_task(oa->ospf6); + } return CMD_SUCCESS; } |