]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Adds equal-paths check to path comparison. Paths that are
authorJosh Bailey <joshb@google.com>
Thu, 21 Jul 2011 03:45:12 +0000 (20:45 -0700)
committerJosh Bailey <joshb@google.com>
Thu, 21 Jul 2011 03:45:12 +0000 (20:45 -0700)
commit96450faf3385a6ed9f4dd5c2c58776c4a664a8da
tree26c56a71548686a7d6797b79377ccc5e25730186
parent42ea68512fc4d04b500def45e8f899321f4081e7
bgpd: Adds equal-paths check to path comparison. Paths that are
equal to the best path are accumulated onto an ordered list (mp_list)
if maximum-paths is configured. A future commit will add the
multipath markup to the BGP rib table based on the mp_list. Add
unit test for the added mp_list functions.

Deterministic MED is not supported in this commit, it will be
added later.

* bgpd/bgp_aspath.c
  * Make aspath_cmp() an external symbol so it can be used in
    equivalent paths check
* bgpd/bgp_aspath.h
  * Add extern declaration of aspath_cmp()
* bgpd/bgp_mpath.c
  * bgp_info_nexthop_cmp(): Compares nexthops of two paths
  * bgp_info_mpath_cmp(): Compare function to order multipaths by
    nexthop and then by peer address
  * bgp_mp_list_init(): Initialize a list with the multipath order function
  * bgp_mp_list_clear(): Clear out the mp_list
  * bgp_mp_list_add(): Add a multipath to mp_list
* bgpd/bgp_mpath.h
  * External declarations for above added functions in bgp_mpath.c
* bgpd/bgp_route.c
  * bgp_info_cmp(): Add equivalent paths result (paths_eq). If eBGP
    paths are equal down to IGP metric check, flag as equal if peer AS
    matches. Similarly for iBGP paths but compare full AS_PATH.
  * bgp_best_selection(): If multipath is enabled, accumulate equivalent paths
    in mp_list. Add debug bgp event output to see result (will be filtered
    later to display only when change occurs)
  * bgp_process_rsclient(): Pass multipath config to bgp_best_selection()
  * bgp_process_main(): Pass multipath config to bgp_best_selection()
* tests/bgp_mpath_test.c
  * Add unit test case for bgp_mp_list functions
bgpd/bgp_aspath.c
bgpd/bgp_aspath.h
bgpd/bgp_mpath.c
bgpd/bgp_mpath.h
bgpd/bgp_route.c
tests/bgp_mpath_test.c