Commit Graph

2735 Commits

Author SHA1 Message Date
Donatas Abraitis
be251beef2
Merge pull request #12639 from donaldsharp/breakup_bgp_vrf_dynamic_route_leak_topo4
tests: Breakup bgp_vrf_dynamic_route_leak_topo4
2023-01-14 22:26:43 +02:00
Donatas Abraitis
c7fe4786dc tests: Check if routes are not sent back from the sender
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-14 21:30:07 +02:00
Donatas Abraitis
760aee9ac2 tests: Check if we can discard unwanted attributes from the paths
Using `neighbor path-attribute discard ...` command.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-14 21:29:41 +02:00
Donald Sharp
186b9ab8c5 tests: Breakup bgp_vrf_dynamic_route_leak_topo4
Single run of this test suite on my machine was 8 minutes.
Breaking this up into 3 test suites halves the run time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-13 15:30:33 -05:00
G. Paul Ziemba
25cdcf1fac topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")
This change alters the behavior of existing test code. The
    default mode (before any call to luSetWaitType()) is now
    "strict".

    The historical behavior of luCommand(op="wait) is to ignore
    failures to match the specified regexp in the specified time.
    In those cases, no result was logged and no error was signaled.

    This change introduces a new "strict" mode for luCommand(op="wait):
    in "strict" wait mode, each invocation of luCommand(op="wait)
    generates an explicit, logged failure result when it fails to match
    the specified regexp in the specified time. These failures signal
    an error for the test.

    Calling luSetWaitType("nostrict") restores the historical behavior.

    Calling luSetWaitType("strict") (re)enables the new strict behavior.

    Individual calls to luCommand() may also specify op="wait-nostrict"
    to override any default and use the historical behavior.

    Individual calls to luCommand() may also specify op="wait-strict"
    to override any default and use the new behavior.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2023-01-13 10:53:36 -08:00
Rafael Zalamena
771fdeaf39 topotests: test BFD static route integration
Test that BFD static monitoring works:
When BFD session is up the routes are installed in the RIB and
distributed with routing protocol (in this case BGP). When the session
is down it is removed from RIB and propagated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2023-01-13 15:32:12 -03:00
Donald Sharp
914c1e35b5 Revert "tests: Fix wrong interface name in SRv6 topotest"
This reverts commit 647c38eab2.
2023-01-13 09:02:34 -05:00
Donald Sharp
2bb8b49ce1 Revert "Merge pull request #11127 from louis-6wind/bgp-leak"
This reverts commit 16aa1809e7, reversing
changes made to f616e71608.
2023-01-13 08:13:52 -05:00
Donald Sharp
c72e51ac70 tests: Pim vrf's need 4.19 or better to run properly not 4.15
Tests are failing in micronet because linux kernel needs are 4.19
not 4.15

2023-01-11 17:15:06,657.657 INFO: topolog.r1: vtysh command => "show zebra"
2023-01-11 17:15:06,657.657 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show zebra" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,729.729 INFO: topolog.r1: vtysh result:
	OS                             Linux(4.15.0-193-generic)

Notice the missing pimreg11 device needed in vrf blue:

2023-01-11 17:15:06,731.731 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show int brief" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,781.781 INFO: topolog.r1: vtysh result:
	Interface       Status  VRF             Addresses
	---------       ------  ---             ---------
	blue            up      blue            192.168.0.1/32
	r1-eth0         up      blue            192.168.100.1/24
	r1-eth1         up      blue            192.168.101.1/24

	Interface       Status  VRF             Addresses
	---------       ------  ---             ---------
	erspan0         down    default
	gre0            down    default
	gretap0         down    default
	lo              up      default
	pimreg          up      default

	Interface       Status  VRF             Addresses
	---------       ------  ---             ---------
	r1-eth2         up      red             192.168.100.1/24
	r1-eth3         up      red             192.168.101.1/24
	red             up      red             192.168.0.1/32

While on a 5.4 machine we have this:

mininet310# show int brief
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
blue            up      blue
dummy1          up      blue
dummy2          up      blue
pimreg11        up      blue

As such let's limit the test to a 4.19 kernel or above that our
documentations states we need for proper pim operation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-11 13:23:51 -05:00
Rafael Zalamena
d3d497afcd
Merge pull request #12581 from cscarpitta/fix/fix-wrong-interface-name-srv6l3vpn-topotest
tests: Fix wrong interface name in `bgp_srv6l3vpn_route_leak` topotest
2023-01-04 13:30:48 -03:00
Donatas Abraitis
23691a80d7
Merge pull request #12318 from gpnaveen/bgp_unique_rid
tests: adding bgp unique router id automation.
2023-01-03 22:18:14 +02:00
Carmine Scarpitta
647c38eab2 tests: Fix wrong interface name in SRv6 topotest
Previously, routes leaked from one VRF to another VRF were associated
with the original nexthop interface.

Commit 14aabc0156 replaced the nexthop
interface with the index of incoming VRF interface.

Due to this change, the `bgp_srv6l3vpn_route_leak` topotest always fails
because it still expects the nexthop interface.

This commit fixes the expected interface name in the
`bgp_srv6l3vpn_route_leak` topotest.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-12-31 15:58:05 +01:00
Russ White
16aa1809e7
Merge pull request #11127 from louis-6wind/bgp-leak
bgpd: multiple fixes for route leaking
2022-12-27 14:51:28 -05:00
Donatas Abraitis
8431489f74
Merge pull request #12551 from proelbtn/fix-install-srv6-local-routes
bgpd: Fix announce SRv6 locally-generated routes to Zebra
2022-12-23 14:51:46 +02:00
Ryoga Saito
4d85efb0d3 tests: Add topotest bgp_srv6l3vpn_route_leak
To verify previous changes, this PR adds topotest to verify whether
imported routes redistributed will be active on other VRF RIB.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2022-12-20 20:07:44 +09:00
Donatas Abraitis
99f60e5ecb tests: Add an option for SNMP config to specify a custom options
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-20 09:42:36 +02:00
Donatas Abraitis
54257fae5d tests: Add basic tests for SNMP BGP4V2-MIB
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-19 23:27:33 +02:00
David Lamparter
7b78f6c87f
Merge pull request #12522 from donaldsharp/some_various_stuff 2022-12-16 15:30:37 +01:00
Philippe Guibert
4a62ec1669 topotests: fix appropriate number of routes in bgp
The number of routes in BGP ce devices was wrong.
Change the expected values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-12-16 15:07:58 +01:00
Louis Scalbert
767199c683 topotests: raise an error if pinging from vrf is not possible
Because of the issue described in the above link, pinging from vrf with
the command "ip vrf exec <vrf> ping -I <src> <addr>" may fail.

> root@topo:~# ip vrf exec vrf1 ping -c1 -I 192.168.2.1 192.168.1.1
> bind: Cannot assign requested address

Raise an error if pinging its own IP from a VRF fails. This test should
always work unless in the condition of this issue.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=203483
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 15:07:57 +01:00
Louis Scalbert
56748da55f topotests: add tests to bgp-vrf-route-leak-basic
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 15:07:56 +01:00
Louis Scalbert
a1d9f6f2f2 topotests: add VRF leak tests in bgp_l3vpn_to_bgp_vrf
Check that route leaking between VRF within a router works properly.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 15:07:55 +01:00
Louis Scalbert
90bdefa094 topotests: add retry in BGP RIB check
Add a retry option in the BGP RIB test.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 15:07:55 +01:00
Louis Scalbert
a7e794215c topotests: add ability to check that a prefix is not in BGP RIB
Add an "exist" key to check the existence of a prefix in the BGP RIB.
Useful to check that a prefix has not leaked by error.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 15:07:54 +01:00
Louis Scalbert
36c61d5c8b topotests: update bgp_vrf_route_leak_basic
Update bgp_vrf_route_leak_basic to set up the VRF interfaces. Otherwise
the routes to the VRF interface are inactives.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 14:52:47 +01:00
Louis Scalbert
6b74c9fa66 topotests: update ospf_multi_vrf_bgp_route_leak
Leaked connected routes have now the following nexthop interfaces:
- lo for routes imported from the default VRF
- or the VRF interface for routes imported from the other VRFs.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-16 14:52:47 +01:00
Donatas Abraitis
507621139b
Merge pull request #10576 from louis-6wind/fix-l3vpn-igmetric
bgpd: fix the IGP metric for best path selection on VPN import
2022-12-16 09:18:01 +02:00
Donald Sharp
074c80b705 lib, tests, zebra: Remove unused workqueue error function
The wq->spec.errorfunc is never used in the code.
It's been in the code base since 2005 and I also
do not remember ever seeing it being called.  No
workqueue process function ever returns error.
Since it's not used let's just remove it from the
code base.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-12-15 11:15:33 -05:00
Donald Sharp
9a5602b8ed tests: Limit run of config_timing when building with --enable-address-sanitizer
Building FRR with --enable-address-sanitizer and then running the
config_timing test makes the test run for over an hour on my machine.
The goal of this test is to ensure that the test runs 10000 routes
in/out in a reasonable amount of time.  We cannot test this with
address-sanitizer enabled.  So just make the test meaningless
from a timing perspective but keep it `alive` from a it might
catch some address sanitizer issue with 50 -vs- 10000 routes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-12-15 11:15:33 -05:00
Louis Scalbert
dbb03df84f tests: fix IGP metric best path selection in bgp_l3vpn_to_bgp_vrf
The L3VPN best path computation now takes into accound the IGP metric.

Adapt the bgp_l3vpn_to_bgp_vrf tests so that routes with the best IGP
metric are selected when needed.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-15 17:10:59 +01:00
Louis Scalbert
e577535f15 tests: add a bgp path selection topotest
Add a bgp path selection topotest to the IGP metric path selection.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-12-15 17:10:59 +01:00
Donald Sharp
9da878b66a
Merge pull request #12481 from kuldeepkash/topotests_startup
tests: Topotests daemon start as per feature test
2022-12-15 07:31:49 -05:00
Donatas Abraitis
a1dcf3022a
Merge pull request #12438 from proelbtn/fix-#12349
bgpd: Stop overriding nexthop in vpn_leak_from_vrf_update when the peer is BGP unnumberred
2022-12-15 09:09:09 +02:00
Kuldeep Kashyap
ac6ef90b87 tests: Fix frrbot style issues
There were some style issues found by
frrbot, fixing as part of this commit.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-12-13 22:45:48 -08:00
Kuldeep Kashyap
991a971fe9 tests: Cleaning up daemon param used in start_topology()
Earlier daemon parameter was passed to
start_topology(), which is not needed now,
as new code is implemented to start
feature specific daemons.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-12-13 22:45:34 -08:00
Kuldeep Kashyap
dc4c450fc2 tests: Topotests daemon start as per feature test
Currently topotests starts all daemons by default,
made changes to f/w so only needed daemons can
be started, daemons which are needed to tests
particular test suite.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-12-13 20:25:41 -08:00
Russ White
c9c71927ea
Merge pull request #12191 from manojvn/463777
ospf6d: ospf6 route installation when changed from nssa to regular area.
2022-12-13 09:58:04 -05:00
nguggarigoud
441875ea4f tests: adding bgp unique router id automation.
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2022-12-12 22:03:54 -08:00
Donald Sharp
21b432f79f tests: Add a test to show that BGP does not crash with unnumbered interfaces
This series of events will crash BGP prior to the prior commit:

a) Configure an interfaced based peering
b) Shut the interface the peering is over
c) remove the peering from bgp

