Commit Graph

4181 Commits

Author SHA1 Message Date
Donald Sharp
308daf81ca
Merge pull request #18255 from Jafaral/no-bgp-hidden
Revert "bgpd: fix default instance when leaving the hidden state (backport 10.3)" #18162
2025-02-26 08:24:51 -05:00
Donald Sharp
abae4012a7
Merge pull request #18232 from FRRouting/mergify/bp/dev/10.3/pr-18231
Fix oper-state queries that involve choice/case nodes (backport #18231)
2025-02-25 10:38:16 -05:00
Jafar Al-Gharaibeh
4156757e40 Revert "tests: add bgp_l3vpn_hidden topotest"
This reverts commit bb79a6562f.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-02-25 08:57:48 -06:00
Jafar Al-Gharaibeh
e209f5bf68 Revert "tests: check as number in show run"
This reverts commit 85c5598bb9.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-02-25 08:57:22 -06:00
Nathan Bahr
673410bd30 pim: Fix autorp group joins
Group joining got broken when moving the autorp socket to open/close
as needed. This fixes it so autorp group joining is properly handled
as part of opening the socket.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
(cherry picked from commit d840560b74)
2025-02-24 18:54:09 +00:00
Christian Hopps
4247bc5693 tests: add unit-test for choice/case node queries
Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit 73df7da40a)
2025-02-22 20:07:56 +00:00
Louis Scalbert
85c5598bb9 tests: check as number in show run
Creates the default VRF instance after the other VRF instances. The
default VRF instance is created in hidden state. Check that AS number
in show run is correctly written.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-14 18:08:53 +01:00
Louis Scalbert
bb79a6562f tests: add bgp_l3vpn_hidden topotest
Test that leaving the hidden BGP instance state is working.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-14 18:08:53 +01:00
Carmine Scarpitta
92fa579d04 tests: Extend SRv6 static SIDs topotest to verify SID structure
The `static_srv6_sids` topotest verifies that staticd correctly
programs the SIDs in the zebra RIB. Currently, the topotest only
validates the programmed behavior and SID attributes.

This commit extends the topotest to also validate the SID structure.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit a6d02fe2fb)
2025-02-13 18:38:17 +00:00
Donatas Abraitis
3f788da60b tests: Check if the peer stays Idle if router-id is not set
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 48560b5c9b)
2025-02-04 16:37:56 +00:00
Russ White
adeb30d8f3
Merge pull request #17336 from forrestchu/sbfd
implement SBFD
2025-02-04 06:36:43 -05:00
Donatas Abraitis
cb7d1cbf53
Merge pull request #17989 from cscarpitta/fix/fix_staticd_no_sid
staticd: Fix wrong xpath in `no sid X:X::X:X/M`
2025-02-04 10:47:20 +02:00
Carmine Scarpitta
210a7d8981 tests: Add test case to verify SID re-add
Add a new test case that re-add the deleted SIDs and verifies that all
SIDs are added back to the RIB.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 23:02:30 +01:00
Carmine Scarpitta
4eed9ee0a7 tests: Add test case to verify SID delete
Add a new test case that deletes a SID and verifies that only this
SID has been removed from the RIB.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 23:02:11 +01:00
Carmine Scarpitta
0768c620e0
Merge pull request #17913 from Sokolmish/bgp-sid-release
bgpd: Release SID on router deletion
2025-02-03 14:52:00 +01:00
Carmine Scarpitta
339c49bcff tests: Add testcase for static End/uN validation
This commit adds a testcase to validate static End/uN allocation.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-01-30 19:28:34 +01:00
Mikhail Sokolovskiy
90fe717352 topotests: Router deletion in SRv6 sid reachability
Signed-off-by: Mikhail Sokolovskiy <sokolmish@gmail.com>
2025-01-30 01:54:47 +03:00
Donald Sharp
f849511c47
Merge pull request #17935 from mjstapp/fix_nhg_hash_equal
zebra: include resolving nexthops in nhg hash
2025-01-29 10:14:37 -05:00
Donald Sharp
73ab6a46c5 tests: Add a test that shows the v6 recursive nexthop problem
Currently FRR does not handle v6 recurisive resolution properly
when the route being recursed through changes and the most
significant bits of the route are not changed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-28 13:52:32 -05:00
Russ White
bd82864d03
Merge pull request #17941 from opensourcerouting/fix-dst-src
static: fix botched staticd YANG conversion for dst-src
2025-01-28 12:23:06 -05:00
Russ White
e82788de46
Merge pull request #17802 from askorichenko/test-fix-table-map
bgpd: fix table-map option
2025-01-28 12:20:43 -05:00
Russ White
3bdb561d1c
Merge pull request #17906 from LabNConsulting/aceelindem/ospf-prune-dup-next-hops
ospfd: Prune duplicate next-hop when installing into zebra route table.
2025-01-28 12:19:07 -05:00
Russ White
e54c11d54d
Merge pull request #17848 from pguibert6WIND/isis_srv6_topo1_ping
Isis srv6 topo1 ping
2025-01-28 11:49:20 -05:00
Russ White
7b6f686a9f
Merge pull request #17736 from opensourcerouting/table-direct
bgpd,lib,zebra: permit table-direct on VRFs
2025-01-28 10:24:00 -05:00
David Lamparter
91540d2e31 topotests: test v6 & dst-src in static_simple
The "static_simple" test has code for testing IPv6 routes, but it wasn't
even being run (duh.)  Enable it, and also test IPv6 dst-src routes.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28 15:40:17 +01:00
David Lamparter
3671ce36fd staticd: fix botched staticd YANG for dst-src
The staticd YANG conversion completely f*cked up dst-src routes.
Stupidly enough, the correct thing is much simpler as seen by the amount
of deletes in this commit.

