diff options
author | Jorge Boncompte [DTI2] <jorge@dti2.net> | 2012-05-07 16:53:08 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-05-22 20:35:50 +0200 |
commit | 343aa82219c0cab0315e29267eb303127215caea (patch) | |
tree | 17e6b77072657a1a8ae04aeacb715652de1c4ddb /bgpd/bgp_route.c | |
parent | 6a4677b723b6f79997ca15ee202c36d528d3dfcf (diff) | |
download | quagga-343aa82219c0cab0315e29267eb303127215caea.tar.bz2 quagga-343aa82219c0cab0315e29267eb303127215caea.tar.xz |
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>
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 65a3ac17..ce0b57b9 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. */ |