Show that this no longer happens

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-12-10 07:40:32 -05:00
Donald Sharp
e3f5a669e4
Merge pull request #12462 from opensourcerouting/fix/default_originate_labeled_unicast
bgpd: Labeled unicast with default-originate
2022-12-09 19:44:58 -05:00
Donatas Abraitis
387a5ffe5a tests: Add more tests for labeled-unicast and addpath
Check if we advertise more routes when an additional path comes up, and
if we withdraw if dissapears.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-09 14:12:32 +02:00
Ryoga Saito
2b0efccd05 tests: Add topotest bgp_vrf_leaking_5549_routes
To verify previous changes, this PR introduces topotest to verify
whether imported routes learnt from BGP unnumbered peers will be active
on VPN RIB and other VRF RIB.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2022-12-09 07:13:54 +09:00
Donald Sharp
f47c65ff87 tests: ospf_gr_helper tests are slow
With a dead interval of 40 seconds, each tests is waiting 40+
seconds for ospf convergence to occurr because the DR is re-elected

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-12-08 14:20:23 -05:00
Donatas Abraitis
31f77524bf tests: Check if default-originate works with labeled-unicast
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-07 23:24:28 +02:00
Donald Sharp
1b97fa9976
Merge pull request #12456 from opensourcerouting/fix/bgpd_labeled_unicast_rr_addpath
bgpd: Labeled unicast fixes for addpath capability
2022-12-07 08:03:59 -05:00
Manoj Naragund
50a275d7c9 tests: Testcase for OSPFv3 learning.
Have added topotest to verify OSPF can learn different types of LSA,
and processes them

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
2022-12-06 09:11:16 -08:00
Donatas Abraitis
b0ade0a111 tests: Check if labeled-unicast works correctly with addpath capability
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-06 18:24:13 +02:00
Russ White
17ccfbb6c2
Merge pull request #12322 from fdumontet6WIND/confed_num
bgp:  fix case where confederation id same as member-as
2022-12-06 08:59:44 -05:00
Donald Sharp
1f98f42443
Merge pull request #12437 from proelbtn/proelbtn-fix-srv6-tests
bgpd, tests: Fix topotests for SRv6 L3VPN and misuse of sid_unregister
2022-12-05 07:38:18 -05:00
Donatas Abraitis
1b484abc7d tests: Check if community-list works as expected
AND/OR cases.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-04 22:25:38 +02:00
Ryoga Saito
625fe20b6d tests: Fix topotests for bgp_srv6l3vpn
In bgp_srv6l3vpn tests, check_ping checks reachability. However, this
function have a bug and if we set expect_connected to True, check will
pass even if all ping packets are lost. This commit fixes this issue.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2022-12-04 17:02:30 +09:00
Donald Sharp
0ec0fee279
Merge pull request #12418 from opensourcerouting/fix/tests_for_while_true
Fix old tests with `while true`
2022-12-01 11:00:23 -05:00
Rafael Zalamena
60ee19e20b
Merge pull request #12425 from cscarpitta/fix/fix-bgp-srv6l3vpn-to-bgp-vrf2-topotest
tests: Fix `bgp_srv6l3vpn_to_bgp_vrf2` topotest failures
2022-12-01 07:46:52 -03:00
Carmine Scarpitta
6e502a0a75 tests: Fix bgp_srv6l3vpn_to_bgp_vrf2 topotest
The `bgp_srv6l3vpn_to_bgp_vrf2` topotest tests the SRv6 IPv4 L3VPN
functionality. It applies the appropriate configuration in `bgpd` and
`zebra`, and then checks that the RIB is updated correctly.

