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:
Everton Marques 2014-09-22 19:35:51 -03:00 committed by Donald Sharp
parent cb65349115
commit 492dadb218
3 changed files with 4 additions and 4 deletions

View File

@ -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,
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);

View File

@ -733,7 +733,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
}
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 route_table *table;
@ -743,7 +743,7 @@ rib_match_ipv4 (struct in_addr addr, vrf_id_t vrf_id)
int recursing;
/* Lookup table. */
table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
table = zebra_vrf_table (AFI_IP, safi, vrf_id);
if (! table)
return 0;

View File

@ -788,7 +788,7 @@ zsend_ipv4_nexthop_lookup (struct zserv *client, struct in_addr addr,
struct nexthop *nexthop;
/* Lookup nexthop. */
rib = rib_match_ipv4 (addr, vrf_id);
rib = rib_match_ipv4 (addr, SAFI_UNICAST, vrf_id);
/* Get output stream. */
s = client->obuf;