summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-01-15tests: add basic nexthop group functionality testStephen Worley
Add a very basic nexthop group functionality test. This test creates a 2-way ecmp group and installs a route with it using sharpd. Then we check to see that the nexthop groups are marked valid/installed in zebra. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2020-01-10tests: ospf6-topo1 did not work properly with nhg's and 5.3 kernelsDonald Sharp
Fix the ospf6-topo1 test to understand nhg's and what happens when they are installed into a kernel that can support them. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-01-09Merge pull request #5410 from ↵Donald Sharp
ton31337/feature/bgp_default-route_with_route-map_set bgpd: An ability to set attributes for default-originate via route-map
2020-01-07tests: Add a test for 'neighbor <neighbor> default-originate route-map <rm>'Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-01-03bgpd: fix missing bounds checks for psid attrQuentin Young
Guess what - for a bounds check to work, it has to happen *before* you read the data. We were trusting the attribute field received in a prefix SID attribute and then checking if it was correct afterwards, but if was wrong we'd crash before that. This fixes the problem, and adds additional paranoid bounds checks. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-19tests: Test if eBGP policy is not applied to iBGP peersDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-12-18tests: fix endian bug in test_typelistMark Stapp
Fix a byte-swapping bug that appeared on big-endian arch but wasn't visible on little-endian runs. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-16Merge pull request #5502 from ton31337/fix/rr_do_not_show_fqdnSri Mohana Singamsetty
bgpd: Show `ip` and `fqdn` in json output for `show [ip] bgp json`
2019-12-12tests: Test if `ip` and `fqdn` are included in `show [ip] bgp json`Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-12-06Merge pull request #4765 from opensourcerouting/defaults-v2Donald Sharp
lib/*: new config defaults system, v2
2019-12-06topojson: use empty vtysh.conf for frr-reload.pyDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06bgpd: use new defaults system (v2)David Lamparter
This moves all the DFLT_BGP_* stuff over to the new defaults mechanism. bgp_timers_nondefault() added to get better file-scoping. v2: moved everything into bgp_vty.c so that the core BGP code is independent of the CLI-specific defaults. This should make the future northbound conversion easier. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06lib: add frr_version_cmp()David Lamparter
This just compares 2 version strings. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06lib: rename memory_vty.c to lib_vty.cDavid Lamparter
And memory_init() to lib_cmd_init(). Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06topotests: Adapt to linux kernel 5+Mark Stapp
Make a few changes to try to support topotests with vrfs on kernel 5 and later. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-03Merge pull request #5305 from ↵Donald Sharp
ton31337/feature/draft-ietf-idr-deprecate-as-set-confed-set bgpd: Reject incoming and outgoing UPDATES for AS_SET and AS_CONFED_SET
2019-11-30*: make frr_yang_module_info constDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-11-19Merge pull request #5257 from ton31337/fix/update_rib_on_bgp_distance_changesSri Mohana Singamsetty
bgpd: Reflect the distance in RIB when it is changed for an arbitrary afi/safi
2019-11-14tests: Add a test case for `bgp reject-as-sets`Donatas Abraitis
Test if AS_SET was stripped and announced without AS_SET to the peers. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-11-14tests: Test if `distance bgp (1-255) (1-255) (1-255)` worksDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-11-13tests: Add a test case for `sender-as-path-loop-detection`Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-11-06Merge pull request #5196 from kuldeepkash/testcasesMartin Winter
tests: Enhance bgp-path-attributes-topo1 test suite
2019-11-04topotest: update the LDP VPLS testRenato Westphal
The final test case of this topotest wasn't really testing anything. Do the following changes to fix this: * Remove "no link-detect" from the zebra configs so that link down failures are detected immediately; * After shutting down the interface between r1 and r2, wait five seconds before testing if the pseudowires reconverged through the r3 router. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-11-04topotest: enable MPLS processing on all interfaces by defaultRenato Westphal
This is necessary to make some tests work correctly. Only topologies created using the topogen framework benefit from this change. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-10-29topotests/Dockerfile: Install libyang from repositoryChristian Franke
Instead of installing libyang from some old build, let's install the current libyang from our Debian/Ubuntu repository. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2019-10-25topotests: Expect shared nexthop memoryStephen Worley
A few topotests were failing since they were not aware of shared nexthops and, therefore, matching on flags that could be changed when another route sharing that nexthop is installed. Update routes that are not installed to not match their json output on the nexthop flag information. The ones that are installed will still retain their matches though since they can be sure the nexthop should have those flags (they would be the route that set them). Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-10-21tests: Enhance BGP Path attribute test casesKuldeep Kashyap
1. Added steps to modify BGP path attributes and verify best path is changed Signed-off-by: Kuldeep Kashyap <kashyapkas@gmail.com>
2019-10-21tests: Enhance BGP Path attribute APIsKuldeep Kashyap
Modified affacted APIs to supported BGP Path attributes modification and verification Signed-off-by: Kuldeep Kashyap <kuldeepkas@gmail.com>
2019-10-20Merge pull request #5108 from donaldsharp/sendbuffer_size_bgpDonatas Abraitis
Sendbuffer size bgp
2019-10-17tests: Add test cases for bgp community and large communityAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Test cases to check functionality of bgp large community and bgp community path attribute
2019-10-17tests: Update cli error list and retry functionAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Add cli error returned for invalid bgp-community-list command Fix retry function to avoid retries when expected is False
2019-10-17tests: Update bgp api for community and aggregate addressAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Add support for not sending community data in bgp and update aggregate address configuration code
2019-10-17tests: Add verify community list apiAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Api checks if community list is present in the system or not
2019-10-17tests: Add step api in topojsonAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Print messages with a step number to log from test case
2019-10-16bgpd: Add ability to set tcp socket buffer sizeDonald Sharp
Add -s X or --socket_size X to the bgp cli to allow the end user to specify the outgoing bgp tcp kernel socket buffer size. It is recommended that this option is only used on large scale operations. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-15Merge pull request #5097 from ton31337/fix/do_not_reconnect_if_prefix_overflowDonald Sharp
bgpd: Keep the session down if maximum-prefix is reached
2019-10-04Merge branch 'master' into ecmp_testsMartin Winter
2019-10-04Merge pull request #5082 from donaldsharp/add_bgp_rr_ibgp_topotestDonatas Abraitis
tests: Add a topology that shows broken ibgp Route Reflector behavior
2019-10-03tests: Remove sleep from test_bgp_maximum_prefix_invalid_updateDonatas Abraitis
Sleep is not needed here while we fail instantly if maximum is reached. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-10-03tests: Enabling bgp-ecmp-topo2 test casesAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
2019-10-03tests: Modify json for bgp-ecmp-topo2Ashish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Modified json files to configure route-map which prefer global address
2019-10-03tests: Add topojson route-map for nexthopAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Add route-map option for ipv6 nexthop Fix typo in bgp configuration
2019-10-03tests: Fix topojson link local ipv6 addressAshish Pant
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Removed code that disabled link local ipv6 address on the interface
2019-10-01Merge pull request #5087 from opensourcerouting/topotest-skip-on-assert-failureDonald Sharp
topotests: skip tests when any assert fails
2019-10-01tests: Add a topology that shows broken ibgp behaviorDonald Sharp
In a leaf/spine topology with only IBGP connections, where the same network is being redistributed at multiple points in the network ( say a redistribute connected at both leaf and spines ) we end up in a state where zebra gets very confused. eva# show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued route, r - rejected route C>* 192.168.1.0/24 is directly connected, tor1-eth0, 00:00:30 C>* 192.168.2.0/24 is directly connected, tor1-eth1, 00:00:30 B 192.168.3.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25 via 192.168.6.2 inactive, 00:00:25 B>* 192.168.4.0/24 [200/0] via 192.168.2.3, tor1-eth1, 00:00:25 * via 192.168.6.2 inactive, 00:00:25 C>* 192.168.5.0/24 is directly connected, tor1-eth2, 00:00:30 B>* 192.168.6.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25 * via 192.168.5.4, tor1-eth2, 00:00:25 Effectively we have ibgp routes recursing through ibgp routes and there is no metric to discern whom to listen to. This draft: https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-19 appears to address this issue. From looking at both cisco and arista deployments they are handling this issue by having the route reflector prefer the localy learned routes over from their clients. Add this topology, in a broken state, so that when we do fix this issue it is a simple matter of touching this topology up and re-adding it to the normal daily builds. I also wanted to add this topology since it is in a state of `doneness` and I wanted to move onto my normal day job without having to remember about this test. This topology is not configured to be run as part of the normal topotests. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-30topotests: skip tests when any assert failsRafael Zalamena
When an `assert` fails we should skip all other tests on the file. Once a failure is detected we can't rely on the setup anymore, since most of the tests assume the previous worked. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-09-30*: strip trailing whitespaceQuentin Young
Some of it has snuck by CI Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-26tests: Add bgp route-map test casesKuldeep Kashyap
Adding 27 bgp route-map test cases to test multiple route-map scenarios Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26tests: Add API to shut/noshut router interfaceKuldeep Kashyap
This API would help to shut/nohut specified router interfaces Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26tests: Adding verification APIs for bgp route-maps and community-listsKuldeep Kashyap
APIs to verify bgp route-maps, bgp community and large community configurations Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>