The topotest expects to find the AS-Path in the RIB, which is only
present if the `bgp send-extra-data zebra` option is enabled in the
`bgpd` configuration.

Currently, the `bgp send-extra-data zebra` option is not set in the
`bgpd` configuration, which always causes the topotest to fail.

This commit fixes the `bgp_srv6l3vpn_to_bgp_vrf2` topotest by enabling
the `bgp send-extra-data zebra` option for both routers `r1` and `r2`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-11-30 22:18:49 +01:00
Donatas Abraitis
32655aa212 tests: Improve bgp_maximum_prefix_invalid_update test case
Drop `grep'ing` stuff, and check JSON data if notification was send or not.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-30 17:22:43 +02:00
Donatas Abraitis
7591803d88 tests: Refactor bgp_maximum_prefix_invalid_update test case
Just drop `while true` stuff.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-29 17:02:40 +02:00
Russ White
dd6e0bc0cc
Merge pull request #12329 from opensourcerouting/feature/graceful-shutdown_per_peer
bgpd: Implement graceful-shutdown command per neighbor
2022-11-29 08:47:20 -05:00
Donatas Abraitis
27858b3be9 tests: Refactor bgp_local_as_private_remove test case
Just drop `while true` stuff.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-29 15:19:56 +02:00
Donatas Abraitis
52ffb4e6c0 tests: Refactor bgp_comm-list_delete test case
Just drop `while true` stuff.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-29 15:08:09 +02:00
Francois Dumontet
bb31900439 topotest: add test for confederation
add a test dedicated to confederation. it also take into
account the support of AS memberwith same id  that the
confederation id.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2022-11-28 14:24:49 +01:00
Donald Sharp
d58334ea1c
Merge pull request #12342 from opensourcerouting/fix/small_waiting_times
tests: Fail tests immediately if they use too low wait/count values
2022-11-28 08:10:23 -05:00
Donatas Abraitis
a433c49cc6
Merge pull request #12371 from proelbtn/fix-frr-reload-doesnot-work
bgpd: Fix the order of SRv6 locator parameters
2022-11-25 09:20:50 +02:00
Ryoga Saito
4d0ee77eaf tests: Correct srv6 locator testcases
Previous commit changes the order of srv6 locator parameters. So, this
PR reflect the previous changes.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2022-11-24 17:19:53 +09:00
Stephen Worley
f5a6f8202d
Merge pull request #11908 from sigeryang/tc-state-mgmt
zebra: traffic control state management & ZAPI
2022-11-22 12:02:15 -05:00
Stephen Worley
c8b92cd80a
Merge pull request #12340 from opensourcerouting/fix/rfc5549_vpn_set_ip_nexthop
bgpd: Allow overriding MPLS VPN next-hops via route-maps
2022-11-22 11:41:48 -05:00
Siger Yang
f2ae263bb7
tests: traffic control PoC topotests
This commit adds a basic test for sharpd traffic control PoC, which will check
interface TC info from iproute2 `tc` cli.

Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-11-22 22:35:35 +08:00
Donatas Abraitis
d3a6af081e tests: Set minimum wait time for tests to 5 seconds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-22 13:38:10 +02:00
Donatas Abraitis
a5722d5a78 tests: Fail tests immediately if they use too low wait/count values
This is for run_and_expect_type and run_and_expect topotests method.

