Commit Graph

4181 Commits

Author SHA1 Message Date
Philippe Guibert
eb570f0a70 topotests: bgp_bmp, add a test to check for bgp vrf peer loc-rib message
Add a test where, when the vrf interface is flapping, a peer down and a
peer up message are sent. This test, when used with ASAN, detects the
memory leak of the open_tx and open_rx messages of the loc-rib.

Refresh the method of updating the SEQ value when reading the peer
messages: only update to the last matching SEQ value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-30 15:13:37 +01:00
Donatas Abraitis
6fb7b3401b tests: Check prefix statistics for path-attribute discard/withdraw
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-30 12:27:00 +02:00
Dmytro Shytyi
5f50b98f8e
tests: add bgp rpki topo1 rpkiValidationState
Topotest to verify the next key-value "rpkiValidationState": "valid"

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-12-30 09:45:26 +01:00
Donatas Abraitis
3f6c106e48
Merge pull request #17718 from cscarpitta/fix/fix-srv6-static-route-pytestmark
tests: Fix markers in `srv6_static_route` topotest
2024-12-26 14:17:21 +02:00
Jafar Al-Gharaibeh
803ff41cc4
Merge pull request #17647 from LabNConsulting/fix-oper-test
tests: enable test failure detection and fix resulting failures
2024-12-24 12:35:32 -06:00
Carmine Scarpitta
225a1c7ed6 tests: Fix markers in srv6_static_route topotest
`srv6_static_route` is a pure staticd topotest. It does not have any
dependency on bgpd and sharpd.

Let's fix the pytestmark to include only staticd.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-24 10:38:37 +01:00
Christian Hopps
3d3ee2a1af tests: enable failure and fix broken tests
This test was not actually failing when the results didn't match. Fail
now. Also fix the tests that are now found to be failing incorrectly
(wrong expected result).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-24 03:04:23 -05:00
Donatas Abraitis
9ce3b144c9
Merge pull request #17580 from varuntumbe/dev/label_pool_release_fix
BGP Labelpool : Releasing the label in labelpool when VPN session gets removed
2024-12-23 14:48:21 +02:00
Donatas Abraitis
9047ce6d9c tests: Check if enforce-first-as is working with peer-groups
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-21 17:08:01 +02:00
Jafar Al-Gharaibeh
f7fcc44292
Merge pull request #17674 from opensourcerouting/fix/bgp_show_advertised_routes_detail
bgpd: Fix show neighbor X advertised-routes detail
2024-12-20 14:01:34 -06:00
Donatas Abraitis
7508d72db9 tests: Ignore totalRoutes, totalPaths when checking strict output
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-19 21:44:50 +02:00
Donatas Abraitis
ddab988cce tests: Check if we received a DECENT amount of prefixes/paths
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-19 18:24:50 +02:00
Christian Hopps
5d7737b7eb test: fix label ordering on error diff report
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-19 08:13:04 -06:00
Donald Sharp
4a0e8ed8da
Merge pull request #17671 from Jafaral/static-propagation
tests: add a test case for static route propagation
2024-12-19 08:53:06 -05:00
Donatas Abraitis
b23c6e522d tests: Check if we can see advertised routes with route-map applied
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-19 10:02:19 +02:00
Jafar Al-Gharaibeh
f78b1786a6
Merge pull request #17599 from opensourcerouting/fix/reduce_default_connect_timer
bgpd: Connect retry timer backoff
2024-12-18 16:26:37 -06:00
Jafar Al-Gharaibeh
76f403cf75 tests: add a test case for static route propagation
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-12-18 12:16:15 -06:00
Russ White
c8ba5b09b3
Merge pull request #17544 from anlancs/zebra/fix-plug-interface
zebra: fix wrong nexthop status for kernel routes
2024-12-17 11:16:32 -05:00
Russ White
a3e0e4eb49
Merge pull request #17526 from raja-rajasekar/rajasekarr/evpn_bp_and_optimizations_3864372_FINAL_upstream
EVPN L2VNI/L3VNI Optimize inline Global walk for remote route installations
2024-12-17 11:15:27 -05:00
anlan_cs
2f1bd3fe4d tests: add nexthop/interface's down/up topo for kernel routes
Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-12-17 16:14:35 +08:00
varuntumbe
c8e624bfd5 topotests: Adding a test to control release of BGP labels
Adding the topotest which verifies whether label beloning to corresponding chunk has been released properly or not once
we remove the vpn session

Signed-off-by: Varun Hegde <varuntumbe1@gmail.com>
2024-12-16 21:27:28 +05:30
Rafael Zalamena
3bebb7be92
Merge pull request #17252 from nabahr/mcast-mode
Fix PIMD RPF lookup mode and nexthop tracking
2024-12-16 09:57:31 -03:00
Nathan Bahr
d334f84156 tests: Add new pim mrib tests
Test mrib overrides and rpf lookup mode changes.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-13 17:36:34 +00:00
Nathan Bahr
ba0a6868e5 test: Fix tests for zebra changes
Remove use of `ip multicast rpf-lookup-mode` from unrelated tests.
Looks like this test was just unlucky enough to pick that command as an
example for use here. Just changed it to something less likely to be
removed in the future.
Update route table output to include AFI SAFI output.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-12 13:50:31 +00:00
Rafael Zalamena
0a9422f721 topotests: topology to test MSDP originator ID
Import new topology to test originator ID configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-12-12 10:34:21 -03:00
Donatas Abraitis
4ac77b199e tests: Wait 30 seconds for a notification check (minimum hold-time)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-11 17:20:49 +02:00
Philippe Guibert
95ccb5d01d bgpd, topotests: bmp, fix wrong peer distinguisher value for peer vrf up/down
When running the bgp_bmp_2 vrf test, peer vrf up/down events from the pre
and post policy are received with a wrong peer distinguisher value.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "0:0",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

RFC7854 mentions in 4.2 that if the peer is a "RD Instance Peer", it is
set to the route distinguisher of the particular instance the peer
belongs to.

Fix this by modifying the BMP client, update the peer distinguisher
value by filling the peer distinguisher in the bmp_peerstate function.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "444:1",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

