bgpd: optimize bgp_update_main() in the soft_reconfig case
Avoids 3 checks per call.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 65a3ac1..ce0b57b 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2067,8 +2067,8 @@
/* 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. */