]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: optimize bgp_update_main() in the soft_reconfig case
authorJorge Boncompte [DTI2] <jorge@dti2.net>
Mon, 7 May 2012 16:53:08 +0000 (16:53 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 22 May 2012 18:35:50 +0000 (20:35 +0200)
Avoids 3 checks per call.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_route.c

index 65a3ac17496012b9ed9cd706387349c9dd3c6a5b..ce0b57b91eb6a7cfdb8c7ea688d374fbba283e2c 100644 (file)
@@ -2067,8 +2067,8 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
   
   /* When peer's soft reconfiguration enabled.  Record input packet in
      Adj-RIBs-In.  */
-  if (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)
-      && peer != bgp->peer_self && ! soft_reconfig)
+  if (! soft_reconfig && CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)
+      && peer != bgp->peer_self)
     bgp_adj_in_set (rn, peer, attr);
 
   /* Check previously received route. */