diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-06-10 07:59:06 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-06-10 07:59:06 -0400 |
| commit | 95b3f03d89101fa812a8e4648f5745e2d532037b (patch) | |
| tree | e60163d3e73f82be60239746686f959e8e5f6f57 /ospf6d/ospf6_nssa.c | |
| parent | 0d882ec7a390f57ebf8cfc2adf10aa79f976b124 (diff) | |
ospf6d: Rename ospf6_is_router_abr to more accurately reflect what it does
The ospf6_is_router_abr is checking to see if ospfv3 is an abr router
and also setting values. Let's rename it too `ospf6_check_and_set_router_abr`
to more accurately reflect what it is doing.
Additionally fix coverity #1505176 where we were not checking the return
value of ospf6_is_router_abr like we did every other time. In this
case we don't care about the return value so indicate that we do not.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_nssa.c')
| -rw-r--r-- | ospf6d/ospf6_nssa.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index 4d9b0a1978..dfae51cec1 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -1093,7 +1093,7 @@ static int ospf6_abr_task_timer(struct thread *thread) if (IS_OSPF6_DEBUG_ABR) zlog_debug("Running ABR task on timer"); - ospf6_is_router_abr(ospf6); + (void)ospf6_check_and_set_router_abr(ospf6); ospf6_abr_nssa_check_status(ospf6); ospf6_abr_task(ospf6); /* if nssa-abr, then scan Type-7 LSDB */ @@ -1137,7 +1137,7 @@ static void ospf6_nssa_flush_area(struct ospf6_area *area) SET_FLAG(lsa->flag, OSPF6_LSA_FLUSH); ospf6_flood(NULL, lsa); /* Flush the translated LSA */ - if (ospf6_is_router_abr(ospf6)) { + if (ospf6_check_and_set_router_abr(ospf6)) { type = htons(OSPF6_LSTYPE_AS_EXTERNAL); type5 = ospf6_lsdb_lookup( htons(type), lsa->external_lsa_id, @@ -1158,7 +1158,7 @@ static void ospf6_area_nssa_update(struct ospf6_area *area) struct ospf6_route *route; if (IS_AREA_NSSA(area)) { - if (!ospf6_is_router_abr(area->ospf6)) + if (!ospf6_check_and_set_router_abr(area->ospf6)) OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E); area->ospf6->anyNSSA++; OSPF6_OPT_SET(area->options, OSPF6_OPT_N); @@ -1167,7 +1167,7 @@ static void ospf6_area_nssa_update(struct ospf6_area *area) if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER)) zlog_debug("Normal area for if %s", area->name); OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_N); - if (ospf6_is_router_abr(area->ospf6)) + if (ospf6_check_and_set_router_abr(area->ospf6)) OSPF6_OPT_SET(area->options, OSPF6_OPT_E); area->ospf6->anyNSSA--; area->NSSATranslatorState = OSPF6_NSSA_TRANSLATE_DISABLED; @@ -1178,7 +1178,7 @@ static void ospf6_area_nssa_update(struct ospf6_area *area) OSPF6_ROUTER_LSA_SCHEDULE(area); /* Check if router is ABR */ - if (ospf6_is_router_abr(area->ospf6)) { + if (ospf6_check_and_set_router_abr(area->ospf6)) { if (IS_OSPF6_DEBUG_NSSA) zlog_debug("Router is ABR area %s", area->name); ospf6_schedule_abr_task(area->ospf6); @@ -1353,7 +1353,7 @@ void ospf6_abr_check_translate_nssa(struct ospf6_area *area, lsa->external_lsa_id, ospf6->router_id, ospf6->lsdb); - if (ospf6_is_router_abr(ospf6) && (type5 == NULL)) { + if (ospf6_check_and_set_router_abr(ospf6) && (type5 == NULL)) { if (IS_OSPF6_DEBUG_NSSA) zlog_debug("%s : Originating type5 LSA", __func__); ospf6_lsa_translated_nssa_new(area, lsa); |