Some contributions unintentionally get merged with very low values, that leads
to CI failures, let's guard this a bit.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-22 11:17:04 +02:00
Donald Sharp
c6653ab2eb tests: Expand minimum run_and_expect to 5 seconds
Ensure that the minimum time spent run and expecting is
5 seconds.  Heavy load is not a reason to fail a test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-21 19:42:18 -05:00
Donald Sharp
9d44fb97a1
Merge pull request #12313 from louis-6wind/fix-lfa-topo
tests: fix bfd in isis_lfa_topo1 step24
2022-11-21 12:03:14 -05:00
Louis Scalbert
f2393c7553 tests: do not use a custom expect function in isis_lfa_topo1
Replace the custom run and expect function by one from the library.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-11-21 13:48:51 +01:00
Louis Scalbert
17e8fa831a tests: fix bfd in isis_lfa_topo1 step24
isis_lfa_topo1 topotests regularly fails at step 24. The test expects
that the BFD session between rt1 and rt2 comes down after shutting the
link between rt1 and rt2.

Since the BFD is multihop, the BFD can get back through rt3.

Set the BFD type to single-hop.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-11-21 13:48:51 +01:00
Donatas Abraitis
9a84cb612e tests: Check if we can override IPv6 next-hop for VPN networks in route-map
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-18 16:17:15 +02:00
Russ White
b7de3fe8a9
Merge pull request #12309 from proelbtn/bgpd-fix-mpls-vpn-advertisement
bgpd: fix invalid ipv4-vpn nexthop for IPv6 peer
2022-11-17 10:05:04 -05:00
Ryoga Saito
3db8aa8750 tests: Add topotest for l3vpn over ipv6 peer
To check the effect of the next patch, I added topotest.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2022-11-17 19:08:37 +09:00
Donatas Abraitis
4f770cf1d2 bgpd: Implement graceful-shutdown command per neighbor
We already have a global knob for graceful-shutdown, but it's handy having
per neighbor knob as well.

