]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Delete rib_lookup_and_dump since it is not used 9304/head
authorDonald Sharp <sharpd@nvidia.com>
Thu, 5 Aug 2021 19:04:56 +0000 (15:04 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 6 Aug 2021 14:04:40 +0000 (10:04 -0400)
The rib_lookup_and_dump function is never used, remove

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/rib.h
zebra/zebra_rib.c

index 9e913f718390795bbdf7a3320707775c2a36c746..44c44b9948111b00b62a886d43449e678252b4b4 100644 (file)
@@ -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
index 9a697e1cd8819cae2a0bb9e5bd69851d8338ada7..23d984d2e5318e1b7f5531e212077913ce956890 100644 (file)
@@ -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