Browse Source

zebra: kill rib_match_ipv4()

Since this function is internal to zebra, there is no reason to keep
this one-line indirect wrapper to rib_match_ipv4_safi() around.

Cc: Everton Marques <everton.marques@gmail.com>
Cc: Balaji G <balajig81@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter 5 years ago
parent
commit
f598cf7ecc
3 changed files with 2 additions and 9 deletions
  1. 0 1
      zebra/rib.h
  2. 0 6
      zebra/zebra_rib.c
  3. 2 2
      zebra/zserv.c

+ 0 - 1
zebra/rib.h

@@ -418,7 +418,6 @@ extern int rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p,
 		            struct in_addr *gate, unsigned int ifindex, 
 		            u_int32_t, safi_t safi);
 
-extern struct rib *rib_match_ipv4 (struct in_addr);
 extern struct rib *rib_match_ipv4_safi (struct in_addr addr, safi_t safi, int skip_bgp);
 
 extern struct rib *rib_lookup_ipv4 (struct prefix_ipv4 *);

+ 0 - 6
zebra/zebra_rib.c

@@ -719,12 +719,6 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
 #endif /* HAVE_IPV6 */
 
 struct rib *
-rib_match_ipv4 (struct in_addr addr)
-{
-  return rib_match_ipv4_safi (addr, SAFI_UNICAST, 1);
-}
-
-struct rib *
 rib_match_ipv4_safi (struct in_addr addr, safi_t safi, int skip_bgp)
 {
   struct route_table *table;

+ 2 - 2
zebra/zserv.c

@@ -539,8 +539,8 @@ zsend_ipv4_nexthop_lookup (struct zserv *client, struct in_addr addr)
   u_char num;
   struct nexthop *nexthop;
 
-  /* Lookup nexthop. */
-  rib = rib_match_ipv4 (addr);
+  /* Lookup nexthop - eBGP excluded */
+  rib = rib_match_ipv4_safi (addr, SAFI_UNICAST, 1);
 
   /* Get output stream. */
   s = client->obuf;