[quagga-dev 15950] Re: bgpd regression of 8/ff results (was Re: Someone rebased volatile/patch-tracking/8/proposed/ff branch)

Lou Berger lberger at labn.net
Tue Jul 26 17:22:33 BST 2016


Paul,

On 7/26/2016 12:13 PM, Paul Jakma wrote:
> On Tue, 26 Jul 2016, Lou Berger wrote:
>
>> As far as I can tell new is not used/leaked -- any idea why this was 
>> added (by Pradosh)?
> Unused code is easy to remove. ;)
>
>> This looks like is the result of bgp_start
>>
>>  bgp_find_or_add_nexthop(family2afi(peer->su.sa.sa_family), NULL, peer,
>>              connected);
>>
>> commenting it out also solves the leak, but can't say what impact this
>> has operationally.
>>
>> One additional comment: the use of globals in NHT (rather than per bgp 
>> instance variables) is really ugly from the VRF standpoint and will 
>> need to moved at some point.
> Would agree in principle, without remembering the code.
suspect this is a functional change, but have not investigated.

>
>> Paul,
>>    How do you want to proceed?
> Would it be easy to fix with a cleanup patch?
Do you want it formally?  Informally, as tested:

diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index d84a865..46562cd 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -718,9 +718,10 @@ bgp_start (struct peer *peer)
   /* Register to be notified on peer up */
   if ((peer->ttl == 1) || (peer->gtsm_hops == 1))
     connected = 1;
-
+#if 0
   bgp_find_or_add_nexthop(family2afi(peer->su.sa.sa_family), NULL, peer,
                          connected);
+#endif
   status = bgp_connect (peer);
 
   switch (status)
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index a88a022..a8801c5 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -3778,15 +3778,18 @@ bgp_static_withdraw (struct bgp *bgp, struct
prefix *p, afi_t afi,
 {
   struct bgp_node *rn;
   struct bgp_info *ri;
+#if 0
   struct bgp_info *new;
+#endif
 
   /* Make new BGP info. */
   rn = bgp_node_get (bgp->rib[afi][safi], p);
+#if 0
   new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_STATIC, bgp->peer_self,
                  bgp_attr_default_intern(BGP_ORIGIN_IGP), rn);
 
   SET_FLAG (new->flags, BGP_INFO_VALID);
-
+#endif
   /* Check selected route and self inserted route. */
   for (ri = rn->info; ri; ri = ri->next)
     if (ri->peer == bgp->peer_self







More information about the Quagga-dev mailing list