From: Everton Marques Date: Mon, 22 Sep 2014 22:35:51 +0000 (-0300) Subject: zebra: add rib_match_ipv4_safi() X-Git-Tag: frr-2.0-rc1~884 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=492dadb218a7a7bff06b6d129b24b5190a572180;p=mirror%2Ffrr.git zebra: add rib_match_ipv4_safi() This is the same as rib_lookup_ipv4(), without the SAFI hardcoded. Cc: Balaji G Cc: Everton Marques Signed-off-by: David Lamparter --- diff --git a/zebra/rib.h b/zebra/rib.h index 95c6a506c8..0d5c902eb3 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -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); diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 7c4df351f4..6c6db170e3 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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; diff --git a/zebra/zserv.c b/zebra/zserv.c index d6de0792e1..6370508da0 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -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;