summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge 'patch-tracking/4/proposed/netdef-solaris' into acceptedPaul Jakma2015-10-284-4/+9
|\
| * *: make sure zebra.h is always included firstDavid Lamparter2015-10-164-4/+9
| | | | | | | | | | | | | | | | zebra.h pulls in config.h, which results in fiddling with things like __FILE_OFFSET_BITS. It must always be included first, in order to set flags that influence the compiler via <features.h>. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | tests: Fix warnings from test-stream.cDonald Sharp2015-10-271-3/+3
| | | | | | | | | | | | test-stream is generating some compiler warnings Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib: zclient.c remove extern struct thread_master *Donald Sharp2015-10-271-1/+1
|/ | | | | | | | | | | | zclient.c depended upon link time inclusion of a extern struct thread_master *master. This is a violation of the namespace of the calling daemon. If a library needs the pointer pass it in and save it for future use. This code change also makes the zclient code consistent with the other lib functions that need to schedule work on your behalf Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: Remove the old PIC/PIE patch, let libtool sort it outPaul Jakma2015-09-031-3/+0
| | | | | | | * Remove the old change from '08 to add in PIE arguments at automake level. Versions of libtool since then know how to deal with -fpie and do the right thing according to whether its building shared or executable objects. So just pass '-fpie' as CFLAG and let libtool do its thing.
* tests: add testcli reference in/out & do DejaGNUDavid Lamparter2015-05-275-1/+410
| | | | | | | | This adds reference in & output for the previously added testcli tool, to check basic CLI parsing/help functions. Unlike "testcommands", this one doesn't depend on compile-time system details. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add CLI dummy command-exec toolDavid Lamparter2015-05-275-1/+200
| | | | | | | | | | | This adds some common CLI testtool code as well as a tool that has a bunch of commands to be poked for their correct processing. The tool doesn't work correctly from a script at stdin at this point because the vty code will throw away all buffered when it sees EOF, so the tail end of the input file is lost. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: fix warningsDavid Lamparter2015-04-2113-48/+53
| | | | | | | While I don't see -Werror being used on tests anytime soon, there's no reason to keep the warnings in tests unfixed. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: remove --disable-ipv6David Lamparter2015-02-143-30/+10
| | | | | | | | With --disable-ipv6 gone, the IPv6 detection logic in the tests is not needed anymore either. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Paul Jakma <paul@jakma.org>
* build: get rid of INCLUDES, use AM_CPPFLAGSDavid Lamparter2015-02-141-1/+1
| | | | | | | | | | | | INCLUDES in configure.ac was not used at all, and INCLUDES in Makefile.am is supposed to be AM_CPPFLAGS these days. Reduces warnings spewed during bootstrap/autoreconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* tests: fix tests for 1a211cb (missing well-known)David Lamparter2015-02-061-2/+5
| | | | | | | | | | | Fix tests/aspathtest.c again, this time by including a NEXT_HOP attribute (which is out of correct order with AS_PATH, but that doesn't matter here.) This satisfies bgp_attr_check(), which after 1a211cb refuses updates without nexthop attribute. Fixes: 1a211cb ("one more fix for tightening of check for missing well-known attributes") Cc: Paul Jakma <paul@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: fix tests for 055086f (well-known attr check)David Lamparter2014-10-301-28/+48
| | | | | | | | | | | | | Fix tests/aspathtest.c by including an ORIGIN attribute in the testcases. After 055086f "bgpd: well-known attr check only run for v4/uni, which could cause a crash," we're now checking for it and tests are failing due to that. Note that test #11 ("4b AS4_PATH w/o AS_PATH") is no longer accepted as OK since the function now checks for the existence of an AS_PATH attr. Fixes: 055086f ("bgpd: well-known attr check only run for v4/uni"...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Add missing GPL headers, and copyright claims that certainly apply.Paul Jakma2014-09-199-0/+185
| | | | | | | | | | | | | * Fix (a subset of)? files with non-trivial code that are missing GPL headers. * A few copyright claims added which I am certain apply, but which I had missed out on the original commits. NB: Copyright claims are not exclusive and the addition of any copyright claim should not be read as implying a lack of any further claims, or denying the validity of any other claims. All those with claims of copyright over any portion of Quagga are welcome to submit them, ideally as patches to update copyright strings in files.
* tests/bgpd: don't hardcode error number (fix f57000c)David Lamparter2014-08-181-1/+1
| | | | | | | | | | | | f57000c ("bgpd: don't send NOTIFY twice for malformed attrs") introduces BGP_ATTR_PARSE_ERROR_NOTIFYPLS as additional error code that implies the caller should sent a NOTIFY and convert it to BGP_ATTR_PARSE_ERROR. Sadly, the latter was hardcoded in bgp_mp_attr_test.c, which now didn't consider the new value to be an error. Make the testcase treat all nonzero values as error without discern. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: nuke ^L (page feed)David Lamparter2014-06-043-5/+5
| | | | | | | | | | | | | | Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: Add tests for timersChristian Franke2014-04-226-1/+313
| | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd/ospf_vty.c: use keyword cmd styleChristian Franke2014-04-012-0/+122
| | | | | | | | | | | Use the new keyword command style for: - default-information originate - distance ospf - redistribute Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib/command.c: rewrite command matching/parsingChristian Franke2014-04-012-6/+2
| | | | | | | | | | Add support for keyword commands. Includes new documentation for DEFUN() in lib/command.h, for preexisting features as well as new keyword specification. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: fix build & disable testcommandsDavid Lamparter2014-04-013-2/+11
| | | | | | | | | | | The perils of having tests, the test wasn't tested thoroughly enough... Fixup various automake problems, and then disable it since it depends on configure parameters in its current version. For 0.99.24 we can ship a static copy of vtysh_cmd.c and have it reenabled. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add a test program for lib/command.cChristian Franke2014-04-019-1/+1613
| | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: fix backtraces broken by 837d16c...David Lamparter2014-03-213-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | 837d16c ("*: use array_size() helper macro") accidentally changed one of the expressions in the backtrace code, which afterwards read: zlog_backtrace_sigsafe(): if (((size = backtrace(array,array_size(array)) <= 0) || which boils down to: (size = backtrace(...) <= 0). The braces were intended to go: (size = backtrace(...)) <= 0. All in all, this makes a nice textbook example of the original author being too clever (trying to save a single line by pulling the assignment into the condition) and the next person touching the code tripping over it... This code occurs another time in zlog_backtrace() where it is actually correct. Pulling out the assignment nonetheless. Also, new test program. Cc: Andrew J. Schorr <ajschorr@alumni.princeton.edu> Cc: Balaji.G <balajig81@gmail.com> Cc: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: fix tests/prng.h missing from distDavid Lamparter2013-10-221-0/+2
| | | | | | | broken by fa713d9... "zebra: rework recursive route resolution", and I forgot to squash the fix into that. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: rework recursive route resolutionChristian Franke2013-09-197-2/+421
| | | | | | | | | | | | | | | Change the datastructure for recursive routes. This brings the following benefits: By using struct nexthop also to store nexthops obtained by recursive resolution, we can get rid of quite a bit of code duplication in the fib management. (rt_netlink, rt_socket, ...) With the new datastructure we can make use of all available paths when recursive routes are resolved with multipath routes. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: don't build tests unless make check is runChristian Franke2013-07-151-1/+1
| | | | | | | Use check_PROGRAMS instead of noinst_PROGRAMS in tests/Makefile.am to build the tests only when make check is actually run. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: fix Makefile.am so it works with BSD makeChristian Franke2013-07-091-1/+0
| | | | | | | | The export statement is specific to GNU make and breaks the build with BSD make. I couldn't observe any difference in behaviour between having the export present and absent, therefore, just remove it. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: DejaGNU libzebraDavid Lamparter2013-04-146-2/+62
| | | | | | Wrap the few libzebra test programs we have up for DejaGNU. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: DejaGNU bgpdDavid Lamparter2013-04-148-3/+194
| | | | | | | this just wraps the existing test programs in expect wrappers that make their results usable to DejaGNU. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add DejaGNU frameworkDavid Lamparter2013-04-144-0/+120
| | | | | | | | | DejaGNU seems to be the 'standard' GNU test framework (which by itself doesn't say much), but it seems relatively usable and the "remote system" capabilities might come in handy for virtualisation-based tests for kernel interactions or something. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: make --disable-bgpd kill bgpd tests tooDavid Lamparter2013-04-091-2/+8
| | | | | | | | bgpd tests don't compile or run with --disable-bgpd, let's catch this in the Makefile. Reported-by: Joachim Nilsson <troglobit@gmail.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: fix missing init in bgp_mp_attr_test.cDavid Lamparter2013-02-011-2/+2
| | | | | | | | turns out, bgp_mp_reach_parse really doesn't like getting garbage attribute input. In particular, attr->extra better be NULL or we merrily go trample random places (like our stack). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: update & extend AS_PATH testsDavid Lamparter2013-02-011-6/+34
| | | | | | | | | | | | NB: these tests test for current implementation state, not for RFC conformance. In particular, behaviour with confederations in AS4_PATH as well as reconcilation of short AS_PATH + AS4_PATH is currently NOT conforming to RFC 4893/6793. * tests/aspath_test.c: add capability to put both AS4_PATH & AS_PATH, add test for AS4_PATH w/o AS_PATH, update confederation test Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: update .gitignore for all test programsLeonid Rosenboim2013-01-161-5/+14
|
* tests: fix missing array_size() includeDavid Lamparter2012-11-031-0/+1
| | | | | | * tests/test-sig.c: add #include "lib/memory.h" to get array_size() Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: reorder libraries to address linker errorAvneesh Sachdev2012-11-011-5/+5
| | | | | | | | | | | | | | The linker on some systems (for example, Ubuntu 12.04 LTS x86_64) appears to be sensitive to the order in which libraries are specified. On these systems, if a library 'A' depends on a library 'B', it has to be specified before 'B' when linking an executable. * zebra/Makefile.am: Make sure LIBCAP comes after libzebra. * tests/Makefile.am: Ensure libm comes after libbgp. Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use array_size() helper macroBalaji.G2012-10-251-1/+1
| | | | | | | | Use the array_size() helper macro. Replaces several instances of local macros with the same definition. Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib/table: add route_table_get_next() and iteratorAvneesh Sachdev2012-09-263-1/+559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/table.[ch] - Add a function (route_table_get_next()) to get the route_node in a tree that succeeds a given prefix in iteration order. This allows one to reliably walk nodes in a tree while allowing modifications, and is useful for achieving scale and performance. Other approaches are also possible -- the main plus point of this one is that it does not require any state about the walk to be maintained in the table data structures. - Add an iterator for walking the nodes in a tree. This introduces a new structure (route_table_iter_t) and the following main functions. route_table_iter_init() route_table_iter_pause() route_table_iter_next() route_table_iter_cleanup() The iterator normally uses node pointers and the existing route_next() function to walk nodes efficiently. When an iteration is 'paused' with route_table_iter_pause(), it stores the last prefix processed. The next call to route_table_iter_next() transparently invokes route_table_get_next() with the prefix to resume iteration. * bgpd/bgp_table.[ch] Add wrappers for the new table features described above. * tests/table_test.c Add tests for the new table code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: allow configure and build in a separate directoryVincent Bernat2012-06-251-1/+1
| | | | | | | | | | | Some .h files in lib/ are autogenerated. The search path should include the build directory and the source directory. They usually match but sometimes, they may be different. For example: $ mkdir build $ cd build $ ../configure $ make
* tests: BGP unit tests to set BGP_OPT_NO_LISTEN so they can runPaul Jakma2012-06-194-1/+5
| | | | | | BGP tests had been broken by auto-creation of listen socket. This allows them to run at least, though at least 1 test seems to have other breakage, aspath_test.
* tests: Fix some compile errors and warningsPaul Jakma2012-05-025-30/+38
| | | | | | | | * aspath_test.c: match changes in aspath_unintern. Fix printf size_t warning. * bgp_capability_test.c: compile warnings. * bgp_mp_attr_test.c: update for attr parser context struct * ecommunity_test.c: ecommunity_free/ecommunity * test-checksum.c: some unused vars and funcs without need of prototypes.
* Revert "tests: disable broken tests/bgp_mp_attr_test.c"Paul Jakma2012-05-021-7/+0
| | | | | This reverts commit d78e2b8b562f8496aaf2977f7371415b71e82433. Next 2 commits fix it.
* tests: disable broken tests/bgp_mp_attr_test.cDavid Lamparter2012-05-011-0/+7
| | | | | | | | it doesn't compile currently; it'll be fixed after the 0.99.21 release. * tests/bgp_mp_attr_test.c: wrap in #if 0 for now Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge branch 'quagga' into google-bgp-multipathAvneesh Sachdev2012-04-095-60/+309
|\ | | | | | | | | Conflicts: bgpd/bgp_route.c
| * build: delete .cvsignore filesDenis Ovsienko2011-12-131-22/+0
| |
| * bgpd: add flag checks for MP_(UN)REACH_NLRIDenis Ovsienko2011-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | * bgp_attr.[ch] * bgp_mp_reach_parse(): add extra arguments and a uniform flag check block * bgp_mp_unreach_parse(): idem * bgp_attr_parse(): provide extra arguments * bgp_mp_attr_test.c * parse_test(): justify respective calls
| * bgpd: more SAFI fixesDenis Ovsienko2011-09-292-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (with resolved conflict in bgpd/bgp_packet.c) Two macros resolving to the same integer constant broke a case block and a more thorough merge of BGP_SAFI_VPNV4 and BGP_SAFI_VPNV6 was performed. * bgpd.h: MPLS-labeled VPN SAFI is AFI-independent, switch to single * macro * bgp_capability_test.c: update test data * bgp_mp_attr_test.c: idem * bgp_route.c: (bgp_maximum_prefix_overflow, bgp_table_stats_vty) update macro and check conditions (where appropriate) * bgp_packet.c: (bgp_route_refresh_send, bgp_capability_send, bgp_update_receive, bgp_route_refresh_receive): idem * bgp_open.c: (bgp_capability_vty_out, bgp_afi_safi_valid_indices, bgp_open_capability_orf, bgp_open_capability): idem * bgp_attr.c: (bgp_mp_reach_parse, bgp_packet_attribute, bgp_packet_withdraw): idem
| * delete CVS keywordsDenis Ovsienko2011-09-271-2/+0
| |
| * bgpd: Implement revised error handling for partial optional/trans. attributesPaul Jakma2011-03-211-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * BGP error handling generally boils down to "reset session". This was fine when all BGP speakers pretty much understood all BGP messages. However the increasing deployment of new attribute types has shown this approach to cause problems, in particular where a new attribute type is "tunneled" over some speakers which do not understand it, and then arrives at a speaker which does but considers it malformed (e.g. corruption along the way, or because of early implementation bugs/interop issues). To mitigate this drafts before the IDR (likely to be adopted) propose to treat errors in partial (i.e. not understood by neighbour), optional transitive attributes, when received from eBGP peers, as withdrawing only the NLRIs in the affected UPDATE, rather than causing the entire session to be reset. See: http://tools.ietf.org/html/draft-scudder-idr-optional-transitive * bgp_aspath.c: (assegments_parse) Replace the "NULL means valid, 0-length OR an error" return value with an error code - instead taking pointer to result structure as arg. (aspath_parse) adjust to suit previous change, but here NULL really does mean error in the external interface. * bgp_attr.h (bgp_attr_parse) use an explictly typed and enumerated value to indicate return result. (bgp_attr_unintern_sub) cleans up just the members of an attr, but not the attr itself, for benefit of those who use a stack-local attr. * bgp_attr.c: (bgp_attr_unintern_sub) split out from bgp_attr_unintern (bgp_attr_unintern) as previous. (bgp_attr_malformed) helper function to centralise decisions on how to handle errors in attributes. (bgp_attr_{aspathlimit,origin,etc..}) Use bgp_attr_malformed. (bgp_attr_aspathlimit) Subcode for error specifc to this attr should be BGP_NOTIFY_UPDATE_OPT_ATTR_ERR. (bgp_attr_as4_path) be more rigorous about checks, ala bgp_attr_as_path. (bgp_attr_parse) Adjust to deal with the additional error level that bgp_attr_ parsers can raise, and also similarly return appropriate error back up to (bgp_update_receive). Try to avoid leaking as4_path. * bgp_packet.c: (bgp_update_receive) Adjust to deal with BGP_ATTR_PARSE_WITHDRAW error level from bgp_attr_parse, which should lead to a withdraw, by making the attribute parameter in call to (bgp_nlri_parse) conditional on the error, so the update case morphs also into a withdraw. Use bgp_attr_unintern_sub from above, instead of doing this itself. Fix error case returns which were not calling bgp_attr_unintern_sub and probably leaking memory. * tests/aspath_test.c: Fix to work for null return with bad segments
| * tests: Extend aspath_test.c with cases for invalid segments & attributesPaul Jakma2011-03-211-10/+281
| | | | | | | | | | | | | | | | | | * aspath_test.c: Add more test cases. In particular ones to cover the last invalid-segment problem. Also add ability to specify aspath attribute headers and test them somewhat. NB: It's obvious this test has not been run for a year by anyone, despite 2 non-trivial commits to bgpd aspath code.
* | bgpd: Adds support to mark up the BGP rib table entry with multipathJosh Bailey2011-07-201-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information based on the multipath list (mp_list) generated during the best path calculation. Display "multipath" for paths that are multipath and also on bestpath if the route is multipath. Flag a best path with the BGP_INFO_MULTIPATH_CHG if the multipath set has changed since the last update. This can be used to trigger updates to zebra and peers. The multipath markup is a lazily allocated bgp_info_mpath structure that is added to the best path and any multipaths. The mpath structures are linked together with the best path element at the head and the other elements ordered by nexthop and then by peer address. This markup scheme is updated by calling bgp_info_mpath_update() and passing in a new mp_list the the current multipath set. There are additional API's for walking the multipath set, querying the count of multipaths, and for cleaning up the multipath markup information when freeing path information. * bgpd/bgp_mpath.c * bgp_info_mpath_new(): Allocation of new mpath element * bgp_info_mpath_free(): Release memory for mpath element * bgp_info_mpath_get(): Access mpath element of path. Allocate memory on-demand * bgp_info_mpath_enqueue(): Enqueue a path onto the multipath list * bgp_info_mpath_dequeue(): Remove a path from the multipath list * bgp_info_mpath_first(): Return first path on the multipath list * bgp_info_mpath_next(): Return next path on the multipath list * bgp_info_mpath_count(): Return the number of paths on the multipath list * bgp_info_mpath_count_set(): Set the number of paths on the multipath list * bgp_info_mpath_update(): Update multipath markup on bgp route table entry and flag any changes. Emit 'debug bgp event' output on any multipath change. * bgpd/bgp_mpath.h * struct bgp_info_mpath: Information added to a bgp_info path to record multipath information * External declarations for new functions in bgp_mpath.c * bgpd/bgp_route.c * bgp_info_free(): Free mpath memory when freeing path information * bgp_info_reap(): Dequeue path from multipath queue before deleting it * bgp_best_selection(): Calls bgp_info_mpath_update() with latest mp_list to mark-up rib table entry * bgp_vty_out_detail(): Add display of multipath flag for a path. Also display 'multipath' for bestpath if it is a multipath route * bgpd/bgp_route.h * struct bgp_info: Add pointer to bgp_info_mpath information * Add flags to mark a path as multipath (BGP_INFO_MULTIPATH) and to mark bestpath if multipath information has changed (BGP_INFO_MULTIPATH_CHG) * lib/memtypes.c * Add MTYPE_BGP_MPATH_INFO for allocating memory for bgp_info_mpath * tests/bgp_mpath_test.c * Add test case for bgp_info_mpath_update() and supporting functions
* | bgpd: Adds equal-paths check to path comparison. Paths that areJosh Bailey2011-07-201-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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