Commit Graph

3911 Commits

Author SHA1 Message Date
Louis Scalbert
76d84020a8 tests: rename router variables in nhrp_redundancy
Rename router variables in nhrp_redundancy to match the actual name.
Cosmetic change to help debugging.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
5f058cdef7 tests: rename routers in nhrp_redundancy
Rename routers in nhrp_redundancy to match the diagram. Cosmetic change.

> cd tests/topotests/nhrp_redundancy
> git grep r1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r1|nhs1|g' -i
> git grep r2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r2|nhs2|g' -i
> git grep r3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r3|nhs3|g' -i
> git grep r4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r4|nhc1|g' -i
> git grep r5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r5|nhc2|g' -i
> git grep r6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r6|router|g' -i
> git grep r7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r7|host|g' -i
>
> git grep R1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R1|nhs1|g' -i
> git grep R2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R2|nhs2|g' -i
> git grep R3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R3|nhs3|g' -i
> git grep R4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R4|nhc1|g' -i
> git grep R5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R5|nhc2|g' -i
> git grep R6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R6|router|g' -i
> git grep R7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R7|host|g' -i
>
> mv r1 nhs1
> mv r2 nhs2
> mv r3 nhs3
> mv r4 nhc1
> mv r5 nhc2
> mv r6 router
> mv r7 host

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:07 +02:00
Louis Scalbert
f04191f559 tests: apply black nhrp_redundancy
Apply black nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:55:34 +02:00
Louis Scalbert
43cc850def tests: fix prefix length in nhrp_redundancy
The expected prefix should be 5.5.5.0/24 otherwise the hosts behind NHRP
client 1 nhc1 (aka. r5) are not reachable via NHRP.

The issue was not seen in the FRR official CI because the tests were
skipped because iptables were missing in CI machines.

It solves the 16690 issue.

Fixes: https://github.com/FRRouting/frr/issues/16690
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 13:55:31 +02:00
Jafar Al-Gharaibeh
5752fc86ee tests: increase the timeout for packet padding check
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-29 11:40:50 -05:00
Jafar Al-Gharaibeh
77e1a26faa
Merge pull request #16664 from mjstapp/igor_debug_simplify
*: simplify frrlib debug
2024-08-29 11:51:53 -04:00
Mark Stapp
ac2d9bae5c
Merge pull request #16680 from donaldsharp/route_scale_minor_changes
tests: Fix route-scale at higher ecmp
2024-08-29 08:17:34 -04:00
Jafar Al-Gharaibeh
12a3d5a748
Merge pull request #16683 from donaldsharp/test_ospf_netns_vrf_failure
tests: ospf_netns_vrf should give more time for coming up
2024-08-29 01:12:40 -04:00
Jafar Al-Gharaibeh
648566c6fb
Merge pull request #16682 from donaldsharp/bgp_suppress_test
tests: Ensure bgp suppress fib has a chance to transmit data to peer
2024-08-29 01:12:17 -04:00
Jafar Al-Gharaibeh
216ed8c796
Merge pull request #16673 from donaldsharp/default_original_sin
tests: Fix bgp_default_originate_topo1_3
2024-08-28 15:30:12 -04:00
Donald Sharp
ce74a6b0a8 tests: Fix route-scale at higher ecmp
Recent commits moved the default retries to 60, but
the higher ecmp counts were over-riding to 40.  Let's
make it 80.

Noticed this when I went looking at failures on 386 platforms
in our ci.  Route scale is timing out when deleting routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:18:24 -04:00
Donald Sharp
d58c44cebe tests: ospf_netns_vrf should give more time for coming up
Test fails:

            test_func = partial(
                topotest.router_json_cmp,
                router,
                "show ip ospf vrf {0}-ospf-cust1 json".format(rname),
                expected,
            )
            _, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
            assertmsg = '"{}" JSON output mismatches'.format(rname)
>           assert diff is None, assertmsg
E           AssertionError: "r1" JSON output mismatches
E           assert Generated JSON diff error report:
E
E             > $->r1-ospf-cust1->areas->0.0.0.0->nbrFullAdjacentCounter: output has element with value '1' but in expected it has value '2'

/home/sharpd/frr2/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py:239: AssertionError

Support bundle has this data:
r1# show ip ospf vrf all neighbor
% 2024/08/28 14:55:54.763

VRF Name: r1-ospf-cust1

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
10.0.255.3        1 Full/DR         10.547s           39.456s 10.0.3.1        r1-eth1:10.0.3.2                     0     0     0
10.0.255.2        1 Full/Backup     0.543s            38.378s 10.0.3.3        r1-eth1:10.0.3.2                     1     0     0

So immediately after the test fails this test, the neighbor comes up.
Let's give the test a bit more time for failure to not happen

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:10:04 -04:00
Donald Sharp
3797454a2a tests: Ensure bgp suppress fib has a chance to transmit data to peer
Giving only 5 seconds to pass bgp data to peers on a heavily
loaded system is a recipe for not having fun.  Add more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:05:40 -04:00
Mark Stapp
8b23abf36e
Merge pull request #16300 from donaldsharp/local_connected
Local connected
2024-08-28 14:10:14 -04:00
Donald Sharp
598d9a1f17 tests: Fix bgp_default_originate_topo1_3
This test was killing bgp on r1 and r2
and then immediately testing that the
default route transitioned.  Unfortunately
the test was written that under load the
system might be in a bad state.  Let's
modify the code to check for a bgp version
change and then that the bgp state has
come back up

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 11:09:32 -04:00
Igor Ryzhov
82e52e0f21 lib: common debug config output
Implement common code for debug config output and remove daemon-specific
code that is duplicated everywhere.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00
Igor Ryzhov
5dac696154 lib: rework debug init
The debug library allows to register a `debug_set_all` callback which
should enable all debugs in a daemon. This callback is implemented
exactly the same in each daemon. Instead of duplicating the code, rework
the lib to allow registration of each debug type, and implement the
common code only once in the lib.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00
Mark Stapp
17fffbad1b
Merge pull request #16656 from donaldsharp/minor_fix_for_pim_dr_nondr
tests: Allow convergence before adding multicast routes
2024-08-27 08:17:46 -04:00
Donald Sharp
37dd51867f tests: Add some tests to show new behavior works as expected
a) A noprefix address by itself should not create a connected route.
   This was pre-existing.
b) A noprefix address with a corresponding route should result in a
   connected route.  This is how NetworkManager appears to work.
   This is new behavior, so a new test.
c) A route is added to the system from someone else.
   This is new behavior, so a new test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-27 06:25:34 -04:00
Jafar Al-Gharaibeh
0d745741c9 tests: Fix frequent ospfv3 basic functionality test failure
The dead timer is set to 4 seconds, while the hello interval is set to 6535.
This test will only pass of the platform is fast enough for ospfv3 to
converge in 4 seconds. These timers were already tested multiple time earlier.
This test should just make sure that the boundary value 65535 is configurable,

Other changes in this commit:
  - add sequence numbers to the dead intervals tests to make it easier to
    track test faliures.
  - swap the config order in one test to match order with all other tests.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-26 16:35:37 -05:00
Donald Sharp
3c4ffcacfe tests: Allow convergence before adding multicast routes
Current code adds a new vlan interface, sets up ospf and
pim on it and immediately starts shoving data down the pipes.
This of course has the fun thing where the IGP and pim do not
always come up in a nice neat manner and the test is looking
for state from a nice neat come up, even though pim is `working`
correctly it is not correct for what the test wants.

Modify the code to ensure that ospf is up and has propagated
the route where it is needed as well as that pim neighbors have
properly come up, then initiate the multicast streams and igmp
reports.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-26 16:02:46 -04:00
Donald Sharp
3d8ccdb115
Merge pull request #16615 from Jafaral/revert-v4-v6-bgp
Revert ipv4-mapped ipv6 and 6vpe nexthop in BGP
2024-08-22 17:57:38 -04:00
Jafar Al-Gharaibeh
741c030395 Revert "Merge pull request #15368 from louis-6wind/fix-6pe"
This reverts commit df98e88368, reversing
changes made to b652119235.
2024-08-22 10:38:09 -05:00
Donald Sharp
05c17eff06
Merge pull request #16450 from nabahr/static_joins
PIM: Implement static IGMP joins without an IGMP report
2024-08-22 11:32:56 -04:00
Jafar Al-Gharaibeh
879460ce27
Merge pull request #16613 from donaldsharp/weight_issues
Weight issues
2024-08-22 11:19:54 -04:00
Jafar Al-Gharaibeh
db71bebc2a
Merge pull request #16620 from LabNConsulting/new-munet-0-14-10
tests: update munet to 0.14.10
2024-08-22 11:14:18 -04:00
Donatas Abraitis
18e2d0d1a9
Merge pull request #16621 from LabNConsulting/fix-grpc-client
tests: dont print sys.path when running grpc-query.py
2024-08-22 09:41:34 +02:00
Christian Hopps
436e4d9755 tests: dont print sys.path when running grpc-query.py
Don't print the sys.path when running grpc-query.py. Doing so
was causing tests to fail.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-08-21 22:07:25 -04:00
Christian Hopps
cff1103843 tests: update munet to 0.14.10
Changes:

- mutini: handle possible missed zombie cleanup leading to test hangs
- mutini: also we avoid logging in the signal handler which was causing
  an exception.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-08-21 21:05:48 -04:00
Jafar Al-Gharaibeh
0097489b4a Revert "Merge pull request #15614 from louis-6wind/fix-6pe-address"
This reverts commit b3600d82dc, reversing
changes made to 51119823d0.
2024-08-21 13:37:43 -05:00
Jafar Al-Gharaibeh
0d2d20825e Revert "Merge pull request #16439 from louis-6wind/fix-ipv4-mapped-ipv6"
This reverts commit cc0fdd3b1d, reversing
changes made to 4e208087fd.
2024-08-21 13:26:50 -05:00
Donald Sharp
b62de7de2e zebra, tests: Connected and Local routes should have a weight of 1
All routes received by zebra from upper level protocols have a weight
of 1.  Let's just make everything extremely consistent in our code.
Lot's of tests needed to be fixed up to make this work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-21 10:17:47 -04:00
Dmytro Shytyi
e23005f407 topotest: test_bgp_snmp_bgpv4v2_notification
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>
2024-08-21 15:27:12 +02:00
Nathan Bahr
7ce2a1b8fb tests: Added new topotest for pim igmp static groups
Copied the existing "join-group" test and modified to test
static groups instead. Functionally the same but without IGMP
reports.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-08-15 17:10:32 +00:00
Mark Stapp
6de80911b0
Merge pull request #16586 from donaldsharp/fix_route_scale_startup
tests: Fix route_scale startup issues
2024-08-15 09:21:12 -04:00
Donald Sharp
b0c86804f8 tests: Fix route_scale startup issues
Upstream CI is frequently running into a situation where
the routes are not being installed.  These routes
start at the beginning and suddenly in the middle
they start working properly.