Especially when a single neighbor needs to be restarted/shutdown gracefuly.

We can do this route-maps, but this is a faster/cleaner way doing the same
for an operator.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-16 21:42:21 +02:00
Donatas Abraitis
84f784fafa
Merge pull request #12219 from cscarpitta/feature/srv6-usid-behavior-support
bgpd, zebra: Add support for SRv6 uSID Behaviors
2022-11-14 16:13:39 +02:00
Donatas Abraitis
12853c02c4
Merge pull request #11736 from kuldeepkash/pim_v6
[PIMv6] Add new scenarios to multicast static_rp suite
2022-11-09 17:56:32 +02:00
Carmine Scarpitta
c891f9ce0d tests: Add topotest for SRv6 uSID Locator
This test ensures that the command `behavior usid` works properly.

When the `behavior usid` command is set, a flag is added to the locator
to indicate that the locator is a uSID locator. This test verifies that
the locator works correctly when you set / unset the `behavior usid`
command.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-11-08 22:44:24 +01:00
Pushpasis Sarkar
5b86dc9f0f
Merge pull request #11594 from louis-6wind/lfa-netlink
isisd: apply fast-reroute as soon an interface or an adjacency falls down
2022-11-08 23:19:39 +05:30
Kuldeep Kashyap
3748e8d030 tests: Add pim6d marker to pytest.ini
Added pim6d marker to pytest.ini file,
to run tests pim6d marker based, if added
to scripts.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-11-07 02:19:23 -08:00
Kuldeep Kashyap
787e3da1d7 tests: [PIMv6] Add new scenarios to static_rp suite
Automated new scenarios to multicast pimv6
static rp test suite. Added new folder
multicast_pim6_static_rp_topo1 for pimv6
static_rp automation.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-11-07 02:19:23 -08:00
Kuldeep Kashyap
d7032129b0 tests: [PIMv6] F/W support for multicast pimv6 automation
Enhanced or added new libraries to support
multicast pimv6 automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-11-07 02:19:15 -08:00
Donald Sharp
a5e5c9a301 tests: Test Resilient NHG's are properly created in zebra
When a Resilient NHG is created, ensure that Zebra notes
that it is created and has it as well.

