mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 01:42:48 +00:00
zebra: Expose vrf lookup by table id out of rt_netlink.c
The function rt_netlink.c is using to lookup the vrf by passed in table id. I'm also going to pretend that this function is not so awful to run when we have a large number of routes incoming. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
0f90b81558
commit
9d866c07c8
@ -290,7 +290,7 @@ static inline int proto2zebra(int proto, int family, bool is_nexthop)
|
||||
/*
|
||||
Pending: create an efficient table_id (in a tree/hash) based lookup)
|
||||
*/
|
||||
static vrf_id_t vrf_lookup_by_table(uint32_t table_id, ns_id_t ns_id)
|
||||
vrf_id_t vrf_lookup_by_table(uint32_t table_id, ns_id_t ns_id)
|
||||
{
|
||||
struct vrf *vrf;
|
||||
struct zebra_vrf *zvrf;
|
||||
|
@ -92,6 +92,7 @@ extern int netlink_macfdb_read_specific_mac(struct zebra_ns *zns,
|
||||
struct ethaddr *mac, uint16_t vid);
|
||||
extern int netlink_neigh_read_specific_ip(struct ipaddr *ip,
|
||||
struct interface *vlan_if);
|
||||
extern vrf_id_t vrf_lookup_by_table(uint32_t table_id, ns_id_t ns_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user