D   1.0.15.183/32 [150/0] via 192.168.0.1, r1-eth0 inactive, weight 1, 00:10:17
                          via 192.168.1.1, r1-eth1 inactive, weight 1, 00:10:17
D   1.0.15.184/32 [150/0] via 192.168.0.1, r1-eth0 inactive, weight 1, 00:10:17
                          via 192.168.1.1, r1-eth1 inactive, weight 1, 00:10:17
D   1.0.15.185/32 [150/0] via 192.168.0.1, r1-eth0 inactive, weight 1, 00:10:17
                          via 192.168.1.1, r1-eth1 inactive, weight 1, 00:10:17
D>* 1.0.15.186/32 [150/0] via 192.168.0.1, r1-eth0, weight 1, 00:10:17
  *                       via 192.168.1.1, r1-eth1, weight 1, 00:10:17
D>* 1.0.15.187/32 [150/0] via 192.168.0.1, r1-eth0, weight 1, 00:10:17
  *                       via 192.168.1.1, r1-eth1, weight 1, 00:10:17
D>* 1.0.15.188/32 [150/0] via 192.168.0.1, r1-eth0, weight 1, 00:10:17

Turning on some debugs showed that the failed installed routes are
trying to be matched against the default route.  Thus implying
all the connected routes for the test are not yet successfully
installed.  Let's modify the test(s) on startup to just ensure
that the connected routes are installed correctly.  I am no
longer seeing the problem after this change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-14 10:18:41 -04:00
Mark Stapp
dd146614df tests: add retries to nhg tests in all_proto_startup
The all_protocol_startup topotest needs to allow for some delay
between configuring nexthop-groups and their installation. Add
some wait periods in a couple of nhg test cases.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-08-14 08:37:00 -04:00
Donald Sharp
1563d9f9c8 tests: Fix bgp_duplicate_nexthop python warning
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-12 13:55:26 -04:00
Donald Sharp
c4fdc837c0
Merge pull request #16534 from opensourcerouting/fix/start_ldpd_if_unified
doc: Document on how to start specific daemons with unified config in topotests
2024-08-12 10:25:54 -04:00
Donatas Abraitis
cc0fdd3b1d
Merge pull request #16439 from louis-6wind/fix-ipv4-mapped-ipv6
bgpd: fixes for ipv4 mapped ipv6 address
2024-08-12 15:37:36 +03:00
Donatas Abraitis
79cbde8095 tests: Convert self.unified_config to boolean
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-11 13:32:11 +03:00
Christian Hopps
2ee9f4d11f tests: wait for test client to connect before running test
Vtysh has been improved to startup very quickly this exposed a race in this
test, where the `clear ip rip...` command ran before the test client that
handles it had finished connecting to mgmtd. Add a retried check for the test
client being connected before issuing the `clear ip rip ...` test command.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-08-07 09:35:52 -04:00
Mark Stapp
975e1a36f6
Merge pull request #16501 from donaldsharp/preprocess_vtysh
Preprocess vtysh
2024-08-02 07:27:04 -04:00
Donald Sharp
9af1f5e823 tests: need aggressive timers in bgp_prefix_list_any
Add some timers to make convergence happan as fast as possible
when a connection fails on the intial attempt.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 11:44:06 -04:00
Donald Sharp
b52346efe4 tests: need aggressive timers in bgp_route_map_match_ipv6_nexthop
Add some timers to make the convergence happen as fast as possible
when a connection fails on the initial attempt.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 11:01:54 -04:00
Donald Sharp
08bf9cd9f5 tests: Shorten reconnect timer when something goes wrong
When running bfd_bgp_cbit_topo3 and an intial connection
goes wrong, try to connect again as fast as possible as
that the timer is 2 minutes otherwise and the test will
never come back from it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 10:47:12 -04:00
Donald Sharp
6f2aea5a13 tests: Increase route_scale timeouts
This test is frequently failing in the upstream CI.  Most
log failures are stating that we expected something like
1 million routes but we have 900k+.  Looks like the system
is just loaded a bit more than expected.  Let's give these
tests a bit more time to complete.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 10:45:38 -04:00
David Lamparter
4bc41193e8 vtysh, lib: preprocess CLI graphs
Store a parsed and built graph of the CLI nodes in vtysh, rather than
parsing and building that graph every time vtysh starts up.

This provides a 3x to 5x reduction in vtysh startup overhead:

`vtysh -c 'configure' -c 'interface lo' -c 'do show version'`

- before: 92.9M cycles, 1114 samples
- after: 16.5M cycles, 330 samples

This improvement is particularly visible for users scripting `vtysh -c`
calls, which notably includes topotests.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-07-31 08:08:53 -04:00
Rafael Zalamena
e900c9ba31 topotests: test MSDP authentication
Modify existing MSDP topology to use authentication.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-29 11:41:39 -03:00
Donald Sharp
1877596ebc
Merge pull request #12484 from opensourcerouting/msdp-filter
pimd: MSDP SA filtering support
2024-07-29 10:25:14 -04:00
Donald Sharp
bc50bcb4cf
Merge pull request #16492 from LabNConsulting/ziemba/topotests-lib-bgprib-wait
tests: topotests/lib: add wait to RequireVpnRoutes, RequireUnicastRoutes
2024-07-29 07:56:00 -04:00
Donald Sharp
9ce5a04882
Merge pull request #16490 from adrianomarto/master
tests: Test MSDP RPF
2024-07-28 15:27:45 -04:00
G. Paul Ziemba
460703f3e8 tests: add wait to RequireVpnRoutes, RequireUnicastRoutes
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2024-07-28 09:00:49 -07:00
Adriano Marto Reis
e64d15b17a tests: Test MSDP RPF
Adding a MSDP test with multiple possible routes.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
2024-07-28 14:34:24 +10:00
Rafael Zalamena
7b650fb836 topotests: test MSDP SA filtering
Modify existing MSDP topology to use test SA filtering:
- Add new multicast host (so we get two sources for same group)
- Test group only filtering
- Test source / group filtering

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-27 11:32:51 -03:00
Donald Sharp
ce3cea38dd tests: Run black on bgp_vpnv[4|6]_per_nexthop_label
I did not have my formatting right, let's get it
right for these two.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:53 -04:00
Donald Sharp
77a296cb08 tests: Fix test_bgp_vpnv6_per_nexthop_label.py to handle timing changes
So the test script is making changes to a vpn configuration by
changing something fundamental about the vpn.  This is causing
a window where routes we are interested in are:
present ( from pre-change ) then
withdrawn ( the test change causes this ) then
present ( with the new data )

The test code was trying to test for this by checking
to see if the prefix was there, but due to timing issues
it's not always there when we look for it.

Modify the test to get the vpn table version prior to
the change( as that it should not be moving around ) and
then change the test for the prefix to look for a version
that is later than the vpn's table version.  Then we know
that it is *after* everything has stabilized again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:49 -04:00
Donald Sharp
6914cceea2 tests: Fix test_bgp_vpnv4_per_nexthop_label.py to handle timing changes
So the test script is making changes to a vpn configuration by
changing something fundamental about the vpn.  This is causing
a window where routes we are interested in are:
present ( from pre-change ) then
withdrawn ( the test change causes this ) then
present ( with the new data )

The test code was trying to test for this by checking
to see if the prefix was there, but due to timing issues
it's not always there when we look for it.

Modify the test to get the vpn table version prior to
the change( as that it should not be moving around ) and
then change the test for the prefix to look for a version
that is later than the vpn's table version.  Then we know
that it is *after* everything has stabilized again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:43 -04:00
Donald Sharp
c682ddd100 tests: Increase timing of bgp_duplicate_nexthop
a) Make timers more aggressive for this test
b) Double run_and_expect time for one sub test.

These two changes cause this test to pass regularly for
me when this test used to fail regularly for me.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:39 -04:00
Donatas Abraitis
23c756ce68
Merge pull request #16472 from donaldsharp/msdp_bug
pimd: Fix msdp setting of sa->rp
2024-07-25 21:09:19 +03:00
Donald Sharp
c4b4c242ec pimd: Fix msdp setting of sa->rp
The code is clearly incorrect.  After consultation with
the original author this is the decided change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-25 07:50:32 -04:00
Donald Sharp
bd86964db8
Merge pull request #16455 from opensourcerouting/fix/bgp_gr_notifications_timing_flake
tests: Delay initial OPEN after we do `clear bgp`
2024-07-24 13:17:31 -04:00
Donald Sharp
b2654e35e5
Merge pull request #16232 from zhou-run/202406171755
isisd: Even after configuring "no hostname dynamic", the topology still displays the hostname.
2024-07-24 10:30:34 -04:00
Donald Sharp
a694be6019
Merge pull request #16240 from y-bharath14/srib-topotest-f
tests: Avoid using unused modules and variables at FRR test suites
2024-07-24 10:28:43 -04:00
Donatas Abraitis
91e67abb61 tests: Delay initial OPEN after we do clear bgp
Under some circumstances it might happen that the session is quickly UP in the
middle of `clear bgp ...` and `shutdown`. That leads to session be UP, and
the stale routes being cleared quickly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-24 14:30:32 +03:00
Louis Scalbert
d618436211 topotests: bgp_nexthop_mp_ipv4_6, test ipv4-mapped
Test that a IPv4-mapped IPv6 is sent from a peer that has no global IPv6
address.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-07-24 10:20:11 +02:00
Russ White
fba472e848
Merge pull request #16376 from c-po/ospfd-ldp-sync
ospfd: fix internal ldp-sync state flags when feature is disabled
2024-07-23 10:51:46 -04:00
Russ White
9db9128c27
Merge pull request #16330 from donaldsharp/nhg_going_down
zebra: Properly note that a nhg's nexthop has gone down
2024-07-23 10:49:49 -04:00
Donatas Abraitis
8eb78b2d89
Merge pull request #16341 from crosser/preserve-needed-rmacs
zebra: evpn: not coerce VTEP IP to IPv4 in nh_list
2024-07-22 02:53:26 -07:00
Carmine Scarpitta
e3282e26e4 tests: Fix warnings in bgp_srv6l3vpn_to_bgp_vrf3
When performing the `bgp_srv6l3vpn_to_bgp_vrf3` topotest, the following
warnings are observed:

```
2024-07-21 08:01:51,390 WARNING: r1: Router(r1): proc failed: rc 127 pid 52974
	args: /usr/bin/nsenter --mount=/proc/52322/ns/mnt --net=/proc/52322/ns/net --uts=/proc/52322/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,522 WARNING: r2: Router(r2): proc failed: rc 127 pid 52984
	args: /usr/bin/nsenter --mount=/proc/52397/ns/mnt --net=/proc/52397/ns/net --uts=/proc/52397/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,632 WARNING: ce1: Router(ce1): proc failed: rc 127 pid 52994
	args: /usr/bin/nsenter --mount=/proc/52472/ns/mnt --net=/proc/52472/ns/net --uts=/proc/52472/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,757 WARNING: ce2: Router(ce2): proc failed: rc 127 pid 53004
	args: /usr/bin/nsenter --mount=/proc/52547/ns/mnt --net=/proc/52547/ns/net --uts=/proc/52547/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,878 WARNING: ce3: Router(ce3): proc failed: rc 127 pid 53014
	args: /usr/bin/nsenter --mount=/proc/52622/ns/mnt --net=/proc/52622/ns/net --uts=/proc/52622/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce3/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce3/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,997 WARNING: ce4: Router(ce4): proc failed: rc 127 pid 53024
	args: /usr/bin/nsenter --mount=/proc/52697/ns/mnt --net=/proc/52697/ns/net --uts=/proc/52697/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce4/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce4/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,109 WARNING: ce5: Router(ce5): proc failed: rc 127 pid 53034
	args: /usr/bin/nsenter --mount=/proc/52772/ns/mnt --net=/proc/52772/ns/net --uts=/proc/52772/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce5/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce5/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,225 WARNING: ce6: Router(ce6): proc failed: rc 127 pid 53044
	args: /usr/bin/nsenter --mount=/proc/52847/ns/mnt --net=/proc/52847/ns/net --uts=/proc/52847/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce6/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce6/setup.sh: No such file or directory
	stderr: *empty*
````

This occurs because the topotest attempts to execute the `setup.sh`
file, and the file does not exist.

Let's fix the issue by checking if the `setup.sh` file exists and
executing it only if it does.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-21 09:43:06 +02:00
Carmine Scarpitta
5d76346266 tests: Fix warnings in bgp_srv6l3vpn_to_bgp_vrf2
When performing the `bgp_srv6l3vpn_to_bgp_vrf2` topotest, the following
warnings are observed:

```
2024-07-21 08:01:51,390 WARNING: r1: Router(r1): proc failed: rc 127 pid 52974
	args: /usr/bin/nsenter --mount=/proc/52322/ns/mnt --net=/proc/52322/ns/net --uts=/proc/52322/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,522 WARNING: r2: Router(r2): proc failed: rc 127 pid 52984
	args: /usr/bin/nsenter --mount=/proc/52397/ns/mnt --net=/proc/52397/ns/net --uts=/proc/52397/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,632 WARNING: ce1: Router(ce1): proc failed: rc 127 pid 52994
	args: /usr/bin/nsenter --mount=/proc/52472/ns/mnt --net=/proc/52472/ns/net --uts=/proc/52472/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,757 WARNING: ce2: Router(ce2): proc failed: rc 127 pid 53004
	args: /usr/bin/nsenter --mount=/proc/52547/ns/mnt --net=/proc/52547/ns/net --uts=/proc/52547/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,878 WARNING: ce3: Router(ce3): proc failed: rc 127 pid 53014
	args: /usr/bin/nsenter --mount=/proc/52622/ns/mnt --net=/proc/52622/ns/net --uts=/proc/52622/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce3/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce3/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,997 WARNING: ce4: Router(ce4): proc failed: rc 127 pid 53024
	args: /usr/bin/nsenter --mount=/proc/52697/ns/mnt --net=/proc/52697/ns/net --uts=/proc/52697/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce4/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce4/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,109 WARNING: ce5: Router(ce5): proc failed: rc 127 pid 53034
	args: /usr/bin/nsenter --mount=/proc/52772/ns/mnt --net=/proc/52772/ns/net --uts=/proc/52772/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce5/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce5/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,225 WARNING: ce6: Router(ce6): proc failed: rc 127 pid 53044
	args: /usr/bin/nsenter --mount=/proc/52847/ns/mnt --net=/proc/52847/ns/net --uts=/proc/52847/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce6/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce6/setup.sh: No such file or directory
	stderr: *empty*
````

This occurs because the topotest attempts to execute the `setup.sh`
file, and the file does not exist.

Let's fix the issue by checking if the `setup.sh` file exists and
executing it only if it does.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-21 09:42:52 +02:00
Carmine Scarpitta
44ee7a4abe tests: Fix warnings in bgp_srv6l3vpn_to_bgp_vrf
When performing the `bgp_srv6l3vpn_to_bgp_vrf` topotest, the following
warnings are observed:

