Commit c1ae4a4b32 for frr

commit c1ae4a4b3279844c436a225a5a1cf48ba1e0678d
Author: Donald Sharp <sharpd@nvidia.com>
Date:   Tue Oct 20 10:39:00 2026 -0400

    ospfd: Standardize prefix output, %pFX, in debugs

    Currently there are two problems with using %pFX in ospfd
    debugs:

    a) The vrf name, vrf id and table were not being output for
    every debug.  When a prefix is used in multiple vrf's it
    is difficult to know if the debug being looked at is for
    the instance of interest.

    b) The output was not standardized.  Some debugs had the vrf
    name and id after the prefix, some had only the id and some
    had nothing at all.  Solidify on "(%s:%u:%u)%pFX", vrf_name,
    vrf_id, table_id, prefix.  This allows very easy grepping.

    Add OSPF_DEBUG_VRF() and OSPF_DEBUG_VRF_ID() to generate the
    vrf name, vrf id and table id arguments.  The Segment Routing
    and Traffic Engineering code only operates on the default vrf
    so use that for those debugs.

    ospf_prune_unreachable_networks() needs the ospf instance to
    output the vrf information so pass it in.

    Signed-off-by: Donald Sharp <sharpd@nvidia.com>

diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index f628711dc0..3c8367f72e 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -3118,14 +3118,14 @@ static void ospf6_aggr_handle_external_info(void *data)

 	rt->to_be_processed = true;

+	ospf6 = rt->ospf6;
+	assert(ospf6);
+
 	if (IS_OSPF6_DEBUG_ASBR || IS_OSPF6_DEBUG_ORIGINATE(AS_EXTERNAL))
 		zlog_debug("%s: Handle external route for origination/refresh (%pFX)",
 					__func__,
 					&rt->prefix);

-	ospf6 = rt->ospf6;
-	assert(ospf6);
-
 	aggr = ospf6_external_aggr_match(ospf6,
 					&rt->prefix);
 	if (aggr) {
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 7d13f463be..91953d9aff 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -743,8 +743,8 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,

 			if (!lsa) {
 				flog_warn(EC_OSPF_LSA_MISSING,
-					  "%s: Could not refresh %pFX to %pI4",
-					  __func__, (struct prefix *)p,
+					  "%s: Could not refresh (%s:%u:%u)%pFX to %pI4", __func__,
+					  OSPF_DEBUG_VRF(area->ospf), (struct prefix *)p,
 					  &area->area_id);
 				return;
 			}
@@ -760,9 +760,8 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,

 		if (!lsa) {
 			flog_warn(EC_OSPF_LSA_MISSING,
-				  "%s: Could not originate %pFX to %pi4",
-				  __func__, (struct prefix *)p,
-				  &area->area_id);
+				  "%s: Could not originate (%s:%u:%u)%pFX to %pi4", __func__,
+				  OSPF_DEBUG_VRF(area->ospf), (struct prefix *)p, &area->area_id);
 			return;
 		}

@@ -865,17 +864,15 @@ 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(
-					"%s: prefix %pFX was denied by import-list",
-					__func__, p);
+				zlog_debug("%s: prefix (%s:%u:%u)%pFX was denied by import-list",
+					   __func__, OSPF_DEBUG_VRF(area->ospf), p);
 			continue;
 		}

 		if (!ospf_abr_plist_in_check(area, or, p)) {
 			if (IS_DEBUG_OSPF_EVENT)
-				zlog_debug(
-					"%s: prefix %pFX was denied by prefix-list",
-					__func__, p);
+				zlog_debug("%s: prefix (%s:%u:%u)%pFX was denied by prefix-list",
+					   __func__, OSPF_DEBUG_VRF(area->ospf), p);
 			continue;
 		}