Add a test to check that peer_distinguisher value is not 0:0 when an
RD instance is set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:48:01 +01:00
Philippe Guibert
188ba91082 bgpd, topotests: bmp, fix wrong peer type for peer up/down events
When running the bgp_bmp_2 vrf test, peer up/down events from the pre
and post policy are received with a wrong peer type value

> {"peer_type": "global instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-16 21:59:53.111962",
> "bmp_log_type": "peer up", "local_ip": "192.168.0.1", "local_port": 179,
> "remote_port": 50710, "seq": 4}

RFC7854 defines RD instance peer type, and later in 4.2 requests that
the peer distinguisher value be set to non zero value when the peer type
is not global. This is the case for peer vrf instances.

Fix this by modifying the BMP client, update the peer type
value by updating the peer type value when sending peer up/down messages.

Add a check in the bgp_bmp_2 test to ensure that peer type is correctly
set.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "0:0",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:47:56 +01:00
Philippe Guibert
bc3a19e253 bgpd, topotests: bmp, fix wrong peer distinguisher for vrf route events
When running the bgp_bmp_2 vrf test, peer route messages from the pre
and post policy are received with a wrong peer distinguisher value.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

RFC7854 mentions in 4.2 that if the peer is a "RD Instance Peer", it is
set to the route distinguisher of the particular instance the peer
belongs to.

Fix this by modifying the BMP client:
- update the peer distinguisher value by unlocking the filling of the peer distinguisher in the function.
This change impacts monitoring messages.
- add the peer distinguisher computation for mirror messages
- modify the bgp_bmp_2 vrf test, update the peer_distinguisher value

