diff options
Diffstat (limited to 'ospfd/ospf_abr.c')
-rw-r--r-- | ospfd/ospf_abr.c | 148 |
1 files changed, 49 insertions, 99 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index eb3323997..3dbc47617 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -348,8 +348,7 @@ static int ospf_abr_nssa_am_elected(struct ospf_area *area) if (IS_ROUTER_LSA_NT(rlsa)) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_nssa_am_elected: " - "router %s asserts Nt", + "ospf_abr_nssa_am_elected: router %s asserts Nt", inet_ntoa(lsa->data->id)); return 0; } @@ -391,15 +390,13 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf) if (IS_DEBUG_OSPF(nssa, NSSA)) zlog_debug( - "ospf_abr_nssa_check_status: " - "checking area %s", + "ospf_abr_nssa_check_status: checking area %s", inet_ntoa(area->area_id)); if (!IS_OSPF_ABR(area->ospf)) { if (IS_DEBUG_OSPF(nssa, NSSA)) zlog_debug( - "ospf_abr_nssa_check_status: " - "not ABR"); + "ospf_abr_nssa_check_status: not ABR"); area->NSSATranslatorState = OSPF_NSSA_TRANSLATE_DISABLED; } else { @@ -409,8 +406,7 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf) /* TODO: check previous state and flush? */ if (IS_DEBUG_OSPF(nssa, NSSA)) zlog_debug( - "ospf_abr_nssa_check_status: " - "never translate"); + "ospf_abr_nssa_check_status: never translate"); area->NSSATranslatorState = OSPF_NSSA_TRANSLATE_DISABLED; break; @@ -422,8 +418,7 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf) */ if (IS_DEBUG_OSPF(nssa, NSSA)) zlog_debug( - "ospf_abr_nssa_check_status: " - "translate always"); + "ospf_abr_nssa_check_status: translate always"); area->NSSATranslatorState = OSPF_NSSA_TRANSLATE_ENABLED; break; @@ -435,15 +430,13 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf) OSPF_NSSA_TRANSLATE_ENABLED; if (IS_DEBUG_OSPF(nssa, NSSA)) zlog_debug( - "ospf_abr_nssa_check_status: " - "elected translator"); + "ospf_abr_nssa_check_status: elected translator"); } else { area->NSSATranslatorState = OSPF_NSSA_TRANSLATE_DISABLED; if (IS_DEBUG_OSPF(nssa, NSSA)) zlog_debug( - "ospf_abr_nssa_check_status: " - "not elected"); + "ospf_abr_nssa_check_status: not elected"); } break; } @@ -639,8 +632,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa) if (ext7->e[0].fwd_addr.s_addr == OSPF_DEFAULT_DESTINATION) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_translate_nssa(): LSA Id %s, " - "Forward address is 0, NO Translation", + "ospf_abr_translate_nssa(): LSA Id %s, Forward address is 0, NO Translation", inet_ntoa(lsa->data->id)); return 1; } @@ -652,8 +644,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa) if (old) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_translate_nssa(): " - "found old translated LSA Id %s, refreshing", + "ospf_abr_translate_nssa(): found old translated LSA Id %s, refreshing", inet_ntoa(old->data->id)); /* refresh */ @@ -661,8 +652,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa) if (!new) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_translate_nssa(): " - "could not refresh translated LSA Id %s", + "ospf_abr_translate_nssa(): could not refresh translated LSA Id %s", inet_ntoa(old->data->id)); } } else { @@ -673,8 +663,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa) if (ospf_translated_nssa_originate(area->ospf, lsa) == NULL) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_translate_nssa(): Could not translate " - "Type-7 for %s to Type-5", + "ospf_abr_translate_nssa(): Could not translate Type-7 for %s to Type-5", inet_ntoa(lsa->data->id)); return 1; } @@ -719,8 +708,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost, if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network_to_area(): " - "old metric: %d, new metric: %d", + "ospf_abr_announce_network_to_area(): old metric: %d, new metric: %d", GET_METRIC(sl->metric), cost); if ((GET_METRIC(sl->metric) == full_cost) @@ -728,15 +716,13 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost, /* unchanged. simply reapprove it */ if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network_to_area(): " - "old summary approved"); + "ospf_abr_announce_network_to_area(): old summary approved"); SET_FLAG(old->flags, OSPF_LSA_APPROVED); } else { /* LSA is changed, refresh it */ if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network_to_area(): " - "refreshing summary"); + "ospf_abr_announce_network_to_area(): refreshing summary"); set_metric(old, full_cost); lsa = ospf_lsa_refresh(area->ospf, old); @@ -758,8 +744,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost, } else { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network_to_area(): " - "creating new summary"); + "ospf_abr_announce_network_to_area(): creating new summary"); lsa = ospf_summary_lsa_originate(p, full_cost, area); /* This will flood through area. */ @@ -776,8 +761,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost, SET_FLAG(lsa->flags, OSPF_LSA_APPROVED); if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network_to_area(): " - "flooding new version of summary"); + "ospf_abr_announce_network_to_area(): flooding new version of summary"); } if (IS_DEBUG_OSPF_EVENT) @@ -875,8 +859,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p, if (!ospf_abr_should_accept(p, area)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network(): " - "prefix %s/%d was denied by import-list", + "ospf_abr_announce_network(): prefix %s/%d was denied by import-list", inet_ntoa(p->prefix), p->prefixlen); continue; } @@ -884,8 +867,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p, if (!ospf_abr_plist_in_check(area, or, p)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network(): " - "prefix %s/%d was denied by prefix-list", + "ospf_abr_announce_network(): prefix %s/%d was denied by prefix-list", inet_ntoa(p->prefix), p->prefixlen); continue; } @@ -894,8 +876,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p, && area->no_summary) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network(): " - "area %s is stub and no_summary", + "ospf_abr_announce_network(): area %s is stub and no_summary", inet_ntoa(area->area_id)); continue; } @@ -903,8 +884,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p, if (or->path_type == OSPF_PATH_INTER_AREA) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network(): this is " - "inter-area route to %s/%d", + "ospf_abr_announce_network(): this is inter-area route to %s/%d", inet_ntoa(p->prefix), p->prefixlen); if (!OSPF_IS_AREA_BACKBONE(area)) @@ -915,8 +895,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p, if (or->path_type == OSPF_PATH_INTRA_AREA) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network(): " - "this is intra-area route to %s/%d", + "ospf_abr_announce_network(): this is intra-area route to %s/%d", inet_ntoa(p->prefix), p->prefixlen); if ((range = ospf_area_range_match(or_area, p)) && !ospf_area_is_transit(area)) @@ -976,8 +955,7 @@ static void ospf_abr_process_nssa_translates(struct ospf *ospf) if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_process_nssa_translates(): " - "looking at area %s", + "ospf_abr_process_nssa_translates(): looking at area %s", inet_ntoa(area->area_id)); LSDB_LOOP (NSSA_LSDB(area), rn, lsa) @@ -1018,24 +996,21 @@ static void ospf_abr_process_network_rt(struct ospf *ospf, if (or->path_type >= OSPF_PATH_TYPE1_EXTERNAL) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_network_rt(): " - "this is an External router, skipping"); + "ospf_abr_process_network_rt(): this is an External router, skipping"); continue; } if (or->cost >= OSPF_LS_INFINITY) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_network_rt():" - " this route's cost is infinity, skipping"); + "ospf_abr_process_network_rt(): this route's cost is infinity, skipping"); continue; } if (or->type == OSPF_DESTINATION_DISCARD) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_network_rt():" - " this is a discard entry, skipping"); + "ospf_abr_process_network_rt(): this is a discard entry, skipping"); continue; } @@ -1065,8 +1040,7 @@ static void ospf_abr_process_network_rt(struct ospf *ospf, && !OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_network_rt():" - " this is route is not backbone one, skipping"); + "ospf_abr_process_network_rt(): this is route is not backbone one, skipping"); continue; } @@ -1078,8 +1052,7 @@ static void ospf_abr_process_network_rt(struct ospf *ospf, or->path_type != OSPF_PATH_INTRA_AREA) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_network_rt(): ALT ABR: " - "No BB connection, skip not intra-area routes"); + "ospf_abr_process_network_rt(): ALT ABR: No BB connection, skip not intra-area routes"); continue; } @@ -1112,8 +1085,7 @@ static void ospf_abr_announce_rtr_to_area(struct prefix_ipv4 *p, uint32_t cost, if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_network_to_area(): " - "old metric: %d, new metric: %d", + "ospf_abr_announce_network_to_area(): old metric: %d, new metric: %d", GET_METRIC(slsa->metric), cost); } @@ -1144,8 +1116,7 @@ static void ospf_abr_announce_rtr_to_area(struct prefix_ipv4 *p, uint32_t cost, if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_rtr_to_area(): " - "flooding new version of summary"); + "ospf_abr_announce_rtr_to_area(): flooding new version of summary"); /* zlog_info ("ospf_abr_announce_rtr_to_area(): creating new @@ -1185,8 +1156,7 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p, if (area->external_routing != OSPF_AREA_DEFAULT) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_rtr(): " - "area %s doesn't support external routing", + "ospf_abr_announce_rtr(): area %s doesn't support external routing", inet_ntoa(area->area_id)); continue; } @@ -1194,8 +1164,7 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p, if (or->path_type == OSPF_PATH_INTER_AREA) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_rtr(): " - "this is inter-area route to %s", + "ospf_abr_announce_rtr(): this is inter-area route to %s", inet_ntoa(p->prefix)); if (!OSPF_IS_AREA_BACKBONE(area)) ospf_abr_announce_rtr_to_area(p, or->cost, @@ -1205,8 +1174,7 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p, if (or->path_type == OSPF_PATH_INTRA_AREA) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_rtr(): " - "this is intra-area route to %s", + "ospf_abr_announce_rtr(): this is intra-area route to %s", inet_ntoa(p->prefix)); ospf_abr_announce_rtr_to_area(p, or->cost, area); } @@ -1255,8 +1223,7 @@ static void ospf_abr_process_router_rt(struct ospf *ospf, if (!CHECK_FLAG(or->u.std.flags, ROUTER_LSA_EXTERNAL)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_router_rt(): " - "This is not an ASBR, skipping"); + "ospf_abr_process_router_rt(): This is not an ASBR, skipping"); continue; } @@ -1272,8 +1239,7 @@ static void ospf_abr_process_router_rt(struct ospf *ospf, if (or != best) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_router_rt(): " - "This route is not the best among possible, skipping"); + "ospf_abr_process_router_rt(): This route is not the best among possible, skipping"); continue; } @@ -1283,16 +1249,14 @@ static void ospf_abr_process_router_rt(struct ospf *ospf, or->u.std.area_id)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_router_rt(): " - "This route is not a backbone one, skipping"); + "ospf_abr_process_router_rt(): This route is not a backbone one, skipping"); continue; } if (or->cost >= OSPF_LS_INFINITY) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_router_rt(): " - "This route has LS_INFINITY metric, skipping"); + "ospf_abr_process_router_rt(): This route has LS_INFINITY metric, skipping"); continue; } @@ -1302,8 +1266,7 @@ static void ospf_abr_process_router_rt(struct ospf *ospf, or->path_type != OSPF_PATH_INTRA_AREA) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_process_network_rt(): ALT ABR: " - "No BB connection, skip not intra-area routes"); + "ospf_abr_process_network_rt(): ALT ABR: No BB connection, skip not intra-area routes"); continue; } @@ -1333,8 +1296,7 @@ ospf_abr_unapprove_translates(struct ospf *ospf) /* For NSSA Translations */ UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED); if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_unapprove_translates(): " - "approved unset on link id %s", + "ospf_abr_unapprove_translates(): approved unset on link id %s", inet_ntoa(lsa->data->id)); } @@ -1355,15 +1317,13 @@ static void ospf_abr_unapprove_summaries(struct ospf *ospf) for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_unapprove_summaries(): " - "considering area %s", + "ospf_abr_unapprove_summaries(): considering area %s", inet_ntoa(area->area_id)); LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa) if (ospf_lsa_is_self_originated(ospf, lsa)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_unapprove_summaries(): " - "approved unset on summary link id %s", + "ospf_abr_unapprove_summaries(): approved unset on summary link id %s", inet_ntoa(lsa->data->id)); UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED); } @@ -1372,8 +1332,7 @@ static void ospf_abr_unapprove_summaries(struct ospf *ospf) if (ospf_lsa_is_self_originated(ospf, lsa)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_unapprove_summaries(): " - "approved unset on asbr-summary link id %s", + "ospf_abr_unapprove_summaries(): approved unset on asbr-summary link id %s", inet_ntoa(lsa->data->id)); UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED); } @@ -1428,8 +1387,7 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf) OSPF_AREA_RANGE_ADVERTISE)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_aggregates():" - " discarding suppress-ranges"); + "ospf_abr_announce_aggregates(): discarding suppress-ranges"); continue; } @@ -1439,8 +1397,7 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf) if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_aggregates():" - " this is range: %s/%d", + "ospf_abr_announce_aggregates(): this is range: %s/%d", inet_ntoa(p.u.prefix4), p.prefixlen); @@ -1477,9 +1434,7 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf) area)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_aggregates(): Skipping " - "announcement of BB aggregate into" - " a transit area"); + "ospf_abr_announce_aggregates(): Skipping announcement of BB aggregate into a transit area"); continue; } ospf_abr_announce_network_to_area( @@ -1526,8 +1481,7 @@ ospf_abr_send_nssa_aggregates(struct ospf *ospf) /* temporarily turned off */ OSPF_AREA_RANGE_ADVERTISE)) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_send_nssa_aggregates():" - " discarding suppress-ranges"); + "ospf_abr_send_nssa_aggregates(): discarding suppress-ranges"); continue; } @@ -1537,8 +1491,7 @@ ospf_abr_send_nssa_aggregates(struct ospf *ospf) /* temporarily turned off */ if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_send_nssa_aggregates():" - " this is range: %s/%d", + "ospf_abr_send_nssa_aggregates(): this is range: %s/%d", inet_ntoa(p.prefix), p.prefixlen); if (CHECK_FLAG(range->flags, @@ -1598,8 +1551,7 @@ static void ospf_abr_announce_stub_defaults(struct ospf *ospf) if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_announce_stub_defaults(): " - "announcing 0.0.0.0/0 to area %s", + "ospf_abr_announce_stub_defaults(): announcing 0.0.0.0/0 to area %s", inet_ntoa(area->area_id)); ospf_abr_announce_network_to_area(&p, area->default_cost, area); } @@ -1614,8 +1566,7 @@ static int ospf_abr_remove_unapproved_translates_apply(struct ospf *ospf, if (CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT) && !CHECK_FLAG(lsa->flags, OSPF_LSA_APPROVED)) { zlog_info( - "ospf_abr_remove_unapproved_translates(): " - "removing unapproved translates, ID: %s", + "ospf_abr_remove_unapproved_translates(): removing unapproved translates, ID: %s", inet_ntoa(lsa->data->id)); /* FLUSH THROUGHOUT AS */ @@ -1656,8 +1607,7 @@ static void ospf_abr_remove_unapproved_summaries(struct ospf *ospf) for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "ospf_abr_remove_unapproved_summaries(): " - "looking at area %s", + "ospf_abr_remove_unapproved_summaries(): looking at area %s", inet_ntoa(area->area_id)); LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa) |