Signed-off-by: Donald Sharp <sharp@nvidia.com>
2022-11-04 13:34:27 -04:00
Donald Sharp
8966cca209 tests: Speedup test_all_protocol_startup.py by 55 seconds
Just make ospf and ospfv3 converge faster with faster
hello timers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-04 13:34:27 -04:00
Donatas Abraitis
87bc89bc87
Merge pull request #12169 from donaldsharp/zebra_meta_q_ordering
zebra: Fix handling of recursive routes when processing closely in time
2022-11-02 20:15:32 +02:00
Russ White
f4bf8f1494
Merge pull request #12159 from opensourcerouting/fix/conditional_advertisement_track_updates
bgpd: Notify BGP conditional advertisement thread when the peer goes down
2022-11-01 12:24:51 -04:00
Russ White
a5dac02901
Merge pull request #12114 from opensourcerouting/feature/bgp_aigp_attribute
bgpd: Implement AIGP
2022-10-31 11:24:43 -04:00
Russ White
854b0ce9ec
Merge pull request #12172 from LabNConsulting/working/lb/api-zero-len-del-flag
OSPF opaques LSA API - fix bug with LL API delete, add option for zero data length withdrawals
2022-10-29 10:38:27 -04:00
Olivier Dugeon
d36cd56638
Merge pull request #12154 from louis-6wind/fix-te-default-bandwidth
lib: fix the default TE bandwidth
2022-10-28 09:29:12 +02:00
Louis Scalbert
4b8daf6b81 tests: adapt cspf_topo1 to the default link-params bandwidth
Adapt cspf_topo1 to the default link-params bandwidth

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-27 18:23:50 +02:00
Louis Scalbert
8e0f875fd6 tests: adapt ospf_te_topo1 to the default link-params bandwidth
Adapt ospf_te_topo1 to the default link-params bandwidth

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-27 18:23:48 +02:00
Louis Scalbert
472a1e5aaa tests: adapt isis_te_topo1 to the default link-params bandwidth
adapt isis_te_topo1 to the default link-params bandwidth

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-27 18:23:29 +02:00
Jafar Al-Gharaibeh
cf2a2762b8
Merge pull request #12179 from LabNConsulting/working/lb/p2mp-improvements
ospf: optimization for FRR's P2MP mode
2022-10-26 22:46:10 -05:00
Donald Sharp
8d4665aabf zebra: Fix handling of recursive routes when processing closely in time
When zebra receives routes from upper level protocols it decodes the
zapi message and places the routes on the metaQ for processing.  Suppose
we have a route A that is already installed by some routing protocol.
And there is a route B that has a nexthop that will be recursively
resolved through A.  Imagine if a route replace operation for A is
going to happen from an upper level protocol at about the same time
the route B is going to be installed into zebra.  If these routes
are received, and decoded, at about the same time there exists a
chance that the metaQ will contain both of them at the same time.
If the order of installation is [ B, A ].  B will be resolved
correctly through A and installed, A will be processed and
re-installed into the FIB.  If the nexthops have changed for
A then the owner of B should be notified about the change( and B
can do the correct action here and decide to withdraw or re-install ).
Now imagine if the order of routes received for processing on the
metaQ is [ A, B ].  A will be received, processed and sent to the
dataplane for reinstall.  B will then be pulled off the metaQ and
fail the install since A is in a `not Installed` state.