@@ -890,9 +887,8 @@ 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(
-					"%s: this is inter-area route to %pFX",
-					__func__, p);
+				zlog_debug("%s: this is inter-area route to (%s:%u:%u)%pFX",
+					   __func__, OSPF_DEBUG_VRF(area->ospf), p);

 			if (!OSPF_IS_AREA_BACKBONE(area))
 				ospf_abr_announce_network_to_area(p, or->cost,
@@ -901,9 +897,8 @@ 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(
-					"%s: this is intra-area route to %pFX",
-					__func__, p);
+				zlog_debug("%s: this is intra-area route to (%s:%u:%u)%pFX",
+					   __func__, OSPF_DEBUG_VRF(area->ospf), p);
 			if ((range = ospf_area_range_match(
 				     or_area, or_area->ranges, p)) &&
 			    !ospf_area_is_transit(area))
@@ -998,8 +993,8 @@ static void ospf_abr_process_network_rt(struct ospf *ospf,
 		}

 		if (IS_DEBUG_OSPF_EVENT)
-			zlog_debug("%s: this is a route to %pFX", __func__,
-				   &rn->p);
+			zlog_debug("%s: this is a route to (%s:%u:%u)%pFX", __func__,
+				   OSPF_DEBUG_VRF(ospf), &rn->p);
 		if (or->path_type >= OSPF_PATH_TYPE1_EXTERNAL) {
 			if (IS_DEBUG_OSPF_EVENT)
 				zlog_debug(
@@ -1115,8 +1110,8 @@ static void ospf_abr_announce_rtr_to_area(struct prefix_ipv4 *p, uint32_t cost,
 			lsa = ospf_summary_asbr_lsa_originate(p, cost, area);
 		if (!lsa) {
 			flog_warn(EC_OSPF_LSA_MISSING,
-				  "%s: Could not refresh/originate %pFX to %pI4",
-				  __func__, (struct prefix *)p,
+				  "%s: Could not refresh/originate (%s:%u:%u)%pFX to %pI4",
+				  __func__, OSPF_DEBUG_VRF(area->ospf), (struct prefix *)p,
 				  &area->area_id);
 			return;
 		}
@@ -1420,8 +1415,8 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf)
 				p.prefixlen = range->masklen;

 				if (IS_DEBUG_OSPF_EVENT)
-					zlog_debug("%s: this is range: %pFX",
-						   __func__, &p);
+					zlog_debug("%s: this is range: (%s:%u:%u)%pFX", __func__,
+						   OSPF_DEBUG_VRF(ospf), &p);

 				if (CHECK_FLAG(range->flags,
 					       OSPF_AREA_RANGE_SUBSTITUTE)) {
@@ -1504,8 +1499,8 @@ static void ospf_abr_send_nssa_aggregates(struct ospf *ospf)
 			p.prefixlen = range->masklen;

 			if (IS_DEBUG_OSPF_NSSA)
-				zlog_debug("%s: this is range: %pFX", __func__,
-					   &p);
+				zlog_debug("%s: this is range: (%s:%u:%u)%pFX", __func__,
+					   OSPF_DEBUG_VRF(ospf), &p);

 			if (ospf_area_range_active(range)
 			    && CHECK_FLAG(range->flags,
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c
index 665d2df5a7..301616b217 100644
--- a/ospfd/ospf_asbr.c
+++ b/ospfd/ospf_asbr.c
@@ -38,7 +38,8 @@ void ospf_external_route_remove(struct ospf *ospf, struct prefix_ipv4 *p)
 	rn = route_node_lookup(ospf->old_external_route, (struct prefix *)p);
 	if (rn)
 		if ((or = rn->info)) {
-			zlog_info("Route[%pFX]: external path deleted", p);
+			zlog_info("Route[(%s:%u:%u)%pFX]: external path deleted",
+				  OSPF_DEBUG_VRF(ospf), p);

 			/* Remove route from zebra. */
 			if (or->type == OSPF_DESTINATION_NETWORK)
@@ -53,7 +54,7 @@ void ospf_external_route_remove(struct ospf *ospf, struct prefix_ipv4 *p)
 			return;
 		}

-	zlog_info("Route[%pFX]: no such external path", p);
+	zlog_info("Route[(%s:%u:%u)%pFX]: no such external path", OSPF_DEBUG_VRF(ospf), p);
 }

 /* Add an External info for AS-external-LSA. */
@@ -121,10 +122,9 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
 		}

 		if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
-			zlog_debug(
-				"Redistribute[%s][%d][%u]: %pFX discarding old info with NH %pI4.",
-				ospf_redist_string(type), instance,
-				ospf->vrf_id, &p, &nexthop.s_addr);
+			zlog_debug("Redistribute[%s][%d][%u]: (%s:%u:%u)%pFX discarding old info with NH %pI4.",
+				   ospf_redist_string(type), instance, ospf->vrf_id,
+				   OSPF_DEBUG_VRF(ospf), &p, &nexthop.s_addr);
 		ospf_external_info_free(rn->info);
 	}

@@ -145,10 +145,9 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
 		rn->info = new;

 	if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
-		zlog_debug(
-			"Redistribute[%s][%u]: %pFX external info created, with NH %pI4, metric:%u",
-			ospf_redist_string(type), ospf->vrf_id, &p,
-			&nexthop.s_addr, metric);
+		zlog_debug("Redistribute[%s][%u]: (%s:%u:%u)%pFX external info created, with NH %pI4, metric:%u",
+			   ospf_redist_string(type), ospf->vrf_id, OSPF_DEBUG_VRF(ospf), &p,
+			   &nexthop.s_addr, metric);
 	}
 	return new;
 }
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index c5a6b3b4a2..0267f26955 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -377,8 +377,8 @@ int ospf_ase_calculate_route(struct ospf *ospf, struct ospf_lsa *lsa)

 	if (!rn || (or = rn->info) == NULL) {
 		if (IS_DEBUG_OSPF(lsa, LSA))
-			zlog_debug("Route[External]: Adding a new route %pFX with paths %u",
-				   &p, listcount(asbr_route->paths));
+			zlog_debug("Route[External]: Adding a new route (%s:%u:%u)%pFX with paths %u",
+				   OSPF_DEBUG_VRF(ospf), &p, listcount(asbr_route->paths));

 		ospf_route_add(ospf->new_external_route, &p, new, asbr_route);

diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index 20bcac7992..18e0aed912 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -504,7 +504,8 @@ uint32_t ospf_ext_schedule_prefix_index(struct interface *ifp, uint32_t index,
 		return rc;

 	if (p != NULL) {
-		osr_debug("EXT (%s): Schedule new prefix %pFX with index %u on interface %s", __func__, p, index, ifp->name);
+		osr_debug("EXT (%s): Schedule new prefix (%s:%u:%u)%pFX with index %u on interface %s",
+			  __func__, OSPF_DEBUG_VRF_ID(ifp->vrf->vrf_id), p, index, ifp->name);

 		/* Set first Extended Prefix then the Prefix SID information */
 		set_ext_prefix(exti, OSPF_PATH_INTRA_AREA, EXT_TLV_PREF_NFLG,
diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c
index 59112b2cd2..4120d627ff 100644
--- a/ospfd/ospf_ia.c
+++ b/ospfd/ospf_ia.c
@@ -60,7 +60,8 @@ static void ospf_ia_network_route(struct ospf *ospf, struct route_table *rt,
 	struct ospf_route * or ;

 	if (IS_DEBUG_OSPF_EVENT)
-		zlog_debug("%s: processing summary route to %pFX", __func__, p);
+		zlog_debug("%s: processing summary route to (%s:%u:%u)%pFX", __func__,
+			   OSPF_DEBUG_VRF(ospf), p);

 	/* Find a route to the same dest */
 	if ((rn1 = route_node_lookup(rt, (struct prefix *)p))) {
@@ -96,7 +97,8 @@ static void ospf_ia_network_route(struct ospf *ospf, struct route_table *rt,
 	}	 /*if (rn1)*/
 	else {    /* no route */
 		if (IS_DEBUG_OSPF_EVENT)
-			zlog_debug("%s: add new route to %pFX", __func__, p);
+			zlog_debug("%s: add new route to (%s:%u:%u)%pFX", __func__,
+				   OSPF_DEBUG_VRF(ospf), p);
 		ospf_route_add(rt, p, new_or, abr_or);
 	}
 }
@@ -111,7 +113,7 @@ static void ospf_ia_router_route(struct ospf *ospf, struct route_table *rtrs,
 	int ret;

 	if (IS_DEBUG_OSPF_EVENT)
-		zlog_debug("%s: considering %pFX", __func__, p);
+		zlog_debug("%s: considering (%s:%u:%u)%pFX", __func__, OSPF_DEBUG_VRF(ospf), p);

 	/* Find a route to the same dest */
 	rn = route_node_get(rtrs, (struct prefix *)p);
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 1c862ad954..8bf5acc046 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2632,9 +2632,8 @@ void ospf_nssa_lsa_flush(struct ospf *ospf, struct prefix_ipv4 *p)

 			if (!lsa) {
 				if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
-					zlog_debug(
-						"LSA: There is no such AS-NSSA-LSA %pFX in LSDB",
-						p);
+					zlog_debug("LSA: There is no such AS-NSSA-LSA (%s:%u:%u)%pFX in LSDB",
+						   OSPF_DEBUG_VRF(ospf), p);
 				continue;
 			}
 			ospf_ls_retransmit_delete_nbr_area(area, lsa);
@@ -2654,14 +2653,13 @@ void ospf_external_lsa_flush(struct ospf *ospf, uint8_t type,
 	struct ospf_lsa *lsa;

 	if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
-		zlog_debug("LSA: Flushing AS-external-LSA %pFX", p);
+		zlog_debug("LSA: Flushing AS-external-LSA (%s:%u:%u)%pFX", OSPF_DEBUG_VRF(ospf), p);

 	/* First lookup LSA from LSDB. */
 	if (!(lsa = ospf_external_info_find_lsa(ospf, p))) {
 		if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
-			zlog_debug(
-				"LSA: There is no such AS-external-LSA %pFX in LSDB",
-				p);
+			zlog_debug("LSA: There is no such AS-external-LSA (%s:%u:%u)%pFX in LSDB",
+				   OSPF_DEBUG_VRF(ospf), p);
 		/*
 		 * No Type-5 LSA found. This happens when the router is a pure
 		 * NSSA ASBR: ospf_external_lsa_originate() discards the Type-5
@@ -2759,7 +2757,8 @@ void ospf_external_lsa_refresh_type(struct ospf *ospf, uint8_t type, uint8_t ins
 			}

 			if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))
-				zlog_debug("%s: Send Aggreate LSA (%pFX)", __func__, &aggr->p);
+				zlog_debug("%s: Send Aggreate LSA ((%s:%u:%u)%pFX)", __func__,
+					   OSPF_DEBUG_VRF(ospf), &aggr->p);

 			ospf_originate_summary_lsa(ospf, aggr, ei);

@@ -4006,9 +4005,8 @@ enum lsid_status ospf_lsa_unique_id(struct ospf *ospf, struct ospf_lsdb *lsdb,
 		 */
 		if (ip_masklen(al->mask) == p->prefixlen) {
 			if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
-				zlog_debug(
-					"%s: Can't get Link State ID for %pFX",
-					__func__, p);
+				zlog_debug("%s: Can't get Link State ID for (%s:%u:%u)%pFX",
+					   __func__, OSPF_DEBUG_VRF(ospf), p);
 			/*	  id.s_addr = 0; */
 			id->s_addr = 0xffffffff;
 			return LSID_NOT_AVAILABLE;
@@ -4029,9 +4027,8 @@ enum lsid_status ospf_lsa_unique_id(struct ospf *ospf, struct ospf_lsdb *lsdb,
 						     ospf->router_id);
 			if (lsa) {
 				if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
-					zlog_debug(
-						"%s: Can't get Link State ID for %pFX",
-						__func__, p);
+					zlog_debug("%s: Can't get Link State ID for (%s:%u:%u)%pFX",
+						   __func__, OSPF_DEBUG_VRF(ospf), p);
 				id->s_addr = 0xffffffff;
 				return LSID_NOT_AVAILABLE;
 			}
@@ -4055,9 +4052,8 @@ enum lsid_status ospf_lsa_unique_id(struct ospf *ospf, struct ospf_lsdb *lsdb,
 						     ospf->router_id);
 			if (lsa && (ip_masklen(al->mask) != IPV4_MAX_BITLEN)) {
 				if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
-					zlog_debug(
-						"%s: Can't get Link State ID for %pFX",
-						__func__, p);
+					zlog_debug("%s: Can't get Link State ID for (%s:%u:%u)%pFX",
+						   __func__, OSPF_DEBUG_VRF(ospf), p);
 				id->s_addr = 0xffffffff;
 				return LSID_NOT_AVAILABLE;
 			}
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index a27924386f..4866ab866c 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -428,7 +428,8 @@ void ospf_intra_add_router(struct route_table *rt, struct vertex *v,
 	apply_mask_ipv4(&p);

 	if (IS_DEBUG_OSPF_EVENT)
-		zlog_debug("%s: talking about %pFX", __func__, &p);
+		zlog_debug("%s: talking about (%s:%u:%u)%pFX", __func__,
+			   OSPF_DEBUG_VRF(area->ospf), &p);

 	rn = route_node_get(rt, (struct prefix *)&p);

@@ -555,7 +556,8 @@ void ospf_intra_add_stub(struct route_table *rt, struct router_lsa_link *link,
 	apply_mask_ipv4(&p);

 	if (IS_DEBUG_OSPF_EVENT)
-		zlog_debug("%s: processing route to %pFX", __func__, &p);
+		zlog_debug("%s: processing route to (%s:%u:%u)%pFX", __func__,
+			   OSPF_DEBUG_VRF(area->ospf), &p);

 	/* (1) Calculate the distance D of stub network from the root.  D is
 	   equal to the distance from the root to the router vertex
@@ -967,7 +969,7 @@ void ospf_route_add(struct route_table *rt, struct prefix_ipv4 *p,
 	rn->info = new_or;
 }

-void ospf_prune_unreachable_networks(struct route_table *rt)
+void ospf_prune_unreachable_networks(struct ospf *ospf, struct route_table *rt)
 {
 	struct route_node *rn, *next;
 	struct ospf_route * or ;
@@ -981,8 +983,8 @@ void ospf_prune_unreachable_networks(struct route_table *rt)
 			or = rn->info;
 			if (listcount(or->paths) == 0) {
 				if (IS_DEBUG_OSPF_EVENT)
-					zlog_debug("Pruning route to %pFX",
-						   &rn->p);
+					zlog_debug("Pruning route to (%s:%u:%u)%pFX",
+						   OSPF_DEBUG_VRF(ospf), &rn->p);

 				ospf_route_free(or);
 				rn->info = NULL;
@@ -1079,7 +1081,7 @@ int ospf_add_discard_route(struct ospf *ospf, struct route_table *rt,
 	}

 	if (IS_DEBUG_OSPF_EVENT)
-		zlog_debug("%s: adding %pFX", __func__, p);
+		zlog_debug("%s: adding (%s:%u:%u)%pFX", __func__, OSPF_DEBUG_VRF(ospf), p);

 	new_or = ospf_route_new();
 	new_or->type = OSPF_DESTINATION_DISCARD;
@@ -1105,7 +1107,7 @@ void ospf_delete_discard_route(struct ospf *ospf, struct route_table *rt,
 	struct ospf_route *or;

 	if (IS_DEBUG_OSPF_EVENT)
-		zlog_debug("%s: deleting %pFX", __func__, p);
+		zlog_debug("%s: deleting (%s:%u:%u)%pFX", __func__, OSPF_DEBUG_VRF(ospf), p);

 	rn = route_node_lookup(rt, (struct prefix *)p);

diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h
index 4b61e6cc7d..2c8607f1f2 100644
--- a/ospfd/ospf_route.h
+++ b/ospfd/ospf_route.h
@@ -150,7 +150,7 @@ extern void ospf_route_add(struct route_table *rt, struct prefix_ipv4 *p,
 			   struct ospf_route *new_or, struct ospf_route *over);

 extern void ospf_route_subst_nexthops(struct ospf_route *to, struct list *from);
-extern void ospf_prune_unreachable_networks(struct route_table *rt);
+extern void ospf_prune_unreachable_networks(struct ospf *ospf, struct route_table *rt);
 extern void ospf_prune_unreachable_routers(struct route_table *rtrs);
 extern int ospf_add_discard_route(struct ospf *ospf, struct route_table *rt, struct ospf_area *area,
 				  struct prefix_ipv4 *p, bool check_subtree);
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 867a360e55..eee48fe392 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1876,7 +1876,7 @@ static void ospf_spf_calculate_schedule_worker(struct event *event)

 	/* Get rid of transit networks and routers we cannot reach anyway. */
 	monotime(&start_time);
-	ospf_prune_unreachable_networks(new_table);
+	ospf_prune_unreachable_networks(ospf, new_table);
 	if (all_rtrs)
 		ospf_prune_unreachable_routers(all_rtrs);
 	ospf_prune_unreachable_routers(new_rtrs);
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index 5195ae2f20..01a96eb5f0 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -777,7 +777,7 @@ static struct ospf_route *get_nexthop_by_addr(struct ospf *top,
 	if (top->new_table == NULL)
 		return NULL;

-	osr_debug("      |-  Search Nexthop for prefix %pFX",
+	osr_debug("      |-  Search Nexthop for prefix (%s:%u:%u)%pFX", OSPF_DEBUG_VRF(top),
 		  (struct prefix *)&p);

 	rn = route_node_lookup(top->new_table, (struct prefix *)&p);
@@ -898,8 +898,8 @@ static int compute_prefix_nhlfe(struct sr_prefix *srp)
 	struct sr_node *srnext;
 	int rc = -1;

-	osr_debug("    |-  Compute NHLFE for prefix %pFX",
-		  (struct prefix *)&srp->prefv4);
+	osr_debug("    |-  Compute NHLFE for prefix (%s:%u:%u)%pFX",
+		  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4);


 	/* First determine the nexthop */
@@ -1178,8 +1178,8 @@ static struct sr_prefix *get_ext_prefix_sid(struct tlv_header *tlvh,
 			sub_tlvh = TLV_HDR_NEXT(sub_tlvh);
 	}

-	osr_debug("  |-  Found SID %u for prefix %pFX", srp->sid,
-		  (struct prefix *)&srp->prefv4);
+	osr_debug("  |-  Found SID %u for prefix (%s:%u:%u)%pFX", srp->sid,
+		  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4);

 	return srp;
 }
@@ -2076,9 +2076,9 @@ void ospf_sr_update_local_prefix(struct interface *ifp, struct prefix *p)
 			srp->instance = ospf_ext_schedule_prefix_index(
 				ifp, srp->sid, &srp->prefv4, srp->flags);

-			osr_debug(
-				"  |-  Update Node SID %pFX - %u for self SR Node",
-				(struct prefix *)&srp->prefv4, srp->sid);
+			osr_debug("  |-  Update Node SID (%s:%u:%u)%pFX - %u for self SR Node",
+				  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4,
+				  srp->sid);

 			/* Install SID if NO-PHP is set and not EXPLICIT-NULL */
 			if (CHECK_FLAG(srp->flags, EXT_SUBTLV_PREFIX_SID_NPFLG)
@@ -2635,8 +2635,8 @@ DEFUN (sr_prefix_sid,
 		srp->nhlfe.label_out = MPLS_LABEL_IMPLICIT_NULL;
 	}

-	osr_debug("SR (%s): Add new index %u to Prefix %pFX", __func__, index,
-		  (struct prefix *)&srp->prefv4);
+	osr_debug("SR (%s): Add new index %u to Prefix (%s:%u:%u)%pFX", __func__, index,
+		  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4);

 	/* Get Interface and check if it is a Loopback */
 	ifp = if_lookup_prefix(&p, VRF_DEFAULT);
@@ -2649,9 +2649,8 @@ DEFUN (sr_prefix_sid,
 		 */
 		if (exist == NULL)
 			listnode_add(OspfSR.self->ext_prefix, srp);
-		zlog_info(
-			"Interface for prefix %pFX not found. Deferred LSA flooding",
-			&p);
+		zlog_info("Interface for prefix (%s:%u:%u)%pFX not found. Deferred LSA flooding",
+			  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), &p);
 		return CMD_SUCCESS;
 	}

diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index e9fb4943b6..d9fc953e23 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -1857,9 +1857,9 @@ static void ospf_te_update_subnet(struct ls_ted *ted, struct ls_vertex *vertex,
 		subnet = ls_subnet_add(ted, ls_pref);
 	}

-	ote_debug("    |- %s subnet %pFX with metric %d",
-		  subnet->status == NEW ? "Add" : "Update", &subnet->key,
-		  ls_pref->metric);
+	ote_debug("    |- %s subnet (%s:%u:%u)%pFX with metric %d",
+		  subnet->status == NEW ? "Add" : "Update", OSPF_DEBUG_VRF_ID(VRF_DEFAULT),
+		  &subnet->key, ls_pref->metric);

 	/* Export Link State Subnet */
 	ospf_te_export(LS_MSG_TYPE_PREFIX, subnet);
@@ -1882,7 +1882,8 @@ static void ospf_te_delete_subnet(struct ls_ted *ted, struct in_addr addr)
 	p.family = AF_INET;
 	p.prefixlen = IPV4_MAX_BITLEN;
 	p.u.prefix4 = addr;
-	ote_debug("  |- Delete Subnet info. for Prefix %pFX", &p);
+	ote_debug("  |- Delete Subnet info. for Prefix (%s:%u:%u)%pFX",
+		  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), &p);
 	subnet = ls_find_subnet(ted, &p);

 	/* Remove subnet if found */
@@ -2893,8 +2894,8 @@ static int ospf_te_parse_ext_pref(struct ls_ted *ted, struct ospf_lsa *lsa)
 		subnet = ls_subnet_add(ted, ls_pref);
 	}

-	ote_debug("  |- Process Extended Prefix LSA %pI4 for subnet %pFX",
-		  &lsa->data->id, &pref);
+	ote_debug("  |- Process Extended Prefix LSA %pI4 for subnet (%s:%u:%u)%pFX",
+		  &lsa->data->id, OSPF_DEBUG_VRF_ID(VRF_DEFAULT), &pref);

 	/*
 	 * Check Extended Prefix TLV size against LSA size
@@ -2938,9 +2939,9 @@ static int ospf_te_parse_ext_pref(struct ls_ted *ted, struct ospf_lsa *lsa)

 	/* Export Subnet if needed */
 	if (subnet->status == NEW || subnet->status == UPDATE) {
-		ote_debug("  |- %s SID %d to subnet %pFX",
-			  subnet->status == NEW ? "Add" : "Update",
-			  ls_pref->sr.sid, &ls_pref->pref);
+		ote_debug("  |- %s SID %d to subnet (%s:%u:%u)%pFX",
+			  subnet->status == NEW ? "Add" : "Update", ls_pref->sr.sid,
+			  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), &ls_pref->pref);

 		ospf_te_export(LS_MSG_TYPE_PREFIX, subnet);
 		subnet->status = SYNC;
@@ -2996,8 +2997,8 @@ static int ospf_te_delete_ext_pref(struct ls_ted *ted, struct ospf_lsa *lsa)
 	if (!subnet)
 		return -1;

-	ote_debug("  |- Delete SID %d to subnet %pFX", subnet->ls_pref->sr.sid,
-		  &subnet->ls_pref->pref);
+	ote_debug("  |- Delete SID %d to subnet (%s:%u:%u)%pFX", subnet->ls_pref->sr.sid,
+		  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), &subnet->ls_pref->pref);

 	/* Remove Segment Routing information */
 	ls_pref = subnet->ls_pref;
diff --git a/ospfd/ospf_ti_lfa.c b/ospfd/ospf_ti_lfa.c
index 9b8b2fd4d6..1ab5ef44a5 100644
--- a/ospfd/ospf_ti_lfa.c
+++ b/ospfd/ospf_ti_lfa.c
@@ -1002,10 +1002,9 @@ void ospf_ti_lfa_insert_backup_paths(struct ospf_area *area,
 				continue;

 			if (IS_DEBUG_OSPF_TI_LFA)
-				zlog_debug(
-					"%s: attempting to insert backup path for prefix %pFX, router id %pI4 and nexthop %pI4.",
-					__func__, &rn->p, &path->adv_router,
-					&path->nexthop);
+				zlog_debug("%s: attempting to insert backup path for prefix (%s:%u:%u)%pFX, router id %pI4 and nexthop %pI4.",
+					   __func__, OSPF_DEBUG_VRF(area->ospf), &rn->p,
+					   &path->adv_router, &path->nexthop);

 			p_space = ospf_ti_lfa_get_p_space_by_path(area, path);
 			if (!p_space) {
@@ -1059,18 +1058,14 @@ void ospf_ti_lfa_insert_backup_paths(struct ospf_area *area,
 					path->srni.backup_label_stack->label,
 					label_buf, MPLS_LABEL_STRLEN, 0, true);
 				if (IS_DEBUG_OSPF_TI_LFA)
-					zlog_debug(
-						"%s: inserted backup path %s for prefix %pFX, router id %pI4 and nexthop %pI4.",
-						__func__, label_buf, &rn->p,
-						&path->adv_router,
-						&path->nexthop);
+					zlog_debug("%s: inserted backup path %s for prefix (%s:%u:%u)%pFX, router id %pI4 and nexthop %pI4.",
+						   __func__, label_buf, OSPF_DEBUG_VRF(area->ospf),
+						   &rn->p, &path->adv_router, &path->nexthop);
 			} else {
 				if (IS_DEBUG_OSPF_TI_LFA)
-					zlog_debug(
-						"%s: inserted NO backup path for prefix %pFX, router id %pI4 and nexthop %pI4.",
-						__func__, &rn->p,
-						&path->adv_router,
-						&path->nexthop);
+					zlog_debug("%s: inserted NO backup path for prefix (%s:%u:%u)%pFX, router id %pI4 and nexthop %pI4.",
+						   __func__, OSPF_DEBUG_VRF(area->ospf), &rn->p,
+						   &path->adv_router, &path->nexthop);
 			}
 		}
 	}
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 85e980bba0..aca908db19 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -61,8 +61,8 @@ static int ospf_router_id_update_zebra(ZAPI_CALLBACK_ARGS)
 	zebra_router_id_update_read(zclient->ibuf, &router_id);

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE))
-		zlog_debug("Zebra rcvd: router id update %pFX vrf %s id %u",
-			   &router_id, ospf_vrf_id_to_name(vrf_id), vrf_id);
+		zlog_debug("Zebra rcvd: router id update (%s:%u:%u)%pFX",
+			   OSPF_DEBUG_VRF_ID(vrf_id), &router_id);

 	ospf = ospf_lookup_by_vrf_id(vrf_id);

@@ -71,10 +71,8 @@ static int ospf_router_id_update_zebra(ZAPI_CALLBACK_ARGS)
 		ospf_router_id_update(ospf);
 	} else {
 		if (IS_DEBUG_OSPF_EVENT)
-			zlog_debug(
-				"%s: ospf instance not found for vrf %s id %u router_id %pFX",
-				__func__, ospf_vrf_id_to_name(vrf_id), vrf_id,
-				&router_id);
+			zlog_debug("%s: ospf instance not found for router_id (%s:%u:%u)%pFX",
+				   __func__, OSPF_DEBUG_VRF_ID(vrf_id), &router_id);
 	}
 	return 0;
 }
@@ -91,9 +89,8 @@ static int ospf_interface_address_add(ZAPI_CALLBACK_ARGS)
 		return 0;

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE))
-		zlog_debug("Zebra: interface %s address add %pFX vrf %s id %u",
-			   c->ifp->name, c->address,
-			   ospf_vrf_id_to_name(vrf_id), vrf_id);
+		zlog_debug("Zebra: interface %s address add (%s:%u:%u)%pFX", c->ifp->name,
+			   OSPF_DEBUG_VRF_ID(vrf_id), c->address);

 	ospf = ospf_lookup_by_vrf_id(vrf_id);
 	if (!ospf)
@@ -120,9 +117,8 @@ static int ospf_interface_address_delete(ZAPI_CALLBACK_ARGS)
 		return 0;

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE))
-		zlog_debug("Zebra: interface %s address delete %pFX vrf %s id %u",
-			   c->ifp->name, c->address,
-			   ospf_vrf_id_to_name(vrf_id), vrf_id);
+		zlog_debug("Zebra: interface %s address delete (%s:%u:%u)%pFX", c->ifp->name,
+			   OSPF_DEBUG_VRF_ID(vrf_id), c->address);

 	ifp = c->ifp;
 	p = *c->address;
@@ -270,8 +266,8 @@ void ospf_zebra_add(struct ospf *ospf, struct prefix_ipv4 *p,

 	if (ospf->gr_info.restart_in_progress) {
 		if (IS_DEBUG_OSPF_GR)
-			zlog_debug("Zebra: Graceful Restart in progress -- not installing %pFX(%s)",
-				   p, ospf_vrf_id_to_name(ospf->vrf_id));
+			zlog_debug("Zebra: Graceful Restart in progress -- not installing (%s:%u:%u)%pFX",
+				   OSPF_DEBUG_VRF(ospf), p);
 		return;
 	}

@@ -340,9 +336,8 @@ void ospf_zebra_add(struct ospf *ospf, struct prefix_ipv4 *p,

 			ifp = if_lookup_by_index(path->ifindex, ospf->vrf_id);

-			zlog_debug("Zebra: Route add %pFX(%s) nexthop %pI4, ifindex=%d %s",
-				   p, ospf_vrf_id_to_name(ospf->vrf_id),
-				   &path->nexthop, path->ifindex,
+			zlog_debug("Zebra: Route add (%s:%u:%u)%pFX nexthop %pI4, ifindex=%d %s",
+				   OSPF_DEBUG_VRF(ospf), p, &path->nexthop, path->ifindex,
 				   ifp ? ifp->name : " ");
 		}
 	}
@@ -360,8 +355,8 @@ void ospf_zebra_delete(struct ospf *ospf, struct prefix_ipv4 *p,

 	if (ospf->gr_info.restart_in_progress) {
 		if (IS_DEBUG_OSPF_GR)
-			zlog_debug("Zebra: Graceful Restart in progress -- not uninstalling %pFX(%s)",
-				   p, ospf_vrf_id_to_name(ospf->vrf_id));
+			zlog_debug("Zebra: Graceful Restart in progress -- not uninstalling (%s:%u:%u)%pFX",
+				   OSPF_DEBUG_VRF(ospf), p);
 		return;
 	}

@@ -373,8 +368,7 @@ void ospf_zebra_delete(struct ospf *ospf, struct prefix_ipv4 *p,
 	memcpy(&api.prefix, p, sizeof(*p));

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
-		zlog_debug("Zebra: Route delete %pFX(%s)", p,
-			   ospf_vrf_id_to_name(ospf->vrf_id));
+		zlog_debug("Zebra: Route delete (%s:%u:%u)%pFX", OSPF_DEBUG_VRF(ospf), p);

 	zclient_route_send(ZEBRA_ROUTE_DELETE, ospf_zclient, &api);
 }
@@ -385,8 +379,8 @@ void ospf_zebra_add_discard(struct ospf *ospf, struct prefix_ipv4 *p)

 	if (ospf->gr_info.restart_in_progress) {
 		if (IS_DEBUG_OSPF_GR)
-			zlog_debug("Zebra: Graceful Restart in progress -- not installing %pFX(%s)",
-				   p, ospf_vrf_id_to_name(ospf->vrf_id));
+			zlog_debug("Zebra: Graceful Restart in progress -- not installing (%s:%u:%u)%pFX",
+				   OSPF_DEBUG_VRF(ospf), p);
 		return;
 	}

@@ -401,8 +395,7 @@ void ospf_zebra_add_discard(struct ospf *ospf, struct prefix_ipv4 *p)
 	zclient_route_send(ZEBRA_ROUTE_ADD, ospf_zclient, &api);

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
-		zlog_debug("Zebra: Route add discard %pFX(%s)", p,
-			   ospf_vrf_id_to_name(ospf->vrf_id));
+		zlog_debug("Zebra: Route add discard (%s:%u:%u)%pFX", OSPF_DEBUG_VRF(ospf), p);
 }

 void ospf_zebra_delete_discard(struct ospf *ospf, struct prefix_ipv4 *p)
@@ -411,8 +404,8 @@ void ospf_zebra_delete_discard(struct ospf *ospf, struct prefix_ipv4 *p)

 	if (ospf->gr_info.restart_in_progress) {
 		if (IS_DEBUG_OSPF_GR)
-			zlog_debug("Zebra: Graceful Restart in progress -- not uninstalling %pFX(%s)",
-				   p, ospf_vrf_id_to_name(ospf->vrf_id));
+			zlog_debug("Zebra: Graceful Restart in progress -- not uninstalling (%s:%u:%u)%pFX",
+				   OSPF_DEBUG_VRF(ospf), p);
 		return;
 	}

@@ -427,8 +420,7 @@ void ospf_zebra_delete_discard(struct ospf *ospf, struct prefix_ipv4 *p)
 	zclient_route_send(ZEBRA_ROUTE_DELETE, ospf_zclient, &api);

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
-		zlog_debug("Zebra: Route delete discard %pFX(%s)", p,
-			   ospf_vrf_id_to_name(ospf->vrf_id));
+		zlog_debug("Zebra: Route delete discard (%s:%u:%u)%pFX", OSPF_DEBUG_VRF(ospf), p);
 }

 struct ospf_external *ospf_external_lookup(struct ospf *ospf, uint8_t type,
@@ -615,8 +607,8 @@ void ospf_zebra_update_prefix_sid(const struct sr_prefix *srp)
 		znh->label_num = 1;
 		znh->labels[0] = srp->nhlfe.label_out;

-		osr_debug("SR (%s): Configure Prefix %pFX with labels %u/%u",
-			  __func__, (struct prefix *)&srp->prefv4,
+		osr_debug("SR (%s): Configure Prefix (%s:%u:%u)%pFX with labels %u/%u", __func__,
+			  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4,
 			  srp->label_in, srp->nhlfe.label_out);

 		break;
@@ -635,8 +627,8 @@ void ospf_zebra_update_prefix_sid(const struct sr_prefix *srp)
 			return;
 		}

-		osr_debug("SR (%s): Configure Prefix %pFX with",
-			  __func__, (struct prefix *)&srp->prefv4);
+		osr_debug("SR (%s): Configure Prefix (%s:%u:%u)%pFX with", __func__,
+			  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4);

 		for (ALL_LIST_ELEMENTS_RO(srp->route->paths, node, path)) {
 			if (path->srni.label_out == MPLS_INVALID_LABEL)
@@ -711,8 +703,8 @@ void ospf_zebra_delete_prefix_sid(const struct sr_prefix *srp)
 {
 	struct zapi_labels zl;

-	osr_debug("SR (%s): Delete Labels %u for Prefix %pFX", __func__,
-		  srp->label_in, (struct prefix *)&srp->prefv4);
+	osr_debug("SR (%s): Delete Labels %u for Prefix (%s:%u:%u)%pFX", __func__, srp->label_in,
+		  OSPF_DEBUG_VRF_ID(VRF_DEFAULT), (struct prefix *)&srp->prefv4);

 	/* Prepare message. */
 	memset(&zl, 0, sizeof(zl));
@@ -1205,10 +1197,9 @@ int ospf_redistribute_check(struct ospf *ospf, struct external_info *ei,
 			if (access_list_apply(DISTRIBUTE_LIST(ospf, type), p)
 			    == FILTER_DENY) {
 				if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
-					zlog_debug("Redistribute[%s]: %pFX(%s) filtered by distribute-list.",
-						   ospf_redist_string(type), p,
-						   ospf_vrf_id_to_name(
-							   ospf->vrf_id));
+					zlog_debug("Redistribute[%s]: (%s:%u:%u)%pFX filtered by distribute-list.",
+						   ospf_redist_string(type), OSPF_DEBUG_VRF(ospf),
+						   p);
 				return 0;
 			}

@@ -1229,9 +1220,8 @@ int ospf_redistribute_check(struct ospf *ospf, struct external_info *ei,
 		if (ret == RMAP_DENYMATCH) {
 			ei->route_map_set = save_values;
 			if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
-				zlog_debug("Redistribute[%s]: %pFX(%s) filtered by route-map.",
-					   ospf_redist_string(type), p,
-					   ospf_vrf_id_to_name(ospf->vrf_id));
+				zlog_debug("Redistribute[%s]: (%s:%u:%u)%pFX filtered by route-map.",
+					   ospf_redist_string(type), OSPF_DEBUG_VRF(ospf), p);
 			return 0;
 		}

@@ -1355,9 +1345,9 @@ static int ospf_zebra_read_route(ZAPI_CALLBACK_ARGS)
 		rt_type = DEFAULT_ROUTE;

 	if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
-		zlog_debug("%s: cmd %s from client %s-%d: vrf %s(%u), p %pFX, metric %d", __func__,
+		zlog_debug("%s: cmd %s from client %s-%d: (%s:%u:%u)%pFX, metric %d", __func__,
 			   zserv_command_string(cmd), zebra_route_string(api.type), api.instance,
-			   ospf_vrf_id_to_name(vrf_id), vrf_id, &api.prefix, api.metric);
+			   OSPF_DEBUG_VRF_ID(vrf_id), &api.prefix, api.metric);

 	if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD) {
 		/* XXX|HACK|TODO|FIXME:
@@ -1566,9 +1556,8 @@ void ospf_zebra_import_default_route(struct ospf *ospf, bool unreg)
 		command = ZEBRA_NEXTHOP_REGISTER;

 	if (IS_DEBUG_OSPF(zebra, ZEBRA))
-		zlog_debug("%s: sending cmd %s for %pFX(%s)", __func__,
-			   zserv_command_string(command), &prefix,
-			   ospf_vrf_id_to_name(ospf->vrf_id));
+		zlog_debug("%s: sending cmd %s for (%s:%u:%u)%pFX", __func__,
+			   zserv_command_string(command), OSPF_DEBUG_VRF(ospf), &prefix);

 	if (zclient_send_rnh(ospf_zclient, command, &prefix, SAFI_UNICAST, false,
 			     true, ospf->vrf_id) == ZCLIENT_SEND_FAILURE)
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 96b4ccb170..cf5e52d83f 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -2431,6 +2431,13 @@ const char *ospf_vrf_id_to_name(vrf_id_t vrf_id)
 	return vrf ? vrf->name : "NIL";
 }

+uint32_t ospf_vrf_id_to_table_id(vrf_id_t vrf_id)
+{
+	struct vrf *vrf = vrf_lookup_by_id(vrf_id);
+
+	return vrf ? vrf->data.l.table_id : 0;
+}
+
 const char *ospf_get_name(const struct ospf *ospf)
 {
 	if (ospf->name)
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index 7976611263..9d1c530fec 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -806,6 +806,21 @@ extern void ospf_vrf_terminate(void);
 extern void ospf_vrf_link(struct ospf *ospf, struct vrf *vrf);
 extern void ospf_vrf_unlink(struct ospf *ospf, struct vrf *vrf);
 const char *ospf_vrf_id_to_name(vrf_id_t vrf_id);
+uint32_t ospf_vrf_id_to_table_id(vrf_id_t vrf_id);
+
+/*
+ * Arguments for the "(%s:%u:%u)" vrf name, vrf id, table id prefix
+ * used in front of a prefix in debugs.  For example:
+ *
+ *   zlog_debug("route (%s:%u:%u)%pFX", OSPF_DEBUG_VRF(ospf), p);
+ *
+ * Note that the argument is evaluated more than once.
+ */
+#define OSPF_DEBUG_VRF(ospf) OSPF_DEBUG_VRF_ID((ospf)->vrf_id)
+
+/* Same as above, but for when only the vrf id is available. */
+#define OSPF_DEBUG_VRF_ID(vrf_id)                                                                 \
+	ospf_vrf_id_to_name(vrf_id), (vrf_id), ospf_vrf_id_to_table_id(vrf_id)
 int ospf_area_nssa_no_summary_set(struct ospf *ospf, struct in_addr area_id);

 const char *ospf_get_name(const struct ospf *ospf);