summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-10-17tests: add a new topotest to bgp_aigpEnke Chen
Add a new topotest for getting the aigp from the "igp-metric" for a redistributed route (ospf route in the test). Signed-off-by: Enke Chen <enchen@paloaltonetworks.com> (cherry picked from commit 51612593f7f747d0003a48a41367be87d3ea5361)
2024-10-15tests: fix and adjust topotest/bgp_aigpEnke Chen
Fix and adjust the topotest post the fix for route selection with AIGP. When there are multiple IGP domains (OSPF in this case), the nexthop for a BGP route with the AIGP attribute must be resolved in its own IGP domain. The changes in r2/bgpd.conf and r3/bgpd.conf are needed as incorrect IGP metrics are received from NHT for the recursive nexthops. Once the issue is resolved, the changes can be reverted. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com> (cherry picked from commit 1ee7e63a6c432662ef3a9a2bd0e1c41298bdf196)
2024-09-17tests: update isisd fuzz testLouis Scalbert
Since the previous commit, if a router capability subTLV is not readable, the previously read subTLVs are kept. Update of the ISIS fuzz test. > $ wuschl rebuild tests/isisd/test_fuzz_isis_tlv > $ gzip -9 tests/isisd/test_fuzz_isis_tlv_tests.h > $ ./test_fuzz_isis_tlv 2>/dev/null | grep failed > Test 139 failed, output differs. > Test 150 failed, output differs. > 2 of 405 tests failed. > > $ ./test_fuzz_isis_tlv 139 2>/dev/null > Test 139 failed, output differs. > Expected output: > Unpack log: > Unpacking 564 bytes of TLVs... > Unpacking TLV... > Found TLV of type 193 and len 13. > Skipping unknown TLV 193 (13 bytes) > Unpacking TLV... > Found TLV of type 0 and len 0. > Skipping unknown TLV 0 (0 bytes) > Unpacking TLV... > Found TLV of type 0 and len 0. > Skipping unknown TLV 0 (0 bytes) > Unpacking TLV... > Found TLV of type 242 and len 12. > Unpacking Router Capability TLV... > WARNING: Router Capability subTLV length too large compared to expected size > Unpacked TLVs: > Received output: > Unpack log: > Unpacking 564 bytes of TLVs... > Unpacking TLV... > Found TLV of type 193 and len 13. > Skipping unknown TLV 193 (13 bytes) > Unpacking TLV... > Found TLV of type 0 and len 0. > Skipping unknown TLV 0 (0 bytes) > Unpacking TLV... > Found TLV of type 0 and len 0. > Skipping unknown TLV 0 (0 bytes) > Unpacking TLV... > Found TLV of type 242 and len 12. > Unpacking Router Capability TLV... > WARNING: Router Capability subTLV length too large compared to expected size > Unpacked TLVs: > Router Capability: 253.212.128.242 , D:1, S:1 > > $ ./test_fuzz_isis_tlv 150 2>/dev/null > Test 150 failed, output differs. > Expected output: > Unpack log: > Unpacking 403 bytes of TLVs... > Unpacking TLV... > Found TLV of type 129 and len 13. > Unpacking Protocols Supported TLV... > Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11 > Unpacking TLV... > Found TLV of type 11 and len 11. > Skipping unknown TLV 11 (11 bytes) > Unpacking TLV... > Found TLV of type 242 and len 12. > Unpacking Router Capability TLV... > WARNING: Router Capability subTLV length too large compared to expected size > Unpacked TLVs: > Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11 > Received output: > Unpack log: > Unpacking 403 bytes of TLVs... > Unpacking TLV... > Found TLV of type 129 and len 13. > Unpacking Protocols Supported TLV... > Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11 > Unpacking TLV... > Found TLV of type 11 and len 11. > Skipping unknown TLV 11 (11 bytes) > Unpacking TLV... > Found TLV of type 242 and len 12. > Unpacking Router Capability TLV... > WARNING: Router Capability subTLV length too large compared to expected size > Unpacked TLVs: > Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11 > Router Capability: 253.212.128.242 , D:1, S:1 Link: https://pypi.org/project/wuschl/ Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commit cfd050a0e5a636efae93865d982714da9dbf06a6)
2024-08-22topotest: test_bgp_snmp_bgpv4v2_notificationDmytro Shytyi
This test checks the bgp crash on rt2 when 2 commands launched consequently: T0: rr, config -> router bgp 65004 -> neighbor 192.168.12.2 password 8888 T1: rt2, snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.7336.4.2.1 T2: test if rt2 bgp is crashed. Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com> (cherry picked from commit e23005f407be4c284aaafa4c379d54581b7a8e78)
2024-07-25pimd: Fix msdp setting of sa->rpDonald Sharp
The code is clearly incorrect. After consultation with the original author this is the decided change. Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit c4b4c242ec8cfcdb23f0f90faaa0ff76577e1364)
2024-07-23ospfd: fix internal ldp-sync state flags when feature is disabledChristian Breunig
When enabling "mpls ldp-sync" under "router ospf" ospfd configures SET_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG) so internally knowing that the ldp-sync feature is enabled. However the flag is not cleared when turning of the feature using "nompls ldp-sync"! https://github.com/FRRouting/frr/issues/16375 Signed-off-by: Christian Breunig <christian@breunig.cc> (cherry picked from commit 5a70378a47f541b0354fbb96770dd0a65ec552b8)
2024-05-17topotests: do not check table versionLouis Scalbert
BGP table version is variable. Don't check it. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commit 29f47f3debddbea7da5d39d46dbc4a659237acdc)
2024-05-07tests: Check if iBGP session can drop invalid AIGP attributeDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit f58227c91e4aaf3b54929634b310de86c0202a6e)
2024-04-04Revert "topotests: add an ebgp 6vpe test"Donatas Abraitis
This reverts commit 4d7df91752d7414d9719a361a2fd4cc30943dc96.
2024-02-28topotests: add an ebgp 6vpe testPhilippe Guibert
This test uses the connected ipv4 mapped ipv6 prefix to resolve the received BGP routes. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: François Dumontet <francois.dumontet@6wind.com> (cherry picked from commit 4d7df91752d7414d9719a361a2fd4cc30943dc96)
2024-02-27tests: extend tests for aspath excludeFrancois Dumontet
adding a tests about: "no bgp as-path access-list" command. the folloxing "clear bgp *" command leads to the crash exhibited above. a sleep had been added to capture the crash befor the end of scenario. 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [Current thread is 1 (Thread 0x7f5f05cbb9c0 (LWP 1371086))] (gdb) bt context=0x7ffcf2c216c0) at lib/sigevent.c:248 acl_list=0x55c976ec03c0) at bgpd/bgp_aspath.c:1688 dummy=0x7ffcf2c22340, object=0x7ffcf2c21e70) at bgpd/bgp_routemap.c:2401 match_object=0x7ffcf2c21e70, set_object=0x7ffcf2c21e70, pref=0x0) at lib/routemap.c:2687 attr=0x7ffcf2c220b0, afi=AFI_IP, safi=SAFI_UNICAST, rmap_name=0x0, label=0x0, num_labels=0, dest=0x55c976ebeaf0) at bgpd/bgp_route.c:1807 addpath_id=0, attr=0x7ffcf2c22450, afi=AFI_IP, safi=SAFI_UNICAST, type=10, sub_type=0, prd=0x0, label=0x0, num_labels=0, soft_reconfig=0, evpn=0x0) at bgpd/bgp_route.c:4424 packet=0x7ffcf2c22410) at bgpd/bgp_route.c:6266 packet=0x7ffcf2c22410, mp_withdraw=false) at bgpd/bgp_packet.c:341 peer=0x55c976e89ed0, size=43) at bgpd/bgp_packet.c:2414 at bgpd/bgp_packet.c:3899 Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com> (cherry picked from commit 324fa2101550b542946a34de09b394df8bf8ba9d)
2024-02-06topotests: vpnv4 route leaking with no import-checkLouis Scalbert
Test vpnv4 route leaking with no import-check Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commit 4bbfade7d6115370ffaa89634b02bec8534bf037)
2024-01-21Revert "tests: Add a noprefixroute test"Donatas Abraitis
This reverts commit d5214b1182e9c9f4da2ad1fd6c505154fc1cbf06.
2023-12-18tests: Check for 0.0.0.0/1 in bgp_default_routeXiao Liang
Ensure that 0.0.0.0/1 route can be advertised along with default-originate. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> (cherry picked from commit 4538247c995e551aed0c08c4bb20b187ce95f5f2)
2023-12-14tests: Update OSPF TE topotestsOlivier Dugeon
The OSPF TE topotest is using switches to interconnect router. During the test, interfaces are shutdown on some routers to simulate link failure and check that the TED is correctly updated. However, the switche between router avoid the detection by the neighbor router that the interface is down i.e. the interface line remains up as it is conneted to the switch and not to the router. This patch update the tested topology by removing the switch and connect directly the router excepted the inter AS link on R3. Interface are also renamed accordingly. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com> (cherry picked from commit 55ad78575351fa90a2485b99b3665adb74712c65)
2023-12-07tests: Add a noprefixroute testDonald Sharp
Add a simple test case to ensure that the noprefixroute code stays working in the future. Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit 0d5c5472c96c91516ae99c87c7a711237f6b45b2)
2023-12-06topotests: test wrong bfd source in bfd_topo3Louis Scalbert
Test setting a wrong bfd source and restore the source auto parameter. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commit 94640da23492df86a45c1a919bc64f809cd2a1ec)
2023-12-06topotests: redispatch tests in bfd_topo3Louis Scalbert
Redispatch tests in bfd_topo3 in order to prepare next commit. Cosmetic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commit 8f5bf65f267f5a60a08a4206ea32ced39a51a100)
2023-12-06pbrd: fix map seq installed flag in jsonChirag Shah
Ticket:#3638598 Testing: Post fix: tor-2# show pbr map json [ { "name":"global-vrf-PBR-map", "valid":true, "policies":[ { "id":1, "sequenceNumber":10, "ruleNumber":309, "vrfUnchanged":false, "installed":true, <<<< now display correct value "installedReason":"Valid", "vrfName":"sym_1", "matchSrc":"10.1.200.0\/24", "matchDst":"10.6.200.0\/24" } ] } Signed-off-by: Chirag Shah <chirag@nvidia.com> (cherry picked from commit 64745d413ccf0b87df540bcf9e8a2b1dcbb893e2)
2023-11-21tests: Set community for conditionally advertised routesDonatas Abraitis
Just to make sure we don't crash bgpd with double-free if an existing route already exists. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 8eba97d3954d466b171e283b289710ad7544df65)
2023-11-09tests: Check received prefixes before immediately sending dynamic capabilitiesDonatas Abraitis
If we send capabilities immediately, before receiving an UPDATE message, we end up with a notification received from the neighbor. Let's wait until we have the fully converged topology and do the stuff. Tested locally and can't replicate the failure, let's see how happy is the CI this time. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-09tests: take into account fix for NLRI IndexFrancois Dumontet
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com> (cherry picked from commit 7df8e65e812178e0dfa44285454b82f52339e2f4)
2023-10-30tests: Adopt ospf6_gr_topo1 tests for OSPFv3 loopback cost as 0Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 8aeb17d692f3041841789a4c518d99a7a3e8a82b)
2023-10-30tests: Use igpMetric as 10 not 20, after OSPFv3 loopback cost changesDonatas Abraitis
Fixes: fa3140f7927838c432a02ee4f1c1847387b7be6d ("ospf6d: Set loopback interface cost to 0") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit d7e97146439db054653c0fa12290a67c9bea3b80)
2023-10-30tests: Check if OSPFv3 loopback interface gets cost as 0Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit e8615867d08f0c79096c1270695fa5c52d689a87)
2023-10-27tests: have unit-test check more paths for the grpc.so moduleChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net> (cherry picked from commit 8e630c29465a44761814f61b56c6d00878c4919e)
2023-10-23tests: Check if BGP conditional advertisement works fine with static routesDonatas Abraitis
If we modify the prefix-list that is used to define the routes to be advertised, all of them MUST be advertised. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 3c9415125818b54416bd89b9f703f987ff91746c)
2023-10-15tests: Add OSPF test for issue 14488Denis Krienbühl
OSPF on IPv4/IPv6 removes the wrong routes in certain cases, causing issues when removing and re-enabling interfaces. This test proofs that. These tests all pass with https://github.com/FRRouting/frr/pull/13340 and the latest master (d2324b7b4a02e9ef6a219578567932addeb7f593). See https://github.com/FRRouting/frr/issues/14488 Signed-off-by: Denis Krienbühl <denis.krienbuehl@cloudscale.ch> (cherry picked from commit 616e1fa9df13cf2f269fdfb70b9bae7cd592fc4e)
2023-10-11Revert "lib: register bgp link-state afi/safi"Donald Sharp
This reverts commit 1642a68d60cfade4b2fce72aaef58dea700c65c3. (cherry picked from commit 0dc12c9003a865c7ee829543d40e8c285863abe8)
2023-10-11Revert "tests: add bgp_linkstate_topo1"Donald Sharp
This reverts commit a0e6cd4c8fb954f66546b056b0016b4ca7a0a430. (cherry picked from commit c4edb3a453b524fa5e4f81706f997a6667287f2c)
2023-10-11Revert "tests: add link-state attribute display in bgp_linkstate_topo1"Donald Sharp
This reverts commit 5727195cbf7d4c5ea63e307d553e039fa1f9e96f. (cherry picked from commit 547a0d02aa1a5919662ddf380d401d02490ff854)
2023-10-05Merge pull request #14534 from mjstapp/fix_topo_nhgidDonald Sharp
tests: locate nhg id from json output in all_proto_startup
2023-10-05tests: locate nhg id from json output in all_proto_startupMark Stapp
Don't hard-code a sharpd nhg id: those values aren't stable if the daemons/protos/route-types change. Use json show output to find the id in the 'resilient' nhg test case in the all_protocol_startup suite. Signed-off-by: Mark Stapp <mjs@labn.net>
2023-10-03Merge pull request #14511 from ↵Russ White
opensourcerouting/fix/bgpd_software_version_capability bgpd: Validate maximum length of software version when handling via dynamic caps
2023-10-02topotests: add bgp_large_comm_list_match testPhilippe Guibert
Add a topotest to check for proper functioning of the bgp large community list match operation under a route-map. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-10-02bgpd: add 'match community-list any' functionPhilippe Guibert
There is no match mechanism to match one community from the incoming community-list. Add the 'any' keyword to the 'match route-map' command of communit-list and large-community-list. > match community-list AAA any > match large-community-list AAA any Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-09-29tests: Make sure we have a valid FRRouting software version stringDonatas Abraitis
It can't begin with anything else, otherwise something is broken on the wire. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-09-26Merge pull request #12649 from louis-6wind/bgp-link-stateRuss White
bgpd: add basic support of BGP Link-State RFC7752
2023-09-24Merge pull request #14473 from cscarpitta/bugfix/fix-srv6-topotest-warningDonatas Abraitis
tests: Fix DeprecationWarning in SRv6 L3VPN topotest
2023-09-23Merge pull request #14470 from ↵Donald Sharp
opensourcerouting/fix/rewrite_dynamic_capabilities_tests tests: Improve BGP dynamic capability tests
2023-09-22tests: Fix DeprecationWarning in SRv6 L3VPN topotestCarmine Scarpitta
Fix the following warning: tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py:42 /media/SharedUTM/workspace/frr/tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py:42: DeprecationWarning: invalid escape sequence '\ ' In test_bgp_srv6l3vpn_sid.py we have a comment containing some '\' characters. Python mistakenly tries to interpret such "\" characters as escape sequences, which leads to the above warning. Let's tell Python to treat the comment as a raw string, so that it simply treats backslashes as literal characters rather than escape sequences. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2023-09-22Merge pull request #14450 from kuldeepkash/general_fixesDonald Sharp
tests: Adding BGP convergence verification before starting PIM tests
2023-09-22tests: Check notification/capability received message stats instead of ↵Donatas Abraitis
reset/established Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-09-22tests: Use frr.conf for bgp_dynamic_capabily testsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-09-20tests: Fix for issue when RP is changedKuldeep Kashyap
Issue: https://github.com/FRRouting/frr/issues/14057 Fix: Added some sleep to make sure prune is received before RP is changed. Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-09-20tests: Adding BGP convergence verification before starting PIM testsKuldeep Kashyap
Issue: Sometimes BGP neighbors are not up before doing any PIM operation, that is causing some tests failures. https://github.com/FRRouting/frr/issues/14441 Fix: Added BGP convergence for all tests where BGP is used to make sure all BGP neigbhors Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-09-20tests: add srv6 multiple segs SIDs topotestDmytro Shytyi
Configure and verify the installed srv6 route with multiple segs SIDs Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2023-09-20Merge pull request #14442 from mjstapp/fix_no_ctimeDonald Sharp
bgpd, pathd: replace ctime() with ctime_r()
2023-09-20Merge pull request #14440 from fdumontet6WIND/fix_oid_bgp4v2Donatas Abraitis
bgpd: fix SNMP oid in bgp4v2
2023-09-19tests: replace ctime with ctime_rMark Stapp
Replace ctime with ctime_r in bgp test. Signed-off-by: Mark Stapp <mjs@labn.net>