]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Remove not used bgp_find_nexthop() function
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 8 Nov 2019 13:04:29 +0000 (15:04 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 8 Nov 2019 13:04:29 +0000 (15:04 +0200)
Seems like a dead code.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_nht.c
bgpd/bgp_nht.h
doc/developer/next-hop-tracking.rst

index 74c45ed447686f3c01570b38dbbf3e1f32c36370..b08179a655710514bc9efa8289689e09cd543a5f 100644 (file)
@@ -65,27 +65,6 @@ static int bgp_isvalid_labeled_nexthop(struct bgp_nexthop_cache *bnc)
                || (bnc && CHECK_FLAG(bnc->flags, BGP_NEXTHOP_LABELED_VALID)));
 }
 
-int bgp_find_nexthop(struct bgp_path_info *path, int connected)
-{
-       struct bgp_nexthop_cache *bnc = path->nexthop;
-
-       if (!bnc)
-               return 0;
-
-       /*
-        * We are cheating here.  Views have no associated underlying
-        * ability to detect nexthops.  So when we have a view
-        * just tell everyone the nexthop is valid
-        */
-       if (path->peer && path->peer->bgp->inst_type == BGP_INSTANCE_TYPE_VIEW)
-               return 1;
-
-       if (connected && !(CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED)))
-               return 0;
-
-       return (bgp_isvalid_nexthop(bnc));
-}
-
 static void bgp_unlink_nexthop_check(struct bgp_nexthop_cache *bnc)
 {
        if (LIST_EMPTY(&(bnc->paths)) && !bnc->nht_info) {
index 7daae93b25179dde501824ff8c38f7cf0e7198b9..e39d55567aa1c613531f2b9d614a95e65f1a4a1d 100644 (file)
  */
 extern void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id);
 
-/**
- * bgp_find_nexthop() - lookup the nexthop cache table for the bnc object
- * ARGUMENTS:
- *   p - path for which the nexthop object is being looked up
- *   connected - True if NH MUST be a connected route
- */
-extern int bgp_find_nexthop(struct bgp_path_info *p, int connected);
-
 /**
  * bgp_find_or_add_nexthop() - lookup the nexthop cache table for the bnc
  *  object. If not found, create a new object and register with ZEBRA for
index a9af5e749cd1dd0819933d32ac3e1d83219f9dd4..99e1d65c2b0d92a65d8c28f49d2e299e6c6d9d1c 100644 (file)
@@ -111,8 +111,6 @@ provides the following APIs:
 +============================+==================================================+
 | bgp_find_or_add_nexthop()  | find or add a nexthop in BGP nexthop table       |
 +----------------------------+--------------------------------------------------+
-| bgp_find_nexthop()         | find a nexthop in BGP nexthop table              |
-+----------------------------+--------------------------------------------------+
 | bgp_parse_nexthop_update() | parse a nexthop update message coming from zebra |
 +----------------------------+--------------------------------------------------+