diff options
author | Donna Sharp <dksharp5@gmail.com> | 2024-10-07 00:41:09 +0200 |
---|---|---|
committer | Donna Sharp <dksharp5@gmail.com> | 2024-10-07 00:53:11 +0200 |
commit | 8eb5f4f5069d5b5be4673b4b3f8a72efa4c51fb6 (patch) | |
tree | 82220ef0a5561704bb6337d895e59e7773ce462c /zebra | |
parent | Merge pull request #17010 from anlancs/fix/tools-pim-interface-wrong-2 (diff) | |
download | frr-8eb5f4f5069d5b5be4673b4b3f8a72efa4c51fb6.tar.xz frr-8eb5f4f5069d5b5be4673b4b3f8a72efa4c51fb6.zip |
zebra: remove unused function rib_lookup_ipv4
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/rib.h | 3 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 39 |
2 files changed, 0 insertions, 42 deletions
diff --git a/zebra/rib.h b/zebra/rib.h index 071cc7b3d..5fedb0733 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -408,9 +408,6 @@ extern struct route_entry *rib_match_multicast(afi_t afi, vrf_id_t vrf_id, union g_addr *gaddr, struct route_node **rn_out); -extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p, - vrf_id_t vrf_id); - extern void rib_update(enum rib_update_event event); extern void rib_update_table(struct route_table *table, enum rib_update_event event, int rtype); diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 721eca70a..2d2be4fc7 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -611,45 +611,6 @@ struct route_entry *rib_match_multicast(afi_t afi, vrf_id_t vrf_id, return re; } -struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p, vrf_id_t vrf_id) -{ - struct route_table *table; - struct route_node *rn; - struct route_entry *match = NULL; - rib_dest_t *dest; - - /* Lookup table. */ - table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id); - if (!table) - return 0; - - rn = route_node_lookup(table, (struct prefix *)p); - - /* No route for this prefix. */ - if (!rn) - return NULL; - - /* Unlock node. */ - route_unlock_node(rn); - dest = rib_dest_from_rnode(rn); - - if (dest && dest->selected_fib - && !CHECK_FLAG(dest->selected_fib->status, ROUTE_ENTRY_REMOVED)) - match = dest->selected_fib; - - if (!match) - return NULL; - - if (match->type == ZEBRA_ROUTE_CONNECT || - match->type == ZEBRA_ROUTE_LOCAL) - return match; - - if (CHECK_FLAG(match->status, ROUTE_ENTRY_INSTALLED)) - return match; - - return NULL; -} - /* * Is this RIB labeled-unicast? It must be of type BGP and all paths * (nexthops) must have a label. |