mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
zebra: add rib_match_ipv4_safi()
This is the same as rib_lookup_ipv4(), without the SAFI hardcoded. Cc: Balaji G <balajig81@gmail.com> Cc: Everton Marques <everton.marques@gmail.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
cb65349115
commit
492dadb218
@ -369,7 +369,7 @@ extern int rib_delete_ipv4 (int type, u_short instance, int flags, struct prefix
|
|||||||
struct in_addr *gate, unsigned int ifindex,
|
struct in_addr *gate, unsigned int ifindex,
|
||||||
vrf_id_t, u_int32_t, safi_t safi);
|
vrf_id_t, u_int32_t, safi_t safi);
|
||||||
|
|
||||||
extern struct rib *rib_match_ipv4 (struct in_addr, vrf_id_t);
|
extern struct rib *rib_match_ipv4 (struct in_addr, safi_t safi, vrf_id_t);
|
||||||
|
|
||||||
extern struct rib *rib_lookup_ipv4 (struct prefix_ipv4 *, vrf_id_t);
|
extern struct rib *rib_lookup_ipv4 (struct prefix_ipv4 *, vrf_id_t);
|
||||||
|
|
||||||
|
@ -733,7 +733,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct rib *
|
struct rib *
|
||||||
rib_match_ipv4 (struct in_addr addr, vrf_id_t vrf_id)
|
rib_match_ipv4 (struct in_addr addr, safi_t safi, vrf_id_t vrf_id)
|
||||||
{
|
{
|
||||||
struct prefix_ipv4 p;
|
struct prefix_ipv4 p;
|
||||||
struct route_table *table;
|
struct route_table *table;
|
||||||
@ -743,7 +743,7 @@ rib_match_ipv4 (struct in_addr addr, vrf_id_t vrf_id)
|
|||||||
int recursing;
|
int recursing;
|
||||||
|
|
||||||
/* Lookup table. */
|
/* Lookup table. */
|
||||||
table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
|
table = zebra_vrf_table (AFI_IP, safi, vrf_id);
|
||||||
if (! table)
|
if (! table)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ zsend_ipv4_nexthop_lookup (struct zserv *client, struct in_addr addr,
|
|||||||
struct nexthop *nexthop;
|
struct nexthop *nexthop;
|
||||||
|
|
||||||
/* Lookup nexthop. */
|
/* Lookup nexthop. */
|
||||||
rib = rib_match_ipv4 (addr, vrf_id);
|
rib = rib_match_ipv4 (addr, SAFI_UNICAST, vrf_id);
|
||||||
|
|
||||||
/* Get output stream. */
|
/* Get output stream. */
|
||||||
s = client->obuf;
|
s = client->obuf;
|
||||||
|
Loading…
Reference in New Issue
Block a user