This does, unfortunately, involve a rather annoying YANG edge case with
what should reasonably be an optional leaf as part of a list key, which
is not possible.  It uses `::/0` as unconditional filler instead, since
that is semantically correct.

The `test_yang_mgmt` topotest needed to be adjusted after this to add
`src-prefix='::/0'`.

Fixes: 88fa5104a0 ("staticd : Configuration northbound implementation")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28 15:40:17 +01:00
Alexander Skorichenko
0fd5ba93e3 bgpd: fix table-map option
Schedule zebra to withdraw routes filtered out by a table-map.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2025-01-28 12:52:47 +01:00
Donatas Abraitis
ee67699bd7
Merge pull request #17905 from pguibert6WIND/advertised_routes_incorrect_json
Advertised routes incorrect json
2025-01-27 23:32:33 +02:00
Donatas Abraitis
95db38f394
Merge pull request #17919 from pguibert6WIND/bgp_suppressed_attribute
Bgp suppressed attribute
2025-01-27 23:31:46 +02:00
Philippe Guibert
d17fce21fc topotests: bgp_vpnv4_noretain, check presence of locpref in adj-rib-out
Add a test that check that the detailed command of show bgp advertised
neighbors 10.125.0.2 displays the locpref value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-27 11:50:29 +01:00
Philippe Guibert
e1ab99261a topotests: bgp_aggregate_address_topo1, add test for suppressed keyword
Add a test that checks that the BGP route to 192.168.0.1 has all the
necessary json outputs. This route is chosen because it is a suppressed
route.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-27 11:47:41 +01:00
Donatas Abraitis
4338e21aa2 Revert "bgpd: Handle Addpath capability using dynamic capabilities"
This reverts commit 05cf9d03b3.

TL;DR; Handling BGP AddPath capability is not trivial (possible) dynamically.

When the sender is AddPath-capable and sends NLRIs encoded with AddPath ID,
and at the same time the receiver sends AddPath capability "disable-addpath-rx"
(flag update) via dynamic capabilities, both peers are out of sync about the
AddPath state. The receiver thinks already he's not AddPath-capable anymore,
hence it tries to parse NLRIs as non-AddPath, while they are actually encoded
as AddPath.

AddPath capability itself does not provide (in RFC) any mechanism on backward
compatible way to handle NLRIs if they come mixed (AddPath + non-AddPath).

This explains why we have failures in our CI periodically.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-25 20:51:16 +02:00
Donatas Abraitis
2982edcaa3
Merge pull request #17911 from askorichenko/test-fix-bgp-peer-solo
bgpd: Fix bgp peer solo option
2025-01-24 08:50:49 +02:00
Rafael Zalamena
36b94dcc7b topotests: test direct-table on different VRFs
Test new zebra feature that allows table-direct to work on any VRF
with BGP.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-01-23 14:37:09 -03:00
Acee Lindem
1d96c58375 tests: OSPF topotest for next-hop pruning
OSPF topotest to test OSPF next-hop pruning on installation
into zebra routing table. Also fix multicast_pim_dr_nondr_test
topotest which had a duplicate OSPF route in the results.

Signed-off-by: Acee Lindem <acee@lindem.com>

X
2025-01-23 15:12:30 +00:00
Alexander Skorichenko
7bda2b36a9 bgpd: Fix bgp peer solo option
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2025-01-23 14:48:16 +01:00
Donatas Abraitis
f19b843e9e
Merge pull request #17652 from pguibert6WIND/topotest_bgp_evpn_rt5
bgpd, tests: bgp_evpn_rt5, add test with match evpn vni command
2025-01-23 13:12:35 +02:00
wumu.zsl
8653a47708 tests: add basic topotest cases for sbfd Initiator and Reflector
Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
2025-01-23 06:23:34 +00:00
Philippe Guibert
3a677993c0 topotests: isis_srv6_topo1, fix wrong srte path
There is no connectivity by using the proposed srv6 path.