> {"peer_type": "route distinguisher instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "444:1", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:29:37 +01:00
Philippe Guibert
96aea62fe2 bgpd, topotests: bmp, fix wrong peer type for vrf route messages
When running the bgp_bmp_2 vrf test, peer route messages from the pre
and post policy are received with a wrong peer type value

> {"peer_type": "global instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

In addition to global instance peers, RFC7854 defines RD instance peers.
This value can be used for peers which are on a BGP VRF instance, for
example with an L3VPN setup.

When configuring a BGP VRF instance, the peer type should be seen as an
RD instance peer.

Fix this by modifying the BMP client:
- update the peer type for vrf mirror and monitoring messages
- modify bgp_bmp_2 vrf test to control the peer_type value

> {"peer_type": "route distinguisher instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:29:37 +01:00
Philippe Guibert
d55a5864dd topotests: bgp_bmp, expose peer_distinguisher in loc-rib
The BMP implementation currently only supports global and
loc-rib instance types. When loc-rib is selected, the
peer_distinguisher is set to the route distinguisher of
the L3VRF where the BGP instance is. This functionality has
not been tested until now, because the peer distinguisher
value had been explicitly omitted in the bmp messages.

Expose the peer distinguisher value in all BMP messages
received. This change requires to modify the expected output
for loc-rib when the BGP instance is in a L3VRF.

The handling of peer distinguisher value for RD instances
will follow in the next commits.

Link: https://www.rfc-editor.org/rfc/rfc7854.html#section-4.2

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:29:37 +01:00
Jafar Al-Gharaibeh
ccb57ad10f
Merge pull request #17521 from opensourcerouting/msdp-sa-limit
pimd: MSDP per peer SA limit
2024-12-10 11:36:50 -06:00
Russ White
3f6bf6d03c
Merge pull request #17608 from opensourcerouting/fix/vpn_import_routes_allowas-in
bgpd: Import allowed routes with self AS if desired
2024-12-10 11:24:15 -05:00
Rajasekar Raja
0f2cb27310 bgpd: backpressure - Optimize EVPN L3VNI remote routes processing
Anytime BGP gets a L3 VNI ADD/DEL from zebra,
 - Walking the entire global routing table per L3VNI is very expensive.
 - The next read (say of another VNI ADD/DEL) from the socket does
   not proceed unless this walk is complete.

So for triggers where a bulk of L3VNI's are flapped, this results in
huge output buffer FIFO growth spiking up the memory in zebra since bgp
is slow/busy processing the first message.

To avoid this, idea is to hookup the BGP-VRF off the struct bgp_master
and maintain a struct bgp FIFO list which is processed later on, where
we walk a chunk of BGP-VRFs and do the remote route install/uninstall.

Ticket :#3864372

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-12-09 08:46:16 -08:00
Donatas Abraitis
77857dc210 tests: Check if vpn routes can be imported if allowas-in is set
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-08 21:44:52 +02:00
Corey Siltala
7c2c70dd2b tests: Add basic multicast boundary test
Add simple test to show filtering of IGMP joins using new "ip multicast
boundary" filtering with access-lists, include test of existing prefix-
list based "ip multicast boundary oil" command.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:52 -06:00
Donatas Abraitis
03ea25af68
Merge pull request #17545 from pguibert6WIND/peerup_loc_rib_wrong_format
bgpd: fix peer up message for loc-rib not sent
2024-12-06 14:47:48 +02:00
Donatas Abraitis
3d15035491
Merge pull request #17579 from donaldsharp/timer_connect_bgp_vrf_netns
Timer connect bgp vrf netns
2024-12-06 14:26:33 +02:00
Donald Sharp
a5c5b87389 tests: Fix invalid escape seq seen in bgp_nexthop_ipv6
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 14:08:20 -05:00
Donald Sharp
dc372568ad tests: Convert to using neighbor X timers connect 1 for exabgp using tests
For those tests using exabgp convert them all to use `neighbor X timers
connect 1`.  I have noticed that occassionally when looking at the
support files for tests run that peers are in a wait period for
reconnecting which is longer than the test is waiting to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 14:08:12 -05:00
Donald Sharp
645a82ec60 tests: bfd_profiles_topo1 is taking a long time to reconnect
Make it faster

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 10:19:55 -05:00
Philippe Guibert
f921a8d09a topotests: bmp, test that loc-rib peer up message is sent
Add a test at startup to ensure that peer up message for loc-rib is
correctly set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-05 15:42:10 +01:00
Rafael Zalamena
0d904c28c3 topotests: test new MSDP SA limit feature
Test that only the limit amount of SAs is learned from the peer.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-12-05 10:38:56 -03:00
Jafar Al-Gharaibeh
59b0a6e339
Merge pull request #17502 from opensourcerouting/msdp-shutdown
pimd: implement MSDP shutdown command
2024-12-04 21:57:18 -06:00
Russ White
e9c9db0122
Merge pull request #17542 from opensourcerouting/fix/peer-group_remote_as_regression
bgpd: Fix remote-as with peer-group
2024-12-03 10:05:44 -05:00
Mark Stapp
426dc2b7e2
Merge pull request #17547 from donaldsharp/some_cleanups
Some cleanups
2024-12-03 08:57:28 -05:00
Philippe Guibert
d1301f1c2a topotests: save bgp_bmp json temp files to bmp log folder instead of /tmp
Some temporary files are hardwritten in /tmp folder. Use the bmp log
folder instead. Replace the bmp log file argument with bmp log folder.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 18:44:53 +01:00
Louis Scalbert
f2eb14d381 tests: save bmp pcap in logdir instead of /tmp
DEBUG_PCAP can be set True to manually enable pcap debugging when
running bmp tests.

Save bmp pcap in logdir (ie. /tmp/topotests/bgp_bmp.bgp_bmp_X/ instead
of /tmp.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 18:44:53 +01:00
Louis Scalbert
b12e04fdf1 tests: fix bmp test parallelization
Multiple BMP tests can run in parallel but, when one instance ends,
it kills the BMP server process of all BMP tests.

Save the PID of a BMP server and only kill it at the end.

Link: https://github.com/FRRouting/frr/issues/17465
Fixes: 875511c466 ("topotests: add basic bmp collector")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-12-02 18:44:53 +01:00
Louis Scalbert
bbf8ee1769 tests: add py extension to bmpserver
to help identify the file type. And apply black.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-12-02 18:44:53 +01:00
Philippe Guibert
1ea8ba5902 topotests: bgp_bmp, use unified configuration
Use unified configuration procedure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 18:44:50 +01:00
Donald Sharp
0d7d795c00 tests: bgp_route_server_client should not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:59:07 -05:00
Donald Sharp
b109b0cd82 tests: bgp_snmp_mplsl3vpn should not use /tmp directory
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:57:41 -05:00
Donald Sharp
6112030f27 tests: ospf_metric_propagation do not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:55:09 -05:00
Philippe Guibert
2dc693e808 topotests: fix bmp_collector handling of empty as-path
When configuring the bgp_bmp test with an additional
peer that sends empty AS-PATH, the bmp collector is stopping:

> [2024-10-28 17:41:51] Finished dissecting data from ('192.0.2.1', 33922)
> [2024-10-28 17:41:52] Data received from ('192.0.2.1', 33922): length 195
> [2024-10-28 17:41:52] Got message type: <class 'bmp.BMPRouteMonitoring'>
> [2024-10-28 17:41:52] unpack_from requires a buffer of at least 2 bytes for unpacking 2 bytes at offset 0 (actual buffer size is 0)
> [2024-10-28 17:41:52] TCP session closed with ('192.0.2.1', 33922)
> [2024-10-28 17:41:52] Server shutting down on 192.0.2.10:1789

The parser attempts to read an empty AS-path and considers the length
value as a length in bytes, whereas RFC mentions this value as
definining the number of AS-PAths. Fix this in the parser.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 16:54:04 +01:00
Philippe Guibert
0af653eaf7 topotests: bmp, create shared library for bmp
The bgp_bmp and bgp_bmp_vrf tests use similar routines
to test the bmp, but are duplicates. Gather the bgp_bmp
and the bgp_bmp_vrf tests in a single bgp_bmp folder.

- Create a bgpbmp.py library under the bgp_bmp test folder
- The bgp_bmp and bgp_bmp_vrf test are renamed to bgp_bmp_1
and bgp_bmp_2 test.
- Maintain separate folder for config and output results. Adapt
the bgp_bmp library accordingly.
- The json output for bgp_bmp_2 test has no referenc to hostame.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 16:54:04 +01:00
Donald Sharp
caf9cddcf6 tests: ospf_multi_instance should not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:52:40 -05:00
Donald Sharp
04b29f61b5 tests: ospf_multi_vrf_bgp_route_leak should not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:52:01 -05:00
Donald Sharp
e3ee41c7f2 tests: ospf_netns_vrf should not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:51:13 -05:00
Donald Sharp
3b9db86e13 tests: ospf_p2mp should not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:49:58 -05:00
Donald Sharp
aeeb7fe68b tests: ospf_prefix_suppression should not use /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:48:20 -05:00
Donald Sharp
649eb5cdc3 tests: pim_autorp should not use /tmp
Cleanup usage of log file into /tmp.  Remove usage of
debugs that will slow down test and remove password.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:46:50 -05:00
Donald Sharp
d5687faa0c tests: pim_basic should not use /tmp for outputing of files
Use the appropriate log directory.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:44:46 -05:00
Donald Sharp
d580bcd6e7 tests: simple_snmp_test should not use /tmp for logging
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:41:25 -05:00
Donald Sharp
12b032abb8 tests: pim_cand_rp_bsr uses /tmp directory and it should not
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:40:42 -05:00
Donald Sharp
67d697ad26 tests: zebra_rib should not use /tmp for log files
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:39:13 -05:00
Donald Sharp
6e552125e9 tests: bgp_nexthop_ipv6 remove unused reference to /tmp
This code should not be outputting anything to the /tmp directory,
remove commented out code

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:38:23 -05:00
Donald Sharp
66ea35cbb5 tests: bgp_lu_topo[1|2] should not use log files in /tmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-02 10:36:15 -05:00
Donatas Abraitis
6f1ad10d90 tests: Check if remote-as is not flushed once peer-group applied
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-01 14:50:48 +02:00
Donatas Abraitis
ee5a3456d3
Merge pull request #17525 from famfo/podman-tests
topotests: Allow runing under both docker and podman
2024-11-29 10:02:12 +02:00
famfo
d87ec38dfd
topotests: Allow runing under both docker and podman
Signed-off-by: famfo <famfo@famfo.xyz>
2024-11-28 14:59:29 +01:00
Philippe Guibert
b8b7a615ac topotests: bgp_evpn_rt5, add test for advertise route-map service
Use the advertise route-map command, and check that it
filters out correctly the undesirable prefixes. Reversely,
check that undoing that route-map recovers all prefixes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-11-27 08:47:24 +01:00
Philippe Guibert
fe272d3508 topotests: bgp_evpn_rt5, rework test
Rework the test file by adding test methods.
Add a convergence test that checks for the incoming BGP prefixes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-11-27 08:47:19 +01:00
Jafar Al-Gharaibeh
5c1154beaf
Merge pull request #16878 from donaldsharp/increased_test_cover
Add some test cases, and some ability to see what is going on in zebra
2024-11-26 13:40:39 -06:00
Russ White
842da0d00e
Merge pull request #17501 from opensourcerouting/fix/gr_peer-groups
bgpd: Fix Graceful-Restart for peer-groups
2024-11-26 10:35:19 -05:00
Russ White
c84a680097
Merge pull request #14367 from donaldsharp/ospfapi_test_failure
two test cleanups
2024-11-26 10:13:59 -05:00
Russ White
0a40e044ac
Merge pull request #17219 from zhou-run/202406201119
isisd: When the ISIS types of the routers do not match on a P2P link, the neighbor status remains UP
2024-11-26 10:10:33 -05:00
Donatas Abraitis
f3189d797d tests: Deprecate TOPOTEST_PULL
We do not maintain docker.com/frrouting anymore and not building custom
images for topotests.

Use local images for topotests instead.

Just use:

```
mak topotests-build
make topotests
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-26 11:42:49 +02:00
Donatas Abraitis
6eb3a60289 tests: Set vm.mmap_rnd_bits for topotests docker foobar
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-26 11:34:12 +02:00
Donatas Abraitis
2484793bc5 tests: Fix docker build for topotests
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-26 11:26:55 +02:00
Rafael Zalamena
2c79f3532e topotests: test MSDP shutdown command
New test step to check that MSDP shutdown command is working.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-25 19:23:36 -03:00
Donald Sharp
bf05536741 tests: fix max med on startup
The test is failing because on r2 we are looking for a metric of 777
on startup, but the start of looking for this happens to be after
the 5 second delay that is setup in the config.

On r1:

2023/09/06 17:05:14.999407 BGP: [G822R-SBMNH] config-from-file# router bgp 65001
2023/09/06 17:05:15.003060 BGP: [G822R-SBMNH] config-from-file#   bgp max-med on-startup 5 777
2023/09/06 17:05:15.003342 BGP: [G822R-SBMNH] config-from-file#   no bgp ebgp-requires-policy
2023/09/06 17:05:15.003453 BGP: [G822R-SBMNH] config-from-file#   neighbor 192.168.255.2 remote-as 65001
2023/09/06 17:05:15.004029 BGP: [G822R-SBMNH] config-from-file#   neighbor 192.168.255.2 timers 3 10
2023/09/06 17:05:15.004242 BGP: [G822R-SBMNH] config-from-file#   address-family ipv4 unicast
2023/09/06 17:05:15.004329 BGP: [G822R-SBMNH] config-from-file#     redistribute connected
2023/09/06 17:05:15.005023 BGP: [G822R-SBMNH] config-from-file#   exit-address-family
2023/09/06 17:05:15.005140 BGP: [G822R-SBMNH] config-from-file#   !
2023/09/06 17:05:15.005162 BGP: [G822R-SBMNH] config-from-file# !
2023/09/06 17:05:17.538112 BGP: [M7Q4P-46WDR] vty[25]@> enable
2023/09/06 17:05:17.546700 BGP: [M7Q4P-46WDR] vty[25]@# clear log cmdline-targets
2023/09/06 17:05:17.570635 BGP: [M7Q4P-46WDR] vty[25]@(config)# log commands
2023/09/06 17:05:17.572518 BGP: [M7Q4P-46WDR] vty[25]@(config)# log timestamp precision 6
2023/09/06 17:05:24.982647 BGP: [YNGC8-65JDM] Begin maxmed onstartup mode - timer 5 seconds
2023/09/06 17:05:26.033134 BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.255.2 in vrf default
2023/09/06 17:05:29.982960 BGP: [N1747-51Y51] Max med on startup ended - timer expired.

on r2:

2023/09/06 17:05:23.976029 BGP: [G822R-SBMNH] config-from-file# !
2023/09/06 17:05:26.084086 BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.255.1 in vrf default
2023/09/06 17:05:27.280103 BGP: [M7Q4P-46WDR] vty[25]@> enable
2023/09/06 17:05:27.290204 BGP: [M7Q4P-46WDR] vty[25]@# clear log cmdline-targets
2023/09/06 17:05:27.328798 BGP: [M7Q4P-46WDR] vty[25]@(config)# log commands
2023/09/06 17:05:27.335032 BGP: [M7Q4P-46WDR] vty[25]@(config)# log timestamp precision 6
2023/09/06 17:05:31.558216 BGP: [M7Q4P-46WDR] vty[5]@> enable
2023/09/06 17:05:31.562482 BGP: [M7Q4P-46WDR] vty[5]@# do show logging
2023/09/06 17:05:32.942204 BGP: [M7Q4P-46WDR] vty[5]@> enable
2023/09/06 17:05:32.946745 BGP: [M7Q4P-46WDR] vty[5]@# show ip bgp neighbor 192.168.255.1 json
2023/09/06 17:05:34.173879 BGP: [M7Q4P-46WDR] vty[5]@> enable
2023/09/06 17:05:34.178448 BGP: [M7Q4P-46WDR] vty[5]@# show ip bgp neighbor 192.168.255.1 routes json
2023/09/06 17:05:36.459365 BGP: [M7Q4P-46WDR] vty[5]@> enable
2023/09/06 17:05:36.472019 BGP: [M7Q4P-46WDR] vty[5]@# show ip bgp neighbor 192.168.255.1 routes json
2023/09/06 17:05:38.557840 BGP: [M7Q4P-46WDR] vty[5]@> enable
2023/09/06 17:05:38.558948 BGP: [M7Q4P-46WDR] vty[5]@# show ip bgp neighbor 192.168.255.1 routes json
2023/09/06 17:05:40.198563 BGP: [M7Q4P-46WDR] vty[5]@> enable

Notice that the 5 second delay for the max med expires at 29 seconds but the show routes
on r2 does not even begin until 34 seconds, long after the max med has expired and the
test has moved on.

Let's relax the max-med timer to 30 seconds and modify the test to wait a bit longer for
both finding it and expiring timer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-25 13:22:32 -05:00
Donald Sharp
4f032a44a4 tests: Fix ospfapi client to clear ospf process
Test is failing locally:
2023-09-06 18:39:56,865 DEBUG: r1: vtysh result:
        Hello, this is FRRouting (version 9.1-dev).
        Copyright 1996-2005 Kunihiro Ishiguro, et al.

        r1# conf t
        r1(config)# router ospf
        r1(config-router)# ospf router-id 1.1.1.1
        For this router-id change to take effect, use "clear ip ospf process" command
        r1(config-router)#
2023-09-06 18:39:56,865 DEBUG: root: GOT LINE: 'SUCCESS: 1.0.0.0'
2023-09-06 18:39:56,866 DEBUG: root: GOT LINE: '2023-09-06 18:39:55,982 INFO: TESTER: root: Waiting for 1.1.1.1'
2023-09-06 18:39:56,867 DEBUG: root: GOT LINE: '2023-09-06 18:39:55,982 DEBUG: TESTER: root: expected '1.1.1.1' != '1.0.0.0''
2023-09-06 18:39:56,867 DEBUG: root: GOT LINE: 'waiting on notify'

Sure looks like the router-id is not allowed to be changed because
neighbors have already been formed.  If we are changing the router-id
then let's clear the process to allow it to correctly change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-25 13:20:50 -05:00
Donald Sharp
04361b3059 tests: Add some test cases for snmp
Noticed that we were not really attempting to even test
large swaths of our snmp infrastructure.  Let's load
up some very simple configs for those daemons that
FRR supports and ensure that SNMP is working to
some extent.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-25 13:12:10 -05:00
Donald Sharp
c23f505f45 tests: Add some test cases for missed coverage
I noticed that there was some missed code coverage in zebra.
multicast [enable|disable]
and
show interface description vrf all

Add a bit to get it covered.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-25 13:12:10 -05:00
Donatas Abraitis
0bacbc6493
Merge pull request #17369 from louis-6wind/bgp_vpnv4_route_leak_basic
tests: add bgp_vpnv4_route_leak_basic
2024-11-25 15:25:14 +02:00
Donatas Abraitis
a4bfa8c574 tests: Check if GR settings are inherited for peer-groups
Convert to unified config also.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-25 10:44:58 +02:00
Donald Sharp
d745f4eae5
Merge pull request #17459 from opensourcerouting/fix/disable_rpki_community_by_default
bgpd: Disable sending ROV extended community by default
2024-11-23 09:13:06 -05:00
Jafar Al-Gharaibeh
440a0d3f76
Merge pull request #17477 from donaldsharp/topo_connected_installed
tests: Ensure connected routes are installed before continuing
2024-11-21 14:28:23 -06:00
Jafar Al-Gharaibeh
58abc856b5
Merge pull request #17473 from donaldsharp/bgp_bmp_and_its_ilk
Bgp bfd and its ilk
2024-11-21 14:17:48 -06:00
Rafael Zalamena
a3e04a86d2
Merge pull request #17340 from nabahr/mapping-agent
PIMD: Implement AutoRP mapping-agent
2024-11-21 16:10:42 -03:00
Donald Sharp
0af5c2a6eb
Merge pull request #17469 from opensourcerouting/msdp-logs
pimd: MSDP logging improvements
2024-11-21 13:45:58 -05:00
Russ White
7724d697da
Merge pull request #17436 from LabNConsulting/aceelindem/ospf-multi-instance-default
ospfd: OSPF multi-instance default origination fixes
2024-11-21 09:20:26 -08:00
Donald Sharp
058faf605d tests: Ensure connected routes are installed before continuing
Upon high load the ospf_instance_redistribute test can attempt
to install routes with sharpd before the connected routes have
fully baked themselves into zebra.  Since sharpd intentionally
has no retry mechanism we need to ensure that the test is waiting
a small bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-21 09:26:52 -05:00
Rafael Zalamena
0b0648f15c topotests: test new log toggle
Test MSDP new log toggle: the MSDP peer connection state and SA events
should be logged.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-21 10:26:16 -03:00
Louis Scalbert
82a540dcd4 tests: add bgp_vpnv4_route_leak_basic
bgp_vrf_route_leak_basic uses "import/export vrf" commands to perform
route leaks between VRF on the r1 router. The same result can be
achieved by using the "route-target import / export" commands.

Copy bgp_vrf_route_leak_basic to bgp_vpnv4_route_leak_basic. Change
BGP configuration to handle the route leaks with "route-target import /
export". Change to retry timers.  No other changes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-11-21 11:22:22 +01:00
Donald Sharp
6a945b4104 tests: zebra_fec_nexthop_resolution improve
a) timers are really large preventing convergence in 30 seconds
b) The same configuration does not need to be initiated 60 times
when things are not working properly.  Once is enough.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-20 16:11:22 -05:00
Nathan Bahr
13c0722b5c tests: PIM AutoRP tests expanded
Now with a full AutoRP implementation, we can test AutoRP in a full network setup
beginning with candidate RP announcements all the way through discovery and active RP
selection.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-19 22:33:11 +00:00
Donald Sharp
172a2aa533
Merge pull request #17156 from opensourcerouting/eradicate-strncpy
*: remove remaining `strncpy()` users
2024-11-19 09:42:39 -05:00
Donatas Abraitis
8cc6359fdc bgpd: Disable sending ROV extended community by default
https://datatracker.ietf.org/doc/html/rfc8097 defines ROV extended community,
but https://datatracker.ietf.org/doc/draft-ietf-sidrops-avoid-rpki-state-in-bgp
is against sending it by default even for iBGP peers.

Let's do this practice and reverse it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-19 16:25:12 +02:00
Krishnasamy R
355d5e2dac bgpd: add topotest for show bgp router json command
This commit has changes to validate show bgp router json command

Signed-off-by: Krishnasamy R <krishnasamyr@nvidia.com>
2024-11-18 18:59:01 -08:00
Acee Lindem
82f4349402 tests: Add topotest for OSPF multi-instance default origination.
This change adds a topotest to test various case of OSPF multi-instance
origination including cases where the criteria route is from another
instance of OSPF, as well as the same OSPF instance (where a default
should not be originated).

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-11-18 17:05:31 +00:00
Donatas Abraitis
77df36c3b9 lib: Fix Lua script unit test
When building for big-endian architectures, this is failing because of
long long / int casting issues, let's use a separate integer to get the
results.

This is especially important when building the Docker images for multiple arches.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-18 17:25:08 +02:00
Jafar Al-Gharaibeh
7c46eb68d4
Merge pull request #17435 from opensourcerouting/fix/bgp_allow_0.0.0.0_if_multiple_nlris_exist
bgpd: Validate both nexthop information (NEXTHOP and NLRI)
2024-11-16 19:32:04 -06:00
Donatas Abraitis
229466ebd1 tests: Check if IPv6 prefix has a valid nexthop if multiple NLRIs exist
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-15 16:39:32 +02:00
Rafael Zalamena
744633eed0 topotests: new embedded RP topology test
Test embedded RP features:
- Embedded RP itself
- Embedded RP group list filtering
- Embedded RP limit

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Russ White
5456bc5d93
Merge pull request #17331 from Jafaral/ospf-instance
tests: add support for ospf instances  with unified configs
2024-11-12 18:00:46 -05:00
Jafar Al-Gharaibeh
92ecd0a5d4 tests: add support for ospf instances with unified configs
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-11-12 10:51:33 -06:00
Russ White
d1d8aeec86
Merge pull request #17368 from louis-6wind/bgp_vpnv4_asbr-clarify
tests: clarify bgp_vpnv4_asbr
2024-11-12 11:40:01 -05:00
Donatas Abraitis
2c08d9f824 tests: Check if BFD session is created with update-source (interface)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-12 13:12:56 +02:00
Donatas Abraitis
55dcbd3292 tests: Check if BGP BFD session is created correctly with multihop/update-source
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-11 17:07:45 +02:00
Donatas Abraitis
1dcb4bb2d3
Merge pull request #17362 from raja-rajasekar/rajasekarr/src_proto_for_redist_cmd
bgpd: Fix for match source-protocol in route-map for redistribute cmd
2024-11-09 22:01:44 +02:00
Rajasekar Raja
68358c0f92 bgpd: Fix for match source-protocol in route-map for redistribute cmd
A redistribute cmd can have a route-map attached to it and adding the
match source-protocol to that route-map means BGP to filter which
protocol routes to accept among the bunch of routes zebra is sending.

Fixing this since this wasnt implemented earlier.

Ticket :#4119692

Signed-off-by: Donald Sharp <sharpd@nvidia.com>

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-11-09 08:36:42 -08:00
zhou-run
a6cffa842b isisd: When the ISIS types of the routers do not match on a P2P link, the neighbor status remains UP
Test Scenario:
RouterA and RouterB are in the same routing domain and have configured a P2P link. RouterA is configured with "is-type level-1" while RouterB is configured with "is-type level-1-2". They establish a level-1 UP neighborship. In this scenario, we expect that when RouterB's configuration is switched to "is-type level-2-only", the neighborship status on both RouterA and RouterB would be non-UP. However, RouterB still shows the neighbor as UP.

Upon receiving a P2P Hello packet, the function "process_p2p_hello" is invoked. According to the ISO/IEC 10589 protocol specification, section 8.2.5.2 a) and tables 5 and 7, if the "iih->circ_type" of the neighbor's hello packet does not match one's own "circuit->is_type," we may choose to take no action.
When establishing a neighborship for the first time, the neighbor's status can remain in the "Initializing" state. However, if the neighborship has already been established and one's own "circuit->is_type" changes, the neighbor's UP status cannot be reset. Therefore, when processing P2P Hello packets, we should be cognizant of changes in our own link adjacency type.

Topotest has identified a core issue during testing.
(gdb) bt
"#0  0xb7efe579 in __kernel_vsyscall ()
\#1  0xb79f62f7 in ?? ()
\#2  0xbf981dd0 in ?? ()
\#3  <signal handler called>
\#4  0xb79f7722 in ?? ()
\#5  0xb7ed8634 in _DYNAMIC () from /home/z15467/isis_core/usr/lib/i386-linux-gnu/frr/libfrr.so.0.0.0
\#6  0x0001003c in ?? ()
\#7  0x00010000 in ?? ()
\#8  0xb7df3322 in _frr_mtx_lock (mutex=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/frr_pthread.h:255
\#9  event_timer_remain_msec (thread=0x10000) at ../lib/event.c:734
\#10 event_timer_remain_msec (thread=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/event.c:727
\#11 0x004fb4aa in _send_hello_sched (circuit=<optimized out>, threadp=0x2189de0, level=1, delay=<optimized out>) at ../isisd/isis_pdu.c:2116
\#12 0x004e8dbc in isis_circuit_up (circuit=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../isisd/isis_circuit.c:734
\#13 0x004ea8f7 in isis_csm_state_change (event=<optimized out>, circuit=<optimized out>, arg=<optimized out>) at ../isisd/isis_csm.c:98
\#14 0x004ea23f in isis_circuit_circ_type_set (circuit=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    circ_type=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../isisd/isis_circuit.c:1578
\#15 0x0053aefa in lib_interface_isis_network_type_modify (args=<optimized out>) at ../isisd/isis_nb_config.c:4190
\#16 0xb7dbcc8d in nb_callback_modify (errmsg_len=8192, errmsg=0xbf982afc "", resource=0x2186220, dnode=<optimized out>, event=NB_EV_APPLY, nb_node=0x1fafe70, context=<optimized out>)
    at ../lib/northbound.c:1550
\#17 nb_callback_configuration (context=<optimized out>, event=NB_EV_APPLY, change=<optimized out>, errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:1900
\#18 0xb7dbd646 in nb_transaction_process (errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    event=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:2028
\#19 nb_candidate_commit_apply (transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    save_transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    transaction_id=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/northbound.c:1368
\#20 0xb7dbdd68 in nb_candidate_commit (context=..., candidate=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    save_transaction=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    comment=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, transaction_id=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    errmsg=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, errmsg_len=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>)
    at ../lib/northbound.c:1401
\#21 0xb7dc0cff in nb_cli_classic_commit (vty=vty@entry=0x21d6940) at ../lib/northbound_cli.c:57
\#22 0xb7dc0f46 in nb_cli_apply_changes_internal (vty=vty@entry=0x21d6940, xpath_base=xpath_base@entry=0xbf986b7c "/frr-interface:lib/interface[name='r5-eth0']", clear_pending=clear_pending@entry=false)
    at ../lib/northbound_cli.c:184
\#23 0xb7dc130b in nb_cli_apply_changes (vty=<optimized out>, xpath_base_fmt=<optimized out>) at ../lib/northbound_cli.c:240
\#24 0x00542c1d in isis_network_magic (self=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, argc=<optimized out>,
    argv=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, no=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../isisd/isis_cli.c:3101
\#25 isis_network (self=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    argc=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, argv=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>)
    at ./isisd/isis_cli_clippy.c:5499
\#26 0xb7d6d8f1 in cmd_execute_command_real (vline=vline@entry=0x219afa0, vty=vty@entry=0x21d6940, cmd=cmd@entry=0x0,
    up_level=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/command.c:1003
\#27 0xb7d6d9e0 in cmd_execute_command (vline=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, cmd=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    vtysh=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/command.c:1061
\#28 0xb7d6dc60 in cmd_execute (vty=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    cmd=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, matched=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>,
    vtysh=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/command.c:1228
\#29 0xb7dfb58a in vty_command (vty=vty@entry=0x21d6940, buf=0x21e0ff0 ' ' <repeats 12 times>, "isis network point-to-point") at ../lib/vty.c:625
\#30 0xb7dfc560 in vty_execute (vty=vty@entry=0x21d6940) at ../lib/vty.c:1388
\#31 0xb7dfdc8d in vtysh_read (thread=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/vty.c:2400
\#32 0xb7df4d47 in event_call (thread=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at ../lib/event.c:2019
\#33 0xb7d9a831 in frr_run (master=<optimized out>) at ../lib/libfrr.c:1232
\#34 0x004e4758 in main (argc=7, argv=0xbf989a24, envp=0xbf989a44) at ../isisd/isis_main.c:354
(gdb) f 9
\#9  event_timer_remain_msec (thread=0x10000) at ../lib/event.c:734
734     ../lib/event.c: No such file or directory.
(gdb) p pthread
No symbol "pthread" in current context.
(gdb) p thread
$1 = (struct event *) 0x10000

When LAN links and P2P links share the` circuit->u` of a neighbor, if one link is no longer in use and the union is not cleared, the other link is unable to pass the non-empty check, resulting in accessing an invalid pointer. Unfortunately, for non-DIS devices in LAN links, `circuit->u.bc.run_dr_elect[x]` is essentially always 1, but in `isis_circuit_down()`,` circuit->u.bc.run_dr_elect[x] `will not be cleared because `circuit->u.bc.is_dr[x]` is always 0. Consequently, when switching to a P2P link, `isis_circuit_circ_type_set()` does not reset the link in a non-C_STATE_UP state, leading to subsequent accesses of `circuit->u.p2p.t_send_p2p_hello` resulting in a non-empty yet invalid address.

I believe that in `isis_circuit_down()`, the LAN link should unconditionally clear `circuit->u.bc.run_dr_elect[x]`.

Signed-off-by: zhou-run <zhou.run@h3c.com>
2024-11-09 15:45:47 +08:00
Donatas Abraitis
a85dce2c66
Merge pull request #17341 from zice312963205/zly_tcpmss
bgpd:support tcp-mss for neighbor group
2024-11-08 09:11:41 +02:00
Donatas Abraitis
af9a2cb875
Merge pull request #17231 from guoguojia2021/guozhongfeng_alibaba
bgpd:support of color extended community color-only types
2024-11-08 08:56:21 +02:00
Russ White
68ec006481
Merge pull request #12109 from donaldsharp/routemap_time_spent
lib: Add ability to track time in individual routemaps
2024-11-07 13:19:11 -05:00
Donald Sharp
36abc43cfc
Merge pull request #17376 from opensourcerouting/fix/stale_routes_with_addpath
bgpd: Clear stale routes with multiple paths
2024-11-07 11:04:56 -05:00
Donatas Abraitis
846af511f4
Merge pull request #17244 from donaldsharp/high_ecmp_test
tests: Add a topology that supports a large number of ecmp
2024-11-07 17:15:24 +02:00
Donatas Abraitis
2e5e3b4bd0 tests: Check if stale routes with addpath are marked with LLGR community
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-07 14:15:18 +02:00
Donatas Abraitis
444bdc4cc0 tests: Check if routes with addpath are cleared if they are stale
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-07 14:05:36 +02:00
guozhongfeng.gzf
5a28b620d3 tests:support of color extended community color-only types
Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
2024-11-07 19:02:21 +08:00
hanyu.zly
9fa56a03c7 bgpd:support tcp-mss for neighbor group
Signed-off-by: hanyu.zly <hanyu.zly@alibaba-inc.com>
2024-11-07 14:50:21 +08:00
Louis Scalbert
aceae79ae0 tests: clarify bgp_vpnv4_asbr
Clarify bgp_vpnv4_asbr. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-11-06 16:46:02 +01:00
Donald Sharp
3e3a666331 lib: Add ability to track time in individual routemaps
Add the abilty to track how much time is spent in routemaps.
Example of the new output:

eva# show route-map
ZEBRA:
route-map: FOO Invoked: 1000000 (323 milliseconds total) Optimization: enabled Processed Change: false
 deny, sequence 10 Invoked 1000000 (320 milliseconds total)
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-05 12:33:05 -05:00
Russ White
fe20f83286
Merge pull request #17326 from anlancs/fix/zebra-no-ifp-down
zebra: fix missing kernel routes
2024-11-05 10:20:36 -05:00
Donald Sharp
bee1bcfd01 tests: Add a topology that supports a large number of ecmp
Add a basic topology that allows the testing of BGP and zebra
at scale.  I built this to help me find and fix problems with
a large number of bgp peers.  Since I plan to keep using this
and as I understand it there are future plans to take this
higher, I would like to add this as a test that people can invoke
with this command:

sudo -E python3 -m pytest -s -vv --topology-only

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-05 10:19:39 -05:00
Russ White
ab2117d328
Merge pull request #17115 from LabNConsulting/jmuthii/nhrpd-retry-resolution-topotest
nhrpd: fix passphrase handling, add topotest for resolution request
2024-11-05 10:10:12 -05:00
Nathan Bahr
5b3c3b1710 tests: Remove unnecessary fields from expected JSON
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-01 16:46:41 +00:00
Donatas Abraitis
a69f66176d
Merge pull request #17312 from donaldsharp/remove_in6addr_cmp
Remove in6addr cmp
2024-11-01 18:06:04 +02:00
anlan_cs
0073a870d1 test: add test case for kernel blackhole routes
The test verifies that a kernel blackhole route is not affected by
interface's link change.

Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-11-01 22:43:00 +08:00
Donald Sharp
eded1e9c76
Merge pull request #17328 from opensourcerouting/fix/allow_setting_netlink_buffer_size_for_zebra
tests: Do not set by default netlink receive buffer size for Zebra
2024-11-01 10:00:18 -04:00
Donald Sharp
66feece071
Merge pull request #17281 from nabahr/mrib-import
Add support to import alternate URIB tables into the main MRIB
2024-10-31 13:28:57 -04:00
Donatas Abraitis
6dc03df8cb tests: Do not set by default netlink receive buffer size for Zebra
If we want to override this value - we can't because it's set by default to
90000000.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-31 17:00:20 +02:00
Donald Sharp
1cb6b71b40 lib, tests: Remove in6addr_cmp function from the system
This function should just be memcmp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:04:19 -04:00
Jafar Al-Gharaibeh
35dbbacc3b
Merge pull request #17317 from opensourcerouting/feature/allow_setting_custom_params_for_daemons_unified_config
tests: Add an ability to specify daemon params with unified config
2024-10-31 08:55:23 -05:00
Nathan Bahr
180e1a0d77 tests: Add zebra rib import-table tests
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-31 12:44:05 +00:00
Donatas Abraitis
879466731b tests: Add an ability to specify daemon params with unified config
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-31 10:43:28 +02:00
Donatas Abraitis
5f11235614
Merge pull request #17296 from LabNConsulting/liambrady/core-rlimit-respect-hard-limit
tests: respect RLIMIT_CORE hard limit
2024-10-31 10:19:55 +02:00
Joshua Muthii
d599aa1da6 nhrpd: Add topotest for retrying resolution request
Modified nhrp_topo topotest to test for newly added resolution
request retry feature. Changes to the topotest include adding a spoke to the
existing nhrp_topo topotest so that a topology with two spokes and hub
can be used to create shortcuts and test the sending/resending of
resolution requests and responses between spoke and hub. The resolution
request retry feature was tested by blocking incoming resolution requests on a
receiving nodes to stop the creation of a successful shortcut - which
then triggered the sending spoke to retry sending resolution requests

Signed-off-by: Joshua Muthii <jmuthii@labn.net>
2024-10-29 13:15:16 -04:00
Liam Brady
b4dc01b3de tests: respect RLIMIT_CORE hard limit
In the case that the RLIMIT_CORE hard limit cannot
be raised on a system, do not fail due to an exception.
Instead, attempt to increase the soft limit to as large
a value as possible (e.g. to the set hard limit).

Signed-off-by: Liam Brady <lbrady@labn.net>
2024-10-29 13:07:57 -04:00
Russ White
574a71516a
Merge pull request #17226 from louis-6wind/fix-bmp-tests
tests: fix bmp tests random failure
2024-10-29 10:12:11 -04:00
Russ White
b5c3b44de1
Merge pull request #17190 from baozhen-H3C/202410180176
isisd: The command "'show isis vrf all summary json" has no output.
2024-10-29 10:08:28 -04:00
Russ White
4a6e1c0acb
Merge pull request #16990 from lsang6WIND/label-per-nexthop
bgpd: fix prefix same as nexthop in label per nexthop
2024-10-29 10:05:37 -04:00
Donatas Abraitis
200d54f54e
Merge pull request #17216 from Jafaral/fix-bsr
pimd, tests: fix bsr assert and expand topotest to pimv6
2024-10-27 21:11:23 +02:00
Jafar Al-Gharaibeh
a7e7cc301d tests: expand bsr topotest to cover ipv6
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-25 09:00:50 -05:00
Louis Scalbert
a235dbc65b tests: fix bgp_bmp_vrf race condition
The bgp_bmp_vrf topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp_vrf

bgp_bmp_vrf is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
771284474d tests: fix bgp_bmp race condition
The bgp_bmp topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp

bgp_bmp is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
14eed3ab8b tests: factorize code in bgp_bmp_vrf
Factorize code in bgp_bmp_vrf

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
e29abfdbd5 tests: factorize code in bgp_bmp
Factorize code in bgp_bmp

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00