bgpd: optimize bgp_aggregate_[increment|decrement]()

  If there were no aggregates configured this functions were allocating
and freeing a struct bgp_node for every call, and it's called for every
prefix received.

* bgp_route.c: Bail out early if the there are no aggregates configured.
  Change from bgp_node_get() to bgp_node_lookup() that does not allocate
  a new struct bgp_node if not found.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
1 file changed