> From Carmine:
> This seg6-route tells rt1 to steer packets destined to fc00:0:9::1 over this path: rt1->rt2->-rt6.
> This path is not correct. Since we are installing this seg6-route on rt1,
> it means that a packet matching this seg6-route has already reached rt1.
> So rt1 should not be part of the path.
> The correct path should be rt2->rt6.

Fix this by changing the proposed seg6 route. Also, the ping test should
be swapped, because invalidating the RT1 locator does not have any
impacts on the built SRv6 path.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-22 18:29:27 +01:00
Louis Scalbert
cb4846c057 tests: check bfd with update-source in peer-group
Check bfd with update-source in peer-group.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-01-22 17:55:55 +01:00
Philippe Guibert
2610c07831 isis_srv6_topo1: fix ping does not work as expected
The ping test does not detect when the command fails.

> 2025-01-13 15:38:27,494 INFO: topo: [+] check rt1 fc00:0:9::1 0% packet loss
> 2025-01-13 15:38:27,494 WARNING: topo: Waiting time is too small (count=10, wait=1), using default values (count=20, wait=3)
> 2025-01-13 15:38:28,501 WARNING: rt1: Router(rt1): proc failed: rc 1 pid 2028454
> 	args: /usr/bin/nsenter --mount=/proc/2026950/ns/mnt --net=/proc/2026950/ns/net --uts=/proc/2026950/ns/uts -F --wd=/tmp/topotests/isis_srv6_topo1.test_isis_srv6_topo1/rt1 /bin/bash -c ping6 fc00:0:9::1 -c 1 -w 1
> 	stdout: PING fc00:0:9::1(fc00:0:9::1) 56 data bytes
>
> --- fc00:0:9::1 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
> 	stderr: *empty*
> 2025-01-13 15:38:28,501 INFO: topo: PING fc00:0:9::1(fc00:0:9::1) 56 data bytes
>
> --- fc00:0:9::1 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
>
>
> PASSED
>

The match string is not precise enough. Complete it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-22 17:16:53 +01:00
Philippe Guibert
d84b93f287 topotests: add unified configuration
Replace the various per-daemon config files with a unique frr.conf
configuration file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-21 13:48:36 +01:00
Philippe Guibert
82339c94ed topotests: bgp_evpn_rt5, configure route_distinguisher
When not configuring a route distinguisher, neither route-target,
the derived rd settings differ if config load applies with frr.conf
or not. For instance, the forged rd with frr.conf:

> # show bgp l2vpn evpn json
>    "192.168.101.41:3":{
>       "rd":"192.168.101.41:3",

and without:
>     "192.168.101.41:2":{
>        "rd":"192.168.101.41:2",

The defined rts also are impacted. Temporay fix this by using an
hardset configuration for all route distinguisher and route target
of the setups.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-21 13:48:36 +01:00
Philippe Guibert
0d5bd461af topotests: bgp_evpn_rt5, add test with match evpn vni command
Add a test that ensures that the 'match evpn vni' command works with bgp
evpn rt5 updates.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-21 13:48:36 +01:00
Louis Scalbert
519c3b5c48 tests: remove table version check in bgp rpki topo1
Remove table version check in bgp rpki topo1.

Fixes: 5f50b98f8e ("tests: add bgp rpki topo1 rpkiValidationState")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-01-21 11:18:32 +01:00
Jafar Al-Gharaibeh
4f65107d20
Merge pull request #17883 from opensourcerouting/fix/topotest_dynamic_cap_enhe
tests: Fix test_bgp_dynamic_capability_enhe topotest
2025-01-20 13:31:47 -06:00
Philippe Guibert
50928a93c6 topotests: bgp_ipv6_rtadv, add control over bgp updates
Add a test to control the json values of the incoming BGP update
received by an unnumbered BGP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-20 09:32:28 +01:00
Philippe Guibert
084ebc9473
Merge pull request #16894 from wenwang00/project-phoenixwing-ysj
staticd: Add support for SRv6 Static SIDs
2025-01-20 09:20:15 +01:00
Donatas Abraitis
3b6dcf03fb tests: Fix test_bgp_dynamic_capability_enhe topotest
Drop redundant function (duplicate), and reset counters for r2 instead of r1.

We check received capabilities on r2, hence we need to flush the counters on r2 too.

Fixes: d1cfd73060 ("tests: Check if ENHE capability can be handled dynamically")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-18 23:07:37 +02:00
Christian Hopps
61949e4f79 tests: split notify test to regular and datastore notify tests
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-18 16:14:29 +00:00