From: Jorge Boncompte [DTI2] Date: Mon, 7 May 2012 16:53:08 +0000 (+0000) Subject: bgpd: optimize bgp_update_main() in the soft_reconfig case X-Git-Tag: frr-2.0-rc1~1810 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=343aa82219c0cab0315e29267eb303127215caea;p=mirror%2Ffrr.git bgpd: optimize bgp_update_main() in the soft_reconfig case Avoids 3 checks per call. Signed-off-by: Jorge Boncompte [DTI2] Signed-off-by: David Lamparter --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 65a3ac1749..ce0b57b91e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -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. */