From: Donald Sharp Date: Thu, 5 Aug 2021 19:04:56 +0000 (-0400) Subject: zebra: Delete rib_lookup_and_dump since it is not used X-Git-Tag: base_8.1~208^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=572bc3167f29428ba6a8b12425f5aef9a1e375f9;p=mirror%2Ffrr.git zebra: Delete rib_lookup_and_dump since it is not used The rib_lookup_and_dump function is never used, remove Signed-off-by: Donald Sharp --- diff --git a/zebra/rib.h b/zebra/rib.h index 9e913f7183..44c44b9948 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -371,8 +371,6 @@ extern void _route_entry_dump(const char *func, union prefixconstptr pp, union prefixconstptr src_pp, const struct route_entry *re); -extern void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id); - #define ZEBRA_RIB_LOOKUP_ERROR -1 #define ZEBRA_RIB_FOUND_EXACT 0 #define ZEBRA_RIB_FOUND_NOGATE 1 diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 9a697e1cd8..23d984d2e5 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -3273,55 +3273,6 @@ void _route_entry_dump(const char *func, union prefixconstptr pp, zlog_debug("%s: dump complete", straddr); } -/* - * This is an exported helper to rtm_read() to dump the strange - * RE entry found by rib_lookup_ipv4_route() - */ -void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id) -{ - struct route_table *table; - struct route_node *rn; - struct route_entry *re; - struct vrf *vrf; - - vrf = vrf_lookup_by_id(vrf_id); - - /* Lookup table. */ - table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id); - if (!table) { - flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED, - "%s:%s(%u) zebra_vrf_table() returned NULL", __func__, - VRF_LOGNAME(vrf), vrf_id); - return; - } - - /* Scan the RIB table for exactly matching RE entry. */ - rn = route_node_lookup(table, (struct prefix *)p); - - /* No route for this prefix. */ - if (!rn) { - zlog_debug("%s:%s(%u) lookup failed for %pFX", __func__, - VRF_LOGNAME(vrf), vrf_id, (struct prefix *)p); - return; - } - - /* Unlock node. */ - route_unlock_node(rn); - - /* let's go */ - RNODE_FOREACH_RE (rn, re) { - zlog_debug("%s:%s(%u) rn %p, re %p: %s, %s", __func__, - VRF_LOGNAME(vrf), vrf_id, (void *)rn, (void *)re, - (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED) - ? "removed" - : "NOT removed"), - (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED) - ? "selected" - : "NOT selected")); - route_entry_dump(p, NULL, re); - } -} - /* * Internal route-add implementation; there are a couple of different public * signatures. Callers in this path are responsible for the memory they