```
2024-07-21 08:01:51,390 WARNING: r1: Router(r1): proc failed: rc 127 pid 52974
	args: /usr/bin/nsenter --mount=/proc/52322/ns/mnt --net=/proc/52322/ns/net --uts=/proc/52322/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,522 WARNING: r2: Router(r2): proc failed: rc 127 pid 52984
	args: /usr/bin/nsenter --mount=/proc/52397/ns/mnt --net=/proc/52397/ns/net --uts=/proc/52397/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,632 WARNING: ce1: Router(ce1): proc failed: rc 127 pid 52994
	args: /usr/bin/nsenter --mount=/proc/52472/ns/mnt --net=/proc/52472/ns/net --uts=/proc/52472/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,757 WARNING: ce2: Router(ce2): proc failed: rc 127 pid 53004
	args: /usr/bin/nsenter --mount=/proc/52547/ns/mnt --net=/proc/52547/ns/net --uts=/proc/52547/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,878 WARNING: ce3: Router(ce3): proc failed: rc 127 pid 53014
	args: /usr/bin/nsenter --mount=/proc/52622/ns/mnt --net=/proc/52622/ns/net --uts=/proc/52622/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce3/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce3/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,997 WARNING: ce4: Router(ce4): proc failed: rc 127 pid 53024
	args: /usr/bin/nsenter --mount=/proc/52697/ns/mnt --net=/proc/52697/ns/net --uts=/proc/52697/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce4/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce4/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,109 WARNING: ce5: Router(ce5): proc failed: rc 127 pid 53034
	args: /usr/bin/nsenter --mount=/proc/52772/ns/mnt --net=/proc/52772/ns/net --uts=/proc/52772/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce5/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce5/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,225 WARNING: ce6: Router(ce6): proc failed: rc 127 pid 53044
	args: /usr/bin/nsenter --mount=/proc/52847/ns/mnt --net=/proc/52847/ns/net --uts=/proc/52847/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce6/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce6/setup.sh: No such file or directory
	stderr: *empty*
````

This occurs because the topotest attempts to execute the `setup.sh`
file, and the file does not exist.

Let's fix the issue by checking if the `setup.sh` file exists and
executing it only if it does.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-21 09:42:32 +02:00
Nathan Bahr
ddc1c2eeae tests: OSPFv3 hello tests investigation, make assert output unique
These failing tests are hard to track down. Added numbering to each assert
to easily tell where the test fails.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-07-17 12:37:06 -05:00
Christian Breunig
5a70378a47 ospfd: fix internal ldp-sync state flags when feature is disabled
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>
2024-07-17 10:31:15 +02:00
Donatas Abraitis
c6c0403c61 tests: Check if VRF instance has a different ASN than a default VRF
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-15 16:10:57 +03:00
Donatas Abraitis
7540364e58 tests: Check if multiple VRF instances can have different ASNs
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-15 16:10:57 +03:00
Y Bharath
5b06a17715 tests: Refactoring FRR test suites
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-07-15 13:09:32 +05:30
Jafar Al-Gharaibeh
ad7a1f9487 tests: tweak timers to avoid frequent failures on slow CI hardware
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-07-12 11:36:52 -05:00
Russ White
52376aa4b6
Merge pull request #16229 from anlancs/ripd/fix-header-show
ripd/ripngd: use common header for display command
2024-07-09 16:12:30 -04:00
Mark Stapp
7d08b29721
Merge pull request #16342 from pguibert6WIND/duplicate_fib_proposal
Duplicate fib proposal
2024-07-09 13:48:37 -04:00
Russ White
685712df44
Merge pull request #16241 from zhou-run/202406191740
isisd: The neighbor entry still displays the deleted hostname of the neighbor.
2024-07-09 11:40:26 -04:00
Russ White
22db85a714
Merge pull request #16258 from opensourcerouting/tsan-20240620
lib, tests: fix some b0rked tests, then fix TSAN warnings
2024-07-09 11:36:24 -04:00
Russ White
29aba901d6
Merge pull request #16352 from opensourcerouting/fix/rename_test
tests: Rename BGP OAD test function
2024-07-08 23:16:20 -04:00
Philippe Guibert
731f74e35f zebra, topotests: do not set nexthop's FIB flag when DUPLICATE present
The bgp_duplicate_nexthop test installs routes with nexthop's
flags set to both DUPLICATE and FIB: this should not happen.

The DUPLICATE flag of a nexthop indicates this nexthop is already
used in the same nexthop-group, and there is no need to install it
twice in the system; having the FIB flag set indicates that the
nexthop is installed in the system. This is why both flags should
not be set on the same nexthop.

This case happens at installation time, but can also happen
at update time.
- Fix this by not setting the FIB flag value when the DUPLICATE
flag is present.
- Modify the bgp_duplicate_test to check that the FIB flag is not
present on duplicated nexthops.
- Modify the bgp_peer_type_multipath_relax test.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-07-08 15:42:02 +02:00
Philippe Guibert
7dfe12eef8 topotests: bgp_peer_type_multipath_relax, adds the duplicate flag
During the bgp_peer_type_multipath_relax_test, the test does not
check the 'duplicate' flag value of the duplicate nexthop.

Fix this by adding the duplicate value in the expected json files.

Fixes: ee88563ac2 ("bgpd: Add 'bgp bestpath peer-type multipath-relax'")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-07-08 15:15:59 +02:00
Xiao Liang
66a84c7c10 tests: Add IPv6 network adv/withdraw case in bgp_evpn_rt5 topotest
Note that withdrawing IPv6 route should not affect IPv4.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
2024-07-08 10:32:03 +02:00
zhou-run
f54970ff43 isisd: The neighbor entry still displays the deleted hostname of the neighbor
1. The lsp_update_data() function will check for the presence of the ISIS_TLV_DYNAMIC_HOSTNAME in the LSP, and then call isis_dynhn_insert() to add a hostname entry corresponding to the LSP ID. However, when the ISIS_TLV_DYNAMIC_HOSTNAME is not present in the LSP, the hostname entry corresponding to the LSP ID should also be deleted.
2. The command “show isis neighbor” invokes isis_adj_name() to display the System ID or hostname, but it does not check the area->dynhostname flag.
3. When the LSP expires and is removed, the corresponding hostname entry should also be deleted.
4. The TLV for LSP fragmentation will not contain the hostname and should be skipped.

Signed-off-by: zhou-run <zhou.run@h3c.com>
2024-07-08 15:53:46 +08:00
Donatas Abraitis
6477f73c0b tests: Rename BGP OAD test function
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-07 18:26:30 +03:00
Donatas Abraitis
cd9bb4dd7e tests: Extended bgp_remote_as_auto topotest with unnumbered case
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-05 15:57:52 +03:00
anlan_cs
b707ed8fe9 tests: update tests for ripd and ripngd
Since the displayed header of "show ip rip" and "show ipv6 ripng" are changed,
we should update tests of ripd and ripngd.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2024-07-05 09:54:06 +08:00
Donatas Abraitis
0dfe25697f bgpd: Implement neighbor X remote-as auto
In some cases (large scale) it's desired to avoid changing configurations, but
let the BGP to automatically handle ASN changes.

`auto` means the peering can be iBGP or eBGP. It will be automatically detected
and adjusted from the OPEN message.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-04 14:42:19 +03:00
Donald Sharp
266b061994 zebra: Properly note that a nhg's nexthop has gone down
Current code when a link is set down is to just mark the
nexthop group as not properly setup.  Leaving situations
where when an interface goes down and show output is
entered we see incorrect state.  This is true for anything
that would be checking those flags at that point in time.

Modify the interface down nexthop group code to notice the
nexthops appropriately ( and I mean set the appropriate flags )
and to allow a `show ip route` command to actually display
what is going on with the nexthops.

eva# show ip route 1.0.0.0
Routing entry for 1.0.0.0/32
  Known via "sharp", distance 150, metric 0, best
  Last update 00:00:06 ago
  * 192.168.44.33, via dummy1, weight 1
  * 192.168.45.33, via dummy2, weight 1

sharpd@eva:~/frr1$ sudo ip link set dummy2 down

eva# show ip route 1.0.0.0
Routing entry for 1.0.0.0/32
  Known via "sharp", distance 150, metric 0, best
  Last update 00:00:12 ago
  * 192.168.44.33, via dummy1, weight 1
    192.168.45.33, via dummy2 inactive, weight 1

Notice now that the 1.0.0.0/32 route now correctly
displays the route for the nexthop group entry.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-03 09:34:55 -04:00
Russ White
59e8f199e9
Merge pull request #16331 from opensourcerouting/feature/bgp_dampening_topotests
tests: Add basic BGP per-safi dampening topotest
2024-07-03 07:23:09 -04:00
Donatas Abraitis
7bde7a698c tests: Add basic BGP per-safi dampening topotest
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-02 17:57:06 +03:00
Donatas Abraitis
9ab41861ce
Merge pull request #16099 from Pdoijode/pdoijode/bgp-gr2
Implement BGP-wide configuration for graceful restart
2024-07-02 16:40:29 +02:00
Russ White
410947f6a7
Merge pull request #15677 from cscarpitta/isis-srv6-sid-manager
isisd: Extend IS-IS to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs
2024-07-02 08:32:05 -04:00
vivek
b5682ffbf0 *: Add and use option for graceful (re)start
Add a new start option "-K" to libfrr to denote a graceful start,
and use it in zebra and bgpd.

zebra will use this option to denote a planned FRR graceful restart
(supporting only bgpd currently) to wait for a route sync completion
from bgpd before cleaning up old stale routes from the FIB. An optional
timer provides an upper-bounds for this cleanup.

bgpd will use this option to denote either a planned FRR graceful
restart or a bgpd-only graceful restart, and this will drive the BGP
GR restarting router procedures.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
2024-07-01 13:02:52 -07:00
Pooja Jagadeesh Doijode
ecbca1ae1b tests: Updated topotest and documentation
Added topotest and documentation for BGP wide GR configurations

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2024-07-01 13:02:52 -07:00
Donatas Abraitis
dd6a679e3a tests: Test if RFC 8212 is not involved for BGP confederations
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-06-27 22:53:24 +03:00
Russ White
cc3519f3e6
Merge pull request #16182 from pguibert6WIND/isis_show_route_paths_json
Isis show route paths json
2024-06-25 11:57:15 -04:00
Russ White
7a87166178
Merge pull request #15838 from fdumontet6WIND/fix_regexx_exclude
bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issue
2024-06-24 17:08:17 -04:00
Philippe Guibert
d0a142aae4 isisd: override json fields for monitored paths
The json output for isis route paths should use caml format.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-21 15:40:23 +02:00
Philippe Guibert
ea6ad95ab5 topotests: isis_topo1_vrf, align json support on 'show isis topology' command
Add the json support from ISIS vty command.
> show isis vrf vrf1 topology json

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-21 15:40:23 +02:00
Philippe Guibert
cd68ea3447 topotests: isis_topo1, use 'show isis topology json' command
Add the json support from ISIS vty command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-21 15:40:23 +02:00
Philippe Guibert
3a2554e4a2 isisd: add json support to display spf paths in 'show isis route'
The 'show isis route json' command never displays the list of
paths. Add the json support for this sub-part.

> # show isis route json
> [..]
> "ipv6-paths":[
>  {
>   "Vertex":"rt1",
>   "Type":"",
>   "Metric":0,
>   "Next-Hop":"",
>   "Interface":"",
>   "Parent":""
>  },
>  {
>    "Vertex":"2001:db8:1000::1\/128",
>    "Type":"IP6 internal",
>    "Metric":0,
>    "Next-Hop":"",
>    "Interface":"",
>    "Parent":"rt1(4)"
>  },

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-21 15:40:23 +02:00
Philippe Guibert
df723ccfb7 isisd: show isis route uses ttable for paths
This is a preliminary commit, so that route paths are visible from json.

Before:
> IS-IS paths to level-1 routers that speak IPv6
> Vertex               Type         Metric Next-Hop             Interface Parent
> rt1
> 2001:db8:1000::1/128 IP6 internal 0                                     rt1(4)
> rt2                  TE-IS        10     rt2                  eth-rt2   rt1(4)
> rt3                  TE-IS        10     rt3                  eth-rt3   rt1(4)
> 2001:db8:1000::2/128 IP6 internal 20     rt2                  eth-rt2   rt2(4)
> 2001:db8:1000::3/128 IP6 internal 20     rt3                  eth-rt3   rt3(4)

After:
> Vertex                Type          Metric  Next-Hop  Interface  Parent
>  -------------------------------------------------------------------------
>  rt1
>  2001:db8:1000::1/128  IP6 internal  0                            rt1(4)
>  rt2                   TE-IS         10      rt2       eth-rt2    rt1(4)
>  rt3                   TE-IS         10      rt3       eth-rt3    rt1(4)
>  2001:db8:1000::2/128  IP6 internal  20      rt2       eth-rt2    rt2(4)
>  2001:db8:1000::3/128  IP6 internal  20      rt3       eth-rt3    rt3(4)

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-21 15:40:23 +02:00
Acee Lindem
c494702929 ospfd: Improve OSPF neighbor retransmission list granularity and precision
The current OSPF neighbor retransmission operates on a single per-neighbor
periodic timer that sends all LSAs on the list when it expires.
Additionally, since it skips the first retransmission of received LSAs so
that at least the retransmission interval (resulting in a delay of between
the retransmission interval and twice the interval. In environments where
the links are lossy on P2MP networks with "delay-reflood" configured (which
relies on neighbor retransmission in partial meshs), the implementation
is sub-optimal (to say the least).

This commit reimplements OSPF neighbor retransmission as follows:

   1. A new data structure making use the application managed
      typesafe.h doubly linked list implements an OSPF LSA
      list where each node includes a timestamp.
   2. The existing neighbor LS retransmission LSDB data structure
      is augmented with a pointer to the list node on the LSA
      list to faciliate O(1) removal when the LSA is acknowledged.
   3. The neighbor LS retransmission timer is set to the expiration
      timer of the LSA at the top of the list.
   4. When the timer expires, LSAs are retransmitted that within
      the window of the current time and a small delta (50 milli-secs
      default). The LSAs that are retransmited are given an updated
      retransmission time and moved to the end of the LSA list.
   5. Configuration is added to set the "retransmission-window" to a
      value other than 50 milliseconds.
   6. Neighbor and interface LSA retransmission counters are added
      to provide insight into the lossiness of the links. However,
      these will increment quickly on non-fully meshed P2MP networks
      with "delay-reflood" configured.
   7. Added a topotest to exercise the implementation on a non-fully
      meshed P2MP network with "delay-reflood" configured. The
      alternative was to use existing mechanisms to instroduce loss
      but these seem less determistic in a topotest.

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-06-20 15:31:07 +00:00
David Lamparter
e14c94f2b7 tests: fix TSAN warnings in atomlist test
The atomlist test consists of a sequence of (MT) sub-tests, from which
counters are collected and verified.  TSAN doesn't know that these
counters are synchronized by way of the sub-test starting and finishing,
so it complains.  Just use atomics to get rid of the warning.

(This is solely an issue with the test, not the atomlist code.  There
are no warnings from that.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-06-20 15:44:46 +02:00
David Lamparter
4836ac0714 tests: silence TSAN warning on test_seqlock exit
TSAN warns about leaving the second thread dangling.  Doesn't really
matter, but just add a pthread_join to get rid of the warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-06-20 11:16:10 +02:00
David Lamparter
8aeac1f005 tests/lib: fix seqlock test
seqlock_bump() used to return the value before bumping, but that's
unhelpful if you were to actually need it.  I had changed it to return
the value after, but the update to the test got lost at some point.

The return value is not in fact used anywhere in FRR, so while it is
a bug, it has zero impact.

NB: yes, test_seqlock is not run, which sounds wrong.  The problem here
is that (a) the test itself uses sleeps and is timing sensitive, which
would raise false positives.  And (b), the test is meaningless if
executed once.  It needs to be run millions of times under various
conditions (e.g. load) to catch rare races, and it needs to be run on
machines with "odd" memory models (in this case I used BE ppc32 and
ppc64 systems as test platforms.)

Fixes: 6046b690b5 ("lib/seqlock: avoid syscalls in no-waiter cases")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-06-20 11:02:19 +02:00
zhou-run
0db469958c isisd: Even after configuring "no hostname dynamic", the topology still displays the hostname.
The command "show isis topology" calls print_sys_hostname() to display the system ID or hostname, but it does not check the area->dynhostname flag.

Signed-off-by: zhou-run <zhou.run@h3c.com>
2024-06-19 15:44:51 +08:00
Donald Sharp
a1b21f526a
Merge pull request #16227 from y-bharath14/srib-topotest-e
tests: Avoid importing unused modules
2024-06-18 15:52:38 -04:00
Carmine Scarpitta
9e1803a772 tests: Update IS-IS SRv6 topotests
The locator is no longer split in multiple chunks.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-06-18 18:33:29 +02:00
Russ White
ae4e030813
Merge pull request #16236 from opensourcerouting/fix/recursive_weighted_ecmp
zebra: Set the weight for non-recursive next-hop
2024-06-18 11:14:00 -04:00
Russ White
627a8ac091
Merge pull request #16153 from pguibert6WIND/bgp_recursive_duplicate
bgpd: fix do not skip paths with same nexthop
2024-06-18 11:00:41 -04:00
Russ White
66ad4aaf3d
Merge pull request #16172 from LabNConsulting/dleroy/nhrpd-auth-support
nhrpd: add cisco-authentication password support
2024-06-18 10:04:24 -04:00
Russ White
e9e8a4baa4
Merge pull request #16194 from opensourcerouting/fix/bfd_profile_shutdown
bgpd: Do not start BGP session if BFD profile is in shutdown state
2024-06-18 09:57:00 -04:00
Russ White
b94fc2d2d6
Merge pull request #16195 from opensourcerouting/fix/drop_recent_confdate
ospfd: Drop `interfaceIp` from `show ip ospf neigh json`
2024-06-18 09:56:19 -04:00
Donatas Abraitis
6d5d4f7000 tests: Check if recursive weighted ECMP works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-06-18 12:16:54 +03:00
Y Bharath
8381dbd9e2 tests: Avoid importing unused modules
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-06-17 15:42:59 +05:30
Donatas Abraitis
e8ce036a7b
Merge pull request #16202 from y-bharath14/srib-topotest-d
tests: suppress unused variables at topotests
2024-06-14 10:25:25 +03:00
Jafar Al-Gharaibeh
2e02bd2366
Merge pull request #16184 from LabNConsulting/chopps/fe-notify-select
mgmtd: add notification selection to front-end API
2024-06-13 00:20:09 -05:00
Y Bharath
a63bfb7566 tests: supress unused variables at topotests
For code maintainability, suppressed unused variables with "_"

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-06-12 13:56:34 +05:30
Christian Hopps
27e369487e tests: add native session-req/reply support to fe_client.py
Use this to test new native message format for creating sessions.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-06-11 10:37:31 -04:00
Donatas Abraitis
59f5dd686a tests: Check if BFD notification is sent and session remains in down state
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-06-11 15:51:21 +03:00
Donatas Abraitis
3cc01bb00b tests: Drop interfaceIp from OSPF tests
Deprecated.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-06-11 15:48:23 +03:00
Philippe Guibert
d0bac2796b topotests: add bgp duplicate nexthop test
Add a topotest that ensures that when addpath is enabled and two
paths with same nexthop are received, they are sent to ZEBRA which
detects 'duplicate nexthop'.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-11 10:01:56 +02:00
Philippe Guibert
a6b1d38d7f topotests: add API to detect if iproute2 is json capable
Some tests may want to use the json facility of iproute2 to
dump some results.
Add an internal API in lib/topotest.py that tells whether iproute2
is json capable or not.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-06-11 10:01:56 +02:00
Dave LeRoy
b5540d326b nhrpd: add cisco-authentication password support
Taking over this development from https://github.com/FRRouting/frr/pull/14788

This commit addresses 4 issues found in the previous PR

1) FRR would accept messages from a spoke without authentication when FRR NHRP had auth configured.
2) The error indication was not being sent in network byte order
3) The debug print in nhrp_connection_authorized was not correctly printing the received password
4) The addresses portion of the mandatory part of the error indication was invalid on the wire (confirmed in wireshark)

Signed-off-by: Dave LeRoy <dleroy@labn.net>
Co-authored-by: Volodymyr Huti <volodymyr.huti@gmail.com>
2024-06-10 16:39:21 -07:00
Volodymyr Huti
51f0700286 nhrp: add cisco-authentication password support
Implemented:
- handling 8 char long password, aka Cisco style.
- minimal error inidication routine
- test case, password change affects conection

Signed-off-by: Volodymyr Huti <v.huti@vyos.io>
2024-06-10 16:39:21 -07:00
Renato Westphal
dc354cbfef tests: introduce method to update reference data in isis_tilfa_topo1
The isis_tilfa_topo1 topotest is comprehensive and contains a large
amount of reference data. One problem is that, when changes occur,
updating this reference data can be difficult.

To address this problem, this commit introduces a method to
automatically regenerate the reference data by setting the `REGEN_DATA`
environment variable.

Usage:
$ REGEN_DATA=true python3 ./test_isis_tilfa_topo1.py

When `REGEN_DATA` is set, the topotest regenerates reference data
from the current run instead of comparing against existing reference
data. Note that regenerated data must be manually verified for
correctness.

This commit also simplifies the reference data by replacing all diff
files with complete JSON snapshots.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2024-06-10 12:28:01 -03:00
Renato Westphal
04655c5f74 tests: rework isis_tilfa_topo1 to fix timing issues
In this topotest, steps 10-15 were added to test the IS-IS switchover
functionality. In short, two cases were tested: switchover after a
link down event and switchover after a BFD down event. Both cases
were tested in sequence on the same router, rt6. This involved the
following steps:
- Setting the SPF delay timer to 15 seconds
- Shutting down the eth-rt5 interface from the switch side
- Testing the post-switchover RIB and LIB (triggered by the link down
  event)
- Testing the post-SPF RIB and LIB
- Bringing the eth-rt5 interface back up
- Configuring a BFD session between rt6 and rt5
- Shutting down the eth-rt5 interface from the switch side once again
- Testing the post-switchover RIB and LIB (triggered by the BFD down
  event)
- Testing the post-SPF RIB and LIB

Since the time window to test the post-switchover RIB and LIB was too
narrow (10 seconds), these tests were having sporadic failures.

To resolve this problem, we can simplify the switchover test as follows:
- Setting the SPF delay timer to 60 seconds (not 15)
- Disabling "link-detect" on rt6's eth-rt5 interface
- Shutting down the eth-rt5 interface from the switch side
- On rt6, testing the post-switchover RIB and LIB (triggered by the
  BFD down event)
- On rt5, testing the post-switchover RIB and LIB (triggered by the
  link down event)

Notice how we can test both post-link-down and post-BFD-down switchover
cases simultaneously by having different "link-detect" configurations
on rt5 and rt6. Additionally, by using a larger SPF delay timer, the
time window to test the post-switchover RIB and LIB is much larger
and less prone to sporadic failures.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2024-06-10 12:28:01 -03:00
Donatas Abraitis
19c3e0eca6
Merge pull request #16093 from louis-6wind/fix-show-route-memory
zebra: fix Out Of Memory issue when displaying large route tables in JSON
2024-06-10 11:26:23 +03:00
Donald Sharp
2a00a648f1
Merge pull request #15900 from mikemallin/v6-vtep-lib-upstream
lib, bgpd, tests, zebra: prefix_sg changes for V6 VTEP
2024-06-07 14:34:11 -04:00
Dmytro Shytyi
83294afedf topotests: add bgp labeled unicast fec nexthop resolution tests
There are 3 tests with OSPF, IS-IS, BGP and MPLS configured:
1. Check the status of BGP session
between North and South == Established
2. Check the connectivity with "ping South -I North"
3. Check the label on the West.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-06-07 12:33:48 +02:00
Louis Scalbert
2d6dcc0c57 tests: check show route vrf all json output
Check that "show ip route vrf XXX json" and the JSON at key "XXX" of
"show ip route vrf all json" gives the same output.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-07 10:13:32 +02:00
Christian Hopps
56ce19891b tests: switch test to new fe_client notify selector syntax
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-06-06 22:39:53 -04:00
Christian Hopps
8772e444a7 tests: add notify select support in fe client test utility
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-06-06 22:39:53 -04:00
Christian Hopps
e14781eb1d lib: darr: add free with element cleanup functions
- `darr_free_free` to `darr_free` each element prior to `darr_free`
  the array.
- `darr_free_func` to call `func` on each element prior to `darr_free`
  the array.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-06-06 22:38:48 -04:00
Russ White
64f447fb10
Merge pull request #11906 from louis-6wind/show_isis_db_json
isisd: fix show isis database [detail] json
2024-06-06 16:27:57 -04:00
Russ White
84af49b0ae
Merge pull request #15434 from louis-6wind/labels-hash
bgpd: move labels from extra to extra->labels and add them to adj-rib-in and adj-rib-out
2024-06-06 16:27:38 -04:00
Christian Hopps
a465000035 tests: munet: update to version 0.14.9
Topotest relevant changes:

    - add support for `timeout` arg to `cmd_*()`
    - handle invalid regexp in CLI commands
    - fix long interface name support

Full munet changelog:

    munet: 0.14.9: add support for `timeout` arg to `cmd_*()`
    munet: 0.14.8: cleanup the cleanup (kill) on launch options
    munet: 0.14.7: allow multiple extra commands for shell console init
    munet: 0.14.6:
      - qemu: gather gcda files where munet can find them
      - handle invalid regexp in CLI commands
    munet: 0.14.5:
      - (podman) pull missing images for containers
      - fix long interface name support
      - add another router example
    munet: 0.14.4: mutest: add color to PASS/FAIL indicators on tty consoles
    munet: 0.14.3: Add hostnet node that runs it's commands in the host network namespace.
    munet: 0.14.2:
      - always fail mutest tests on bad json inputs
      - improve ssh-remote for common use-case of connecting to host connected devices
      - fix ready-cmd for python v3.11+
    munet: 0.14.1: Improved host interface support.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-06-06 08:50:05 +00:00
Louis Scalbert
3c86f776f0 bgpd: add bgp_labels hash
Add bgp_labels type and hash list.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-05 13:11:29 +02:00
Philippe Guibert
40706d5c42 topotests: add bgp test to check the ADJ-RIB-IN label value
The test is done on r2. A BGP update is received on r2, and is
filtered on r2. The RIB of r2 does not have the BGP update stored,
but the ADJ-RIB-IN is yet present. To demonstrate this, if the
inbound route-map is removed, then the BGP update should be copied
from the the ADJ-RIB-IN and added to the RIB with the label
value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-05 13:11:29 +02:00
Philippe Guibert
415befc30a topotests: add bgp test to check the ADJ-RIB-OUT label value
This test ensures that when r1 changes the label value, then
the new value is automatically propagated to remote peer.
This demonstrates that the ADJ-RIB-OUT to r2 has been correctly
updated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-05 13:11:29 +02:00
Louis Scalbert
191675451e topotests: clarify bgp_vpnv4_ebgp
Clarify bgp_vpnv4_ebgp

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-05 13:11:29 +02:00
Acee Lindem
3f359d732c ospf6d: OSPFv3 manual key authentication neglects checking the SA ID.
Also, add topotest variation to verify checking.

    This corrects https://github.com/FRRouting/frr/issues/16100.

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-06-04 21:24:46 +00:00
Donatas Abraitis
07573cf98b Revert "isisd: When the metric-type is configured as "wide", the IS-IS generates incorrect metric values for IPv4 directly connected routes."
This broke these topotests:

test_isis_lsp_bits_topo1
test_isis_sr_topo1
test_isis_srv6_topo1
test_isis_tilfa_topo1
test_isis_topo1
test_isis_topo1_vrf
test_ldp_snmp_topo1
test_ldp_sync_isis_topo1

This reverts commit 39e27b840e.
2024-06-04 17:31:40 +03:00
Russ White
fb4e4b5fb2
Merge pull request #16056 from zhou-run/202405211622
isisd: When the metric-type is configured as "wide", the IS-IS generates incorrect metric values for IPv4 directly connected routes.
2024-06-04 07:53:30 -04:00
Donald Sharp
9069c93e75
Merge pull request #16124 from LabNConsulting/chopps/test-cleanup
Fix grpc-client parallel run and other small test fixes
2024-05-31 10:47:52 -04:00
Mike RE Mallin
f450332476 tests: Extend prefix_sg print UT for IPv6
Signed-off-by: Mike RE Mallin <mremallin@gmail.com>
2024-05-31 10:27:22 -04:00
Christian Hopps
30d3b4d47e tests: use raw string for doc to avoid deprecated python warning
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31 05:16:22 -04:00
Christian Hopps
e855436cc6 tests: all errors go to log (and thus stderr)
Only output requested information to stdout so it can be
filtered and captured in shell variables etc...

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31 05:16:22 -04:00
Christian Hopps
5032be4f1c tests: fix pim test to wait for actual OSPF route convergence
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31 05:16:22 -04:00
Christian Hopps
cd5791c12e tests: fix multiple grpc-client.py running in parallel
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-31 05:16:22 -04:00
dleroy
a7037ab234 tests: add a topotest to verify nhrp shortcuts in a redundant nhs topology
Contains 2 testcases. The first does a basic configuration/connectivity.
The second testcase initiates a shortcut through the primary NHS,
verifies shortcut routes are installed. Primary NHS interface brought
down and verify that the shortcut is not impacted. Finally verify that
after the shortcut expires, it is able to be re-established via a backup
NHS.

Signed-off-by: dleroy <dleroy@labn.net>
2024-05-30 12:25:07 -07:00
Donald Sharp
f766686bce tests: Fix zebra_seg6_route
Locally this test would occassionally fail for me
because the connected route the sharp route being
installed has not fully come up yet due to heavy
load and start up slowness.  Add a bit of code
to look for the problem and make sure it doesn't
happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-29 14:52:44 -04:00
Igor Ryzhov
f8abf96440
Merge pull request #15082 from louis-6wind/fix-iff-lower-up
lib: take into account the Linux IFF_LOWER_UP flag
2024-05-29 00:01:20 +03:00
Russ White
ffaddf36a6
Merge pull request #16023 from opensourcerouting/fix/rpki_show_stuff
bgpd: Split `rpki cache` command into separate per SSH/TCP
2024-05-28 10:23:10 -04:00
Donald Sharp
c2b44a8bbe
Merge pull request #16091 from y-bharath14/srib-topotests-commits
tests: Organizing variables using format method
2024-05-28 10:07:12 -04:00
zhou-run
39e27b840e isisd: When the metric-type is configured as "wide", the IS-IS generates incorrect metric values for IPv4 directly connected routes.
The IPv4 directly connected route prefix exists in both the root LSP and the root's neighbor LSP:

1. When generating vertices for directly connected route prefixes with a metric of 0 based on the root LSP, the isis_spf_preload_tent_ip_reach_cb function only generates vertices of type VTYPE_IPREACH_INTERNAL without distinguishing between area->oldmetric and area->newmetric.
2. When generating vertices for the directly connected route prefix based on the neighbor LSP, the isis_spf_process_lsp function will generate vertices of type VTYPE_IPREACH_INTERNAL and VTYPE_IPREACH_TE based on area->oldmetric and area->newmetric, where the vertex metric is the sum of the metric from the root IS to the neighbor IS and from the neighbor IS to the root IS, respectively.

If area->newmetric=1, the same directly connected route prefix will have both VTYPE_IPREACH_INTERNAL vertices with a metric of 0 and VTYPE_IPREACH_TE vertices with a non-zero metric. During route generation, the isis_spf_loop function will prioritize selecting VTYPE_IPREACH_TE vertices, leading to incorrect metrics for the directly connected routes.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

fix frrbot styling issues found.

1)fix frrbot styling issues found.
2)Roll back the modifications to TE.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

Maintain code factorization and avoid duplicating code.

Maintain code factorization and avoid duplicating code.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: Resolve compilation issues.

Resolve compilation issues.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: Resolve compilation issues.

Resolve compilation issues.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: Resolve compilation issues.

Resolve compilation issues.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
2024-05-28 17:21:19 +08:00
Y Bharath
95426606b1 tests: Organizing variables using format method
Using format method to look code more presentable and readable

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-05-27 13:12:30 +05:30
Donatas Abraitis
c362af18e9
Merge pull request #16044 from louis-6wind/fix-loopback-leak
bgpd: fix route leaking from the default l3vrf
2024-05-24 10:13:01 +03:00
Louis Scalbert
d5879267aa isisd: fix show database json format
"show isis database [detail] json" returns invalid or incorrect JSON
that is difficult to parse.

Fix key with '-' characters, add booleans and null data when possible.
Deprecate the old format.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-05-23 14:43:21 +02:00
Donatas Abraitis
043cff5286 bgpd: Split rpki cache command into separate per SSH/TCP
Current command (bundled two into one) is absolutely wrong.

When you configure TCP session with the source, the command thinks, that
it's a SSH session with a username.

It's much better to split this into two separate commands where it's much
easier to do the changes in the future (if more options comes in).

Yes, this is a breaking change, but there is no other proper way to overcome
this.

Bonus note how it looks, which also can lead to crashes (due to port 0x0):

```
(gdb) p *cache->tr_config.ssh_config
$11 = {host = 0x5555562f9cd0 "1.1.1.1", port = 0, bindaddr = 0x0,
  username = 0x55555629ad00 "",
  server_hostkey_path = 0x7ffff53667a0 <rpki_create_socket> "Uf\017\357\300H\211\345AWAVAUATSH\201", <incomplete sequence \354\230>, client_privkey_path = 0x0,
  data = 0x0, new_socket = 0x51, connect_timeout = 4143762592,
  password = 0x7ffff6fccca0 <main_arena+96> "\300\"0VUU"}
(gdb) p *cache->tr_config.tcp_config
$12 = {host = 0x5555562f9cd0 "1.1.1.1", port = 0x0, bindaddr = 0x0,
  data = 0x55555629ad00, new_socket = 0x7ffff53667a0 <rpki_create_socket>,
  connect_timeout = 0}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-21 14:23:15 +03:00
Louis Scalbert
31fc89b230 bgpd, tests: fix route leaking from the default l3vrf
Leaked route from the l3VRF are installed with the loopback as the
nexthop interface instead of the real interface.

> B>* 10.0.0.0/30 [20/0] is directly connected, lo (vrf default), weight 1, 00:21:01

Routing of packet from a L3VRF to the default L3VRF destined to a leak
prefix fails because of the default routing rules on Linux.

> 0:      from all lookup local
> 1000:   from all lookup [l3mdev-table]
> 32766:  from all lookup main
> 32767:  from all lookup default

When the packet is received in the loopback interface, the local rules
are checked without match, then the l3mdev-table says to route to the
loopback. A routing loop occurs (TTL is decreasing).

> 12:26:27.928748 ens37 In  IP (tos 0x0, ttl 64, id 26402, offset 0, flags [DF], proto ICMP (1), length 84)
>     10.0.0.2 > 10.0.1.2: ICMP echo request, id 47463, seq 1, length 64
> 12:26:27.928784 red   Out IP (tos 0x0, ttl 63, id 26402, offset 0, flags [DF], proto ICMP (1), length 84)
>     10.0.0.2 > 10.0.1.2: ICMP echo request, id 47463, seq 1, length 64
> 12:26:27.928797 ens38 Out IP (tos 0x0, ttl 63, id 26402, offset 0, flags [DF], proto ICMP (1), length 84)
>     10.0.0.2 > 10.0.1.2: ICMP echo request, id 47463, seq 1, length 64

Do not set the lo interface as a nexthop interface. Keep the real
interface where possible.

Fixes: db7cf73a33 ("bgpd: fix interface on leaks from redistribute connected")
Fixes: 067fbab4e4 ("bgpd: fix interface on leaks from network statement")
Fixes: 8a02d9fe1e ("bgpd: Set nh ifindex to VRF's interface, not the real")
Fixes: https://github.com/FRRouting/frr/issues/15909
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-05-20 14:12:28 +02:00
Donald Sharp
e41b4a755e
Merge pull request #16012 from LabNConsulting/chopps/improve-grpc-test
tests: improve the grpc query client and topotest
2024-05-17 11:48:27 -04:00
Christian Hopps
07a084f921 tests: embed YANG in mgmtd unit-test bin
`make check` should run w/o installing FRR first. Thus we need to embed
the yang modules otherwise mgmtd unit-test fails.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-17 00:54:20 -04:00
Francois Dumontet
0df2e14997 tests: improve tests for aspath exclude and bgp access list
add some match in route map rules
add some set unset bgp access path list
add another prefix for better tests discrimination
update expected results

Signed-off-by:  Francois Dumontet <francois.dumontet@6wind.com>
2024-05-16 17:49:42 +02:00
Christian Hopps
9dc02dd338 tests: improve the grpc query client and topotest
- Add separate get, get-config, get-state operations to query command, as
well as switching default output to JSON.
- Add an `--xml` to change the output format.
- move printss to logging.debug so output is a machine parseable result.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-15 00:16:33 -04:00
Piotr Suchy
70e5005cba lib, vtysh, topotests: fix 'show ip[v6] access-list ... json' formatting
Similarly to recently fixed 'show ip[v6] prefix-list ...' - PR#15750,
json output is not valid for 'show ip[v6] access-list ... json' commands,
as it goes through all the running daemons and for each one it calls
'filter_show' creating a new json object. To aggreagate the output
and create a valid json that can later be parsed, the commands were
moved to vtysh and formatted accordingly

Signed-off-by: Piotr Suchy <piotrsuchy@proton.me>
2024-05-14 13:22:20 +02:00
Russ White
2e0208602b
Merge pull request #15911 from opensourcerouting/feature/bgpd_dampening_per_neighbor
bgpd: per-neighbor dampening support
2024-05-13 13:55:24 -04:00
Donald Sharp
b6f1b32c8a
Merge pull request #15961 from opensourcerouting/fix/allow_using_match_tag_0
lib: Allow doing match/set tag untagged
2024-05-13 09:59:36 -04:00
Donatas Abraitis
b3600d82dc
Merge pull request #15614 from louis-6wind/fix-6pe-address
bgpd: fix ipv4-mapped ipv6 on non 6pe
2024-05-10 22:55:12 +03:00
Donatas Abraitis
adce8e066c tests: Check if set/match tag untagged works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-10 10:25:26 +03:00
Christian Hopps
0939f77b39 tests: fix mis-spelled cryptographic-algorithm keyword in test
Also update to use a newer hashing function while we are here.

fixes #15923

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-09 04:34:32 -04:00
Russ White
ae01d44596
Merge pull request #15899 from gromit1811/ospf6_ecmp_inter_area_bugfix_15777_pr
ospf6d: Fix nexthop computation for inter-area multi-ABR ECMP
2024-05-07 10:48:32 -04:00
Russ White
ee853851bd
Merge pull request #15895 from opensourcerouting/fix/ignore_attributes_if_discard_is_configured
bgpd: Ignore validating the attribute flags if path-attribute is configured
2024-05-07 10:44:38 -04:00
Christian Hopps
c54bc7a8dd
Merge pull request #15594 from idryzhov/mgmt-rpc
mgmtd: implement YANG RPC/action support
2024-05-06 16:05:50 -04:00
Martin Buck
217e505a67 tests: Modify inter-area ECMP topotest to also test redundant ABRs
So far, this test only convered redundant paths to one ABR, now it checks
redundant paths to redundant ABRs, covering both cases. Useful as a
regression test for #15777.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2024-05-03 09:49:24 +02:00
Donatas Abraitis
709bdcbb23 tests: Check if dampening per-peer works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-03 09:30:33 +03:00
Christian Hopps
727633a046 tests: remove reliance on time.sleep
Use proper retry loop to wait for state to converge, not some arbitrary delay.

fixes #15878

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-02 06:10:48 -04:00
Donatas Abraitis
f58227c91e tests: Check if iBGP session can drop invalid AIGP attribute
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-01 16:33:52 +03:00
Donald Sharp
edac3efdc5
Merge pull request #15864 from opensourcerouting/fix/graceful_restart_per_neighbor
tests: Check if Graceful Restart per-neighbor works as expected
2024-04-29 09:16:36 -04:00
Donatas Abraitis
422e0dd256 tests: Apply black formatting from what frrbot suggested to be happy
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-28 12:51:22 +03:00
Donatas Abraitis
2ea6d2cca0 tests: Add missing check_router_status for bgp_tcp_mss test
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-28 12:51:22 +03:00
Donatas Abraitis
1a1c2a9f84 tests: Apply black formatting for all tests/topotests
It's just annoying when the linter tells to apply the formatting for the code
you didn't touch.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-27 23:19:32 +03:00
Donatas Abraitis
086df4bfaa tests: Drop duplicate pytestmark per file
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-27 23:18:15 +03:00
Donatas Abraitis
ede5f5092a tests: Drop debug statements from bgp_gr_restart_retain_routes
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-27 23:09:40 +03:00
Donatas Abraitis
e41012bebe tests: Check if Graceful Restart per-neighbor works as expected
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-27 23:06:19 +03:00
Donatas Abraitis
1c1de46878 tests: Use a single frr.conf for bgp_gr_restart_retain_routes
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-27 23:00:36 +03:00
Russ White
f19817f71d
Merge pull request #15723 from opensourcerouting/feature/extended_link_bw_refactored_v1
bgpd: Implement extended link-bandwidth
2024-04-26 14:41:05 -04:00
Louis Scalbert
efbf234510 topotests: add lower_up to expected interface flags
Add lower_up to expected interface flags.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-26 17:11:53 +02:00
Donald Sharp
f8e9f7fb0e
Merge pull request #15744 from pguibert6WIND/snmp_oid_line73_error
topotests: lib, fix filter out "At line 73 in /usr/share/snmp/mibs/ie…
2024-04-26 07:38:42 -04:00
Donatas Abraitis
0d0350aef0
Merge pull request #15783 from LabNConsulting/aceelindem/ospf-neighbor-filter
ospfd: Add prefix-list filtering of OSPF neighbors on OSPF interface
2024-04-24 22:30:11 +03:00
Donald Sharp
99ae329047
Merge pull request #15801 from LabNConsulting/chopps/new-munet
Improve coverage functionality
2024-04-23 12:58:48 -04:00
Philippe Guibert
5e7bb79f11 topotests: lib, fix filter out "At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU" message
When testing SNMP service on FRR, the following error message may
appear on some distros.

> # snmpwalk -v2c -c public .1.3.6 1.1.1.1 <OID>
> Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU
> [..then result ..]
>

The error message is due to the /etc/snmp/snmp.conf file. By default, this
file is used by both snmp server and client side. The net-snmp MIB parsing
routing loads MIBS, to bind oids with the naming scheme used by the MIBS.

> # cat /etc/frr/snmp.conf
> [snmp]
> mibs +ALL
>

A potential fix would consist in modifying the SNMPv2-PDU.mib file: the
problem is known on ubuntu distros, as the snmp-mibs-downloader package
has not updated the SNMPv2-PDU.mib file.

The choice is done to not modify the original distro where the test is run
on. Fix the topotests by ignoring the 'SNMPv2-PDU line 73" error message, and
keep the other error messages that may happen, for instance, when an
unknown oid name value is requested.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-04-23 14:24:51 +02:00
Louis Scalbert
f1b8364ab3 topotests: update bgp_vrf_leaking_5549_routes
Before the patch-set, ce1 was sending an IPv6 Link-local as global and
link-local nexthop to pe1.

Set bgp_vrf_leaking_5549_routes in accordance with the previous fixes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-23 11:28:36 +02:00
Louis Scalbert
04c220bedb tests: ipv6 global removal in bgp_nexthop_mp_ipv4_6
Test ipv6 global removal in bgp_nexthop_mp_ipv4_6

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-23 11:28:36 +02:00
Louis Scalbert
62913cb15d topotests: add bgp_nexthop_mp_ipv4_6 test
Add bgp_nexthop_mp_ipv4_6 topotest to test to nexhop value with
MP-BGP IPv4 and IPv6 on IPv4 peering. The test has route-reflector,
route-server, iBGP and eBGP peers.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-23 11:28:36 +02:00
Donatas Abraitis
593a806510 tests: Check if extended link bandwidth can be more than 25gbps
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-22 17:50:08 +03:00
Donatas Abraitis
055cc0488b tests: Check if extended link bandwidth is considered into also
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-22 17:50:08 +03:00
Igor Ryzhov
3c8336c845 tests: add topotest for mgmtd rpc processing
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-22 16:36:23 +03:00
Igor Ryzhov
03883ee431 tests: add test for NB RPC callback
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-22 16:36:22 +03:00
Christian Hopps
7f7bcb1ffa
Merge pull request #15468 from idryzhov/mgmt-native-edit
mgmtd: add support for native 'edit' operation
2024-04-22 05:42:44 -04:00
Donald Sharp
7ba58e97ff
Merge pull request #15738 from idryzhov/bfd-cbit
bfdd: fix BFD_GETCBIT
2024-04-21 10:59:11 -04:00
Christian Hopps
36b7c68111 tests: improve coverage no need to modify source/build dir
- by using symlinks in the rundir (/tmp) into the source/build directory
we avoid needing to copy the *.gcda stat files into the source/build dir.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-04-20 04:31:03 -04:00
Christian Hopps
44f5916d70 tests: update munet to 0.14.0 release
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-04-20 03:29:03 -04:00
Renato Westphal
790c207fa9 tests: fix BFD C-bit topotest
When a BFD down notification is received and the C-bit is set in both
directions, any ongoing graceful restart should be aborted and stale
routes removed from the RIB.

This commit updates the `bfd_bgp_cbit_topo3` topotest accordingly to
fix the expected outcomes in the `test_bfd_loss_intermediate` test.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2024-04-18 18:28:36 -03:00
Acee Lindem
0ccad8a2b0 ospfd: Add prefix-list filtering of OSPF neighbors on OSPF interface
This commit adds the capabiity to filter OSPF neighbors using a
prefix-list with rules matching the neighbor's IP source address.
Configuration, filtering, immediate neighbor pruning, topo-tests,
and documentation are included. The command is:

     ip ospf neighbor-filter <prefix-list> [A.B.C.D]

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-04-18 15:32:58 +00:00
Russ White
1c043440ea
Merge pull request #15572 from donaldsharp/best_path_stuff_sigh
bgp_process work
2024-04-16 07:52:09 -04:00
Donatas Abraitis
6b90e6140f tests: Check if maximum-prefix works for EVPN stuff also
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 23:10:27 +03:00
Donald Sharp
ea570f2aa6 tests: Cleanup generate_support_bundle() to not fail
The Support bundle generation was/is failing in both
our upstream ci and locally.  This cleans up the failures
that I am seeing such that tests now continue to run
instead of aborting the test run.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-10 09:28:17 -04:00
Donald Sharp
86aac4e36d
Merge pull request #15711 from louis-6wind/fix_test_table_version
topotests: do not check table version
2024-04-09 18:34:13 -04:00
Russ White
7f6cda36b1
Merge pull request #15660 from LabNConsulting/acee/ospf-p2mp-non-broadcast
ospfd: Implement non-broadcast support for point-to-multipoint networks
2024-04-09 11:56:34 -04:00
Louis Scalbert
29f47f3deb topotests: do not check table version
BGP table version is variable. Don't check it.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-09 14:51:35 +02:00
Louis Scalbert
a6ea590c6b tests: add ascii diagram to test_bgp_linkbw_ip
Add ASCII diagram to test_bgp_linkbw_ip

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-08 16:19:55 +02:00
Donatas Abraitis
925d78053b
Merge pull request #15682 from mjstapp/fix_topo_bfd_convergence
tests: increase topotest wait time for bfd convergence
2024-04-05 13:37:10 +03:00
Mark Stapp
c4188c74be tests: increase topotest wait time for bfd convergence
Increase the wait time in a bfd topotest; failing frequently
in the CI runs.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-04-04 12:57:07 -04:00
Philippe Guibert
c2e0060495 topotests: fix ignore routes with linkdown
In topotest, a given interface has only the ignore routes bit turned
on for IPv6 only, whereas topotest is expected to turn it on for all
address families.

> # show interface
> Interface r2-r3-eth2 is up, line protocol is up
> [..]
>  flags: <UP,BROADCAST,RUNNING,MULTICAST>
>  Ignore all v6 routes with linkdown
>  Type: Ethernet
>  [..]

This is because the only the 'default' ipv6 ignore sysctl is set to
1. Set also the /proc/sys/net/conf/<family>/default/ignore_routes_with_linkdown
flag, to have same behaviour for ipv4 and ipv6.

Fixes: 4958158787 ("tests: micronet: update infra")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-04-03 14:35:51 +02:00
Acee Lindem
58e623714b ospfd: Implement non-broadcast support for point-to-multipoint networks
This extends non-broadcast support to point-to-multipoint networks.
Neighbors will be explicitly configured and polled in lieu of multicast
dicovery. Toptotests and documentation updates are included.

Additionally, the ospf neighbor commands have been greatly simplified taking
advantage of DEFPY() capabilities.

The AllOSPFRouters (224.0.0.5) is still joined for non-broadcast networks
since it is joined for NBMA networks. It seems this could be removed but
it should done be in a separate commit.

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-04-02 21:34:29 +00:00
Donatas Abraitis
6d237c2fa5
Merge pull request #15639 from chiragshah6/fdev2
tests: add topotest for PG remote-as add del
2024-04-02 00:00:55 +03:00
Chirag Shah
ede6e911b0 tests: add topotest for PG remote-as add del
This topotest covers the PR-15574's coverage
where a change is not to delete neighbors when
the associated peer-group's remote-as is removed.

Ticket: #3828243
Testing:

test_bgp_peer-group.py::test_bgp_peer_group

---------------------------------------------------------------------------- live log call -----------------------------------------------------------------------------
2024-03-29 18:12:22,608 INFO: r1: checking if daemons are running
2024-03-29 18:12:22,802 INFO: r2: checking if daemons are running
2024-03-29 18:12:22,911 INFO: r3: checking if daemons are running
2024-03-29 18:12:23,015 INFO: topo: Remove bgp peer-group PG1 remote-as neighbor should be retained
2024-03-29 18:12:25,605 INFO: topo: Re-add bgp peer-group PG1 remote-as neighbor should be established

----------------------------------------------------------- generated xml file: /tmp/topotests/topotests.xml -----------------------------------------------------------
========================================================================== 2 passed in 17.63s ==========================================================================

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-04-01 10:29:46 -07:00
Donald Sharp
6c8bfaa66e bgpd: Add BGP_PATH_UNSORTED for future commits
Add a new flag BGP_PATH_UNSORTED to keep track
of sorted -vs- unsorted path_info's.  Add some
ability to the system to understand when that
flag is set.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-01 10:24:14 -04:00
Donald Sharp
829a2e9bc4 tests: teste_ospf_rte_calc.py uses bgp add pytest mark
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-01 10:24:14 -04:00
Donald Sharp
4d4c3966c9 tests: Explicitly call out bgp timers for bgp_evpn_mh test
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-01 10:24:14 -04:00
Philippe Guibert
707bd3598c topotests: l3vpn_to_bgp_direct, complete ambiguous command 'show bgp next'
Complete the 'show bgp next' command expected when the l3vpn_to_bgp_direct
is executed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-03-27 21:33:01 +01:00
Igor Ryzhov
1046bef240 tests: add topotest for mgmt native edit command
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-26 17:00:15 +02:00
Russ White
67aaa4b076
Merge pull request #15525 from venko-networks/ccs/bugfix/show-ip-bgp
bgpd: add missing white-space between route short status and network …
2024-03-26 10:04:43 -04:00
Christian Hopps
043a4183c2 grpc: fix grpc for various failures
lib: don't define a `fallthrough` in c++ to avoid conflict with protobuf c++

check: add link libs required by some versions of grpc++ or it's dependent
linked libs

tests: don't fail the test due to known at exit memleaks
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-21 15:57:01 +00:00
Russ White
e2d63567ec
Merge pull request #15565 from LabNConsulting/chopps/code-cover
tests: enable code coverage reporting with topotests
2024-03-19 17:19:45 -04:00
Cassiano Campes
6859414ebf bgpd: Adjusted topotests to reflect the new "show ip bgp" output
Topotests changed to consider the extra wite space added in "show ip
bgp" output.

Signed-off-by: Cassiano Campes   <cassiano.campes@venkonetworks.com>
2024-03-19 16:36:14 -03:00
Cassiano Campes
c490a8f1e6 bgpd: Updated topotests with new changes
Updated the topotests to contemplate the new `show ip bgp` outputs.

Signed-off-by: Cassiano Campes   <cassiano.campes@venkonetworks.com>
2024-03-19 16:36:14 -03:00
Russ White
80c8e10f5d
Merge pull request #15533 from opensourcerouting/fix/add_paths_limit_capability_test
bgpd: Add tests for Paths-Limit capability
2024-03-19 10:18:44 -04:00
Christian Hopps
2329a95872 tests: required formatting change
This code wasn't touched by the actual change; however, the formatting fix is
required.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-17 04:57:42 -04:00
Christian Hopps
71368f9e06 tests: enable code coverage reporting with topotests
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-17 04:53:13 -04:00
Francois Dumontet
260bdafd8a tests: bgp_sender_as_path_loop_detection add peer-group test
add a tests of setting as-path-loop-detection through peer-group

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-03-15 11:22:57 +01:00
Donatas Abraitis
6ff16b3439 tests: Check if Paths-Limit capability is working dynamically
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-13 16:50:06 +02:00
Donald Sharp
c514e84979
Merge pull request #15516 from opensourcerouting/freebsd-printf-sync-20240310
lib/printf: pick up ISO C23 / N2680 from FreeBSD
2024-03-11 10:32:32 -04:00
Donatas Abraitis
fd613d1b0c tests: Check if capabilities can be disabled via dynamic capabilities
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-10 18:53:39 +02:00
David Lamparter
91fdb7366c tests: exercise %w/%wf printfrr modifiers
Added by ISO C23 / N2680, implementation imported from FreeBSD.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-03-10 15:29:17 +01:00
Donald Sharp
7e058c201a
Merge pull request #15469 from LabNConsulting/chopps/keychain-yang
add ietf-key-chain YANG module support
2024-03-08 08:15:02 -05:00
Donatas Abraitis
7338aa601c
Merge pull request #15492 from donaldsharp/no_vrfs
tests: test invokes a script which does not exist
2024-03-06 08:42:37 +02:00
Donald Sharp
3a78d75cd5 tests: test invokes a script which does not exist
Apparently test_bgp_peer_type_multipath_relax.py does
no really need to run a `setup_vrfs` script.  Looking
at the other configuration for this test there are
no vrf's in the frr configuration.  So let's remove it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-05 15:55:07 -05:00
Donatas Abraitis
ffab0d7fbc
Merge pull request #15222 from chiragshah6/fdev2
bgpd:aggr summary-only remove suppressed from evpn
2024-03-05 22:36:30 +02:00
Russ White
ac34badf71
Merge pull request #15397 from idryzhov/zebra-oper
zebra: oper data additions
2024-03-05 11:41:35 -05:00
Chirag Shah
f345460b7e tests:add topotest for EVPN aggregate prefix route
Toptotest covers to aggregate EVPN prefix routes.

Testing:

tests/topotests/bgp_evpn_vxlan_svd_topo1$ sudo -E python3 -m pytest -s -vv --cli-on-error
PASSED
test_bgp_evpn_vxlan_svd.py::test_pe_advertise_aggr_evpn_route
--------------------- live log call -------------------------------
2024-03-04 19:59:45,340 INFO: P1: checking if daemons are running
2024-03-04 19:59:45,444 INFO: PE1: checking if daemons are running
2024-03-04 19:59:45,578 INFO: PE2: checking if daemons are running
2024-03-04 19:59:45,680 INFO: host1: checking if daemons are running
2024-03-04 19:59:45,798 INFO: host2: checking if daemons are running
2024-03-04 19:59:45,896 INFO: topo: Checking BGP EVPN route contains non-aggregate prefixes
2024-03-04 19:59:45,992 INFO: topo: Configure BGP aggregate-address summary-only under ipv4-unicast
2024-03-04 19:59:46,120 INFO: topo: Checking BGP EVPN route contains aggregated prefix
PASSED

------- generated xml file: /tmp/topotests/topotests.xml -----
======= 10 passed, 1 skipped in 47.95s =====

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-03-05 07:03:39 -08:00
Christian Hopps
f47abbe1cb tests: add test for keychain send-accept times
Also uses oper state `active` node to test.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-04 20:00:15 -05:00
Donald Sharp
c12f88cf66 tests: Add a pytest marker for the fpm
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -05:00
Donald Sharp
5ca133e070 tests: Add a very simple test for the dplane_fpm_nl module
Ensure that the fpm module connects to the specified listener
and then ensure that 10k routes from sharpd are installed
into the system and then are removed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -05:00