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
There is support to configure this for each (AFI,SAFI), but
currently this configuration is only present for IPv4 unicast:
maximum-paths [ibgp] <1-255>
no maximum-paths [ibgp] [<1-255>]
* bgpd/Makefile.am
* Add bgp_mpath.h and bgp_mpath.c to build
* bgpd/bgp_mpath.h
* New file for bgp multipath declarations
* define BGP_DEFAULT_MAXPATHS
* bgpd/bgp_mpath.c
* bgp_maximum_paths_set(): Configure maximum paths for the given
afi, safi and bgp instance
* bgp_maximum_paths_unset(): Return maximum paths configuration to
the default setting for the given afi, safi and bgp instance
* bgpd/bgp_vty.c
* Define command strings for above CLI
* bgp_config_write_maxpaths(): Outputs configuration for the given
afi, safi and bgp instance
* Install command elements for IPv4 unicast
* bgpd/bgp_zebra.h
* bgp_config_write_maxpaths(): External declaration
* bgpd/bgpd.c
* bgp_create(): Initialize bgp instance to default maximum paths setting
* bgp_config_write_family(): Output maximum paths configuration
for the given address family
* bgp_config_write(): Output maximum paths configuration for
IPv4 unicast address family
* bgpd/bgpd.h
* struct bgp: Add storage for maximum paths configuration for
each afi, safi