]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_mpath.c
bgpd: For deterministic MED build a multipath set for each peer AS as the
authorJosh Bailey <joshb@google.com>
Thu, 21 Jul 2011 03:48:20 +0000 (20:48 -0700)
committerJosh Bailey <joshb@google.com>
Thu, 21 Jul 2011 03:48:20 +0000 (20:48 -0700)
commit6918e74b97fd40f947ebd2eded9ab24b8569d3b8
treee7d5e43b25eaf963065016d3998a78e5e5568111
parent8196f13d2ab7f3b09150c00328228f90391acb7c
bgpd: For deterministic MED build a multipath set for each peer AS as the
first stage of the best path calculation. The second stage then
selects a winner from each peer AS's best path. In the second stage we
clear multipath set of the non-selected best paths via
bgp_mp_dmed_deselect(). Since the multipath set is already marked up
for the winning path, we don't call bgp_info_mpath_update() after the
second stage calculation.

* bgpd/bgp_mpath.c
  * bgp_mp_dmed_deselect(): New function to cleanup the multipath
    markup if a DMED selected path loses in stage 2 of the best path
    calculation
* bgpd/bgp_mpath.h
  * Add external declaration of bgp_mp_dmed_deselect()
* bgpd/bgp_route.c
  * bgp_best_selection(): If multipath is enabled, build up the mp_list
    for the current peer AS, and do the RIB markup the best path from
    that AS. In the second stage, clear the RIB markup for the DMED
    selected path if it is not selected as best. Only call
    bgp_info_mpath_update() in the second stage when not doing
    deterministic MED.
bgpd/bgp_mpath.c
bgpd/bgp_mpath.h
bgpd/bgp_route.c