Let's loosen the restriction in nexthop resolution for B such
that if the route we are dependent on is a route replace operation
allow the resolution to suceed.  This requires zebra to track a new
route state( ROUTE_ENTRY_ROUTE_REPLACING ) that can be looked at
during nexthop resolution.  I believe this is ok because A is
a route replace operation, which could result in this:
-route install failed, in which case B should be nht'ing and
will receive the nht failure and the upper level protocol should
remove B.
-route install succeeded, no nexthop changes.  In this case
allowing the resolution for B is ok, NHT will not notify the upper
level protocol so no action is needed.
-route install succeeded, nexthops changes.  In this case
allowing the resolution for B is ok, NHT will notify the upper
level protocol and it can decide to reinstall B or not based
upon it's own algorithm.

This set of events was found by the bgp_distance_change topotest(s).
Effectively the tests were looking for the bug ( A, B order in the metaQ )
as the `correct` state.  When under very heavy load, the A, B ordering
caused A to just be installed and fully resolved in the dataplane before
B is gotten to( which is entirely possible ).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-26 15:06:23 -04:00
Donatas Abraitis
97a52c82a5 bgpd: Implement Accumulated IGP Metric Attribute for BGP
https://www.rfc-editor.org/rfc/rfc7311.html

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-10-26 11:26:57 +03:00
Lou Berger
675ba67d89 topotests: test_ospf_p2mp.py - check for full adjacencies and basic DB info
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-25 15:31:40 +00:00
Wayne Morrison
eaeba5e868 bgpd: fixed misaligned columns in BGP routes table
Column headers in BGP routes table are not aligned with data when
RPKI status is available.  This was fixed to insert a space at the
beginning of the header and at the beginning of lines that do not
have RPKI status.

This fix requires that several testing templates be adjusted to
match the new output.

Signed-off-by: Wayne Morrison <wmorrison@netgate.com>
2022-10-25 10:45:35 -04:00
Donatas Abraitis
695f387ed8
Merge pull request #11673 from cscarpitta/srv6-per-vrf-sid
bgpd: add support for SRv6 L3VPN for IPv4 and IPv6 address families using a single SID
2022-10-24 17:30:10 +03:00
Louis Scalbert
1d5185eccb topotests: isis-lfa add a switchover test after BFD down
Add a switchover test that consists in:
- Setting up ISIS BFD between rt1 and rt2
- The no link-detect setting on rt1 eth-rt2 is still present so that
  zebra does not take account linkdown events on this interface.
- Shutting down rt1 eth-rt2 from the switch side
- Wait for BFD to comes down

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 14:56:42 +02:00