Commit Graph

3558 Commits

Author SHA1 Message Date
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
Donald Sharp
841d50e82f tests: Add ability to run a fpm listener
Add the ability to run a fpm listener to the testing
system.  This is nothing more just allowing the test
system to bring it up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -05:00
Louis Scalbert
9208e16e25 topotests: apply black on bmp collector
Apply black on bmp collector

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-29 16:55:02 +01:00
Louis Scalbert
a5da98ae1a topotests: bgp_bmp, test presence of labels
Test the presence of labels in BMP

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-29 16:55:02 +01:00
Louis Scalbert
0c7beb31d4 topotests: bgp_bmp, log bmp into tgen logdir
Log BMP into tgen logdir to facilitate the debug.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-29 16:55:02 +01:00
Louis Scalbert
55586065c8 topotests: bgp_bmp, add vpn tests
Test vpn prefixes sending to BMP

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-29 16:55:02 +01:00
Louis Scalbert
8d3546f669 topotests: bgp_bmp, use test ip range
Use standard test ip range in bgp_bmp topotest

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-29 16:55:02 +01:00
Donatas Abraitis
c357942069
Merge pull request #14775 from adrianomarto/test_ospfd_single_switch2
tests: multiple OSPF routers connected to a single switch
2024-02-29 10:36:54 +02:00
Donatas Abraitis
df98e88368
Merge pull request #15368 from louis-6wind/fix-6pe
bgpd: fix 6vpe nexthop
2024-02-28 11:34:43 +02:00
Russ White
c4f9b874b7
Merge pull request #14810 from dmytroshytyi-6WIND/srv6_bgp_sid_reachability
SRv6 BGP SID reachability
2024-02-27 10:32:14 -05:00
Russ White
879ca714ed
Merge pull request #15273 from opensourcerouting/feature/paths_limit_capability
bgpd: Implement Paths-Limit capability
2024-02-27 10:24:05 -05:00
Francois Dumontet
324fa21015 tests: extend tests for aspath exclude
adding a tests about:
"no bgp as-path access-list" command.

the folloxing "clear bgp *" command leads to the
crash exhibited above.

a sleep had been added to capture the crash befor the end of scenario.

50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f5f05cbb9c0 (LWP 1371086))]
(gdb) bt
    context=0x7ffcf2c216c0) at lib/sigevent.c:248
    acl_list=0x55c976ec03c0) at bgpd/bgp_aspath.c:1688
    dummy=0x7ffcf2c22340, object=0x7ffcf2c21e70) at bgpd/bgp_routemap.c:2401
    match_object=0x7ffcf2c21e70, set_object=0x7ffcf2c21e70, pref=0x0)
    at lib/routemap.c:2687
    attr=0x7ffcf2c220b0, afi=AFI_IP, safi=SAFI_UNICAST, rmap_name=0x0, label=0x0,
    num_labels=0, dest=0x55c976ebeaf0) at bgpd/bgp_route.c:1807
    addpath_id=0, attr=0x7ffcf2c22450, afi=AFI_IP, safi=SAFI_UNICAST, type=10,
    sub_type=0, prd=0x0, label=0x0, num_labels=0, soft_reconfig=0, evpn=0x0)
    at bgpd/bgp_route.c:4424
    packet=0x7ffcf2c22410) at bgpd/bgp_route.c:6266
    packet=0x7ffcf2c22410, mp_withdraw=false) at bgpd/bgp_packet.c:341
    peer=0x55c976e89ed0, size=43) at bgpd/bgp_packet.c:2414
    at bgpd/bgp_packet.c:3899

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-02-26 14:58:54 +01:00
Philippe Guibert
4d7df91752 topotests: add an ebgp 6vpe test
This test uses the connected ipv4 mapped ipv6 prefix
to resolve the received BGP routes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: François Dumontet <francois.dumontet@6wind.com>
2024-02-26 10:16:58 +01:00
Christian Hopps
e5acf6797c tests: add test for required choice/np-container callbacks
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-25 13:48:57 +02:00
Christian Hopps
a37f5f9153 tests: add test for northbound ordering fix
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-25 13:48:57 +02:00
Donald Sharp
eae228c52d
Merge pull request #15405 from LabNConsulting/chopps/fix-fe-client
tests: use more standard name for python3
2024-02-23 09:47:46 -05:00
Donatas Abraitis
3b8c98916a
Merge pull request #15406 from donaldsharp/evpn_mh_fix
tests: bgp_evpn_mh timing issue fix
2024-02-23 10:04:50 +02:00
Donatas Abraitis
5833261e77
Merge pull request #15383 from donaldsharp/cpp_evpn_data
zebra: Remove deprecated items
2024-02-23 09:49:15 +02:00
Donald Sharp
e7f2e2c78c tests: bgp_evpn_mh timing issue fix
This test is failing locally for me 100% of the time
since zebra was converted to mgmtd usage.  The failed
command is:

torm11# show evpn mac vni 1000 mac 00:00:00:00:00:11 json
{
  "00:00:00:00:00:11":{
    "type":"auto",
    "uptime":"00:02:01",
    "localSequence":0,
    "remoteSequence":0,
    "detectionCount":0,
    "isDuplicate":false,
    "syncNeighCount":0,
    "neighbors":{
      "active":[
      ],
      "inactive":[
        "45.0.0.11"
      ]
    }
  }
}

The test is expecting an esi as a key in the output.  Re-arranging
the startup of the tor's before the hosts fixes the issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-21 18:12:00 -05:00
Christian Hopps
06be54630c tests: use more standard name for python3
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-21 08:05:31 -05:00
Igor Ryzhov
af8c6b5b56 zebra: implement zif-type oper state leaf
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-20 18:06:49 +02:00
Russ White
8dbfc57ec6
Merge pull request #15377 from opensourcerouting/fix/bgpd_evpn_route_map
lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed
2024-02-20 10:17:46 -05:00
Russ White
ab40199f00
Merge pull request #15351 from louis-6wind/fix-leak-vrf-interface
bgpd: update route leak after vrf interface changes
2024-02-20 10:14:20 -05:00
Donald Sharp
c38ef653f3 zebra: Remove deprecated items
Both zebra_evpn.c and zebra_vxlan.c have items that
were deprecated a year ago.  Let's remove them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-20 07:21:08 -05:00
Igor Ryzhov
5332e447d9
Merge pull request #15381 from LabNConsulting/chopps/nb-notif
lib: mgmtd: add xpath arg to YANG notification message
2024-02-19 16:52:47 +02:00
Christian Hopps
4a93d171c2 lib: mgmtd: add xpath arg to notification message
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-18 18:53:37 -05:00
Igor Ryzhov
829443fd83 tests: fix ospf_suppress_fa timing issue
Set static router-id for OSPF, because otherwise it depends on timing of
router-id updates received from zebra and may differ between test runs.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-15 15:38:26 +02:00
Donatas Abraitis
049a2c0c0a tests: Check if multiple route-map match clauses works for EVPN prefixes
Test prefix-list matching and some other EVPN stuff.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-15 12:19:43 +02:00
Louis Scalbert
1262ee66ad tests: check route leak update after vrf creation and deletion
Ensure that a locally leaked route is updated after a VRF (dis)appears.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:39:51 +01:00
Louis Scalbert
5709e89f6c tests: check route leak after changing vrf state
Check that local route leaks are set to "inactive" when the VRF
interface is shutdown and, conversely, that they are set to "active"
when the VRF interface is unshut.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:39:51 +01:00
Louis Scalbert
c102adde30 tests: use check_ping in bgp_vrf_route_leak_basic
Use check_ping in bgp_vrf_route_leak_basic

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:39:10 +01:00
Louis Scalbert
71e74df14e tests: add source_addr in check_ping
Allow specifying a source_addr in check_ping library function.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:38:58 +01:00
Louis Scalbert
8b5f6ac982 tests: fix duplicates in bgp_vrf_route_leak_basic
Test functions were duplicated by mistakes. They were identical.

Fixes: 8af61c8a34 ("topotests: test leak from the default vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-14 16:21:35 +01:00
Donald Sharp
9fd7bf4cbb
Merge pull request #15234 from opensourcerouting/snmp-topotest-fixes
topotests: fix snmptrap log OID parsing
2024-02-13 10:59:30 -05:00
Donatas Abraitis
cd7851d99e tests: Check if Paths-Limit capability works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-13 17:06:04 +02:00
Russ White
17a0a625f0
Merge pull request #15284 from opensourcerouting/feature/bgpd_announce_rpki_state_knob
bgpd: Add neighbor X send-community extended rpki command
2024-02-13 09:35:10 -05:00
Christian Hopps
7b94a923ae
Merge pull request #15042 from Orange-OpenSource/ospf-te
ospfd: Add Opaque LSA decoder for json output
2024-02-13 05:37:29 -05:00
Donatas Abraitis
26faf341ef
Merge pull request #15352 from louis-6wind/fix-leak-recursive
bgpd: fix route recursion on leaked routes
2024-02-12 21:42:03 +02:00
Olivier Dugeon
b46a1fe826 tests: adapt ospfapiclient test to new json output
Following new json decoder for Opaque LSA, this patch adapts the ospfapiclient
test to the new json output.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2024-02-12 17:52:00 +01:00
Christian Hopps
8d6e7a350f tests: fix grpc test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-12 07:48:50 -05:00
Igor Ryzhov
d94f80fbc4 lib, mgmtd: fix processing of yang notifications
Current code assumes that notification is always sent in stripped JSON
format and therefore notification xpath starts at the third symbol of
notification data. Assuming JSON is more or less fine, because this
representation is internal to FRR, but the assumption about the xpath is
wrong, because it won't work for not top-level notifications. YANG
allows to define notification as a child for some data node deep into
the tree and in this case notification data contains not only the
notification node itself, but also all its parents.

To fix the issue, parse the notification data and get its xpath from its
schema node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-10 01:00:24 +02:00
Louis Scalbert
1a348ec050 tests: check route recursion on leaked routes
Check that leaks of a route with a recursive nexthop is possible.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-09 18:25:01 +01:00
Donald Sharp
c70af155d2
Merge pull request #15285 from idryzhov/staticd-nexthop-refcounter
staticd: fix nexthop tracking memory leak and add a topotest for VRFs
2024-02-08 15:53:30 -05:00
Donald Sharp
afa07a7f3a
Merge pull request #15255 from louis-6wind/bgp-leak-interface
bgpd: fix interface of routes leaked from another VRF
2024-02-08 11:18:58 -05:00
Donatas Abraitis
f6463dab85 tests: Test if RPKI extended community can be disabled between peers
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-07 22:35:21 +02:00
David Schweizer
1bd96365e4
tests: Reduce wait intervals in test_bgp_snmp_bgp4v2mib
Remove sleep time in test_bgp_snmp_bgp4v2mib before run_and_expect and
reduce wait intervals for faster test convergence.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2024-02-07 13:56:10 +01:00
David Schweizer
961667e34f
topotests: fix snmptrap log OID parsing
Replace OID string parsing of snmptrap log files based on odd/even line
numbers with regex string search to prevent test failures in cases where
log entries don't match assumed order.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2024-02-07 13:56:09 +01:00
Igor Ryzhov
763ce7bb37 tests: add topotest for static routes in VRF
Test how staticd handles VRF creation/deletion.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-06 14:15:37 +02:00
Donatas Abraitis
8629700bc8
Merge pull request #15192 from fdumontet6WIND/capa_nego
bgpd: add [no]neighbor capability fqdn
2024-02-03 12:19:53 +02:00
Francois Dumontet
220c0635a8 tests: improve topotest bgp_dont_capability_negotiate
add some steps for testing of add [no]neighbor capability fqdn
command support.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-02-02 11:31:47 +01:00
Francois Dumontet
e146ea53ef bgpd: add [no]neighbor capability fqdn command
cisco routers are not dealing fairly whith unsupported capabilities.
When a cisco router receive an unsupported capabilities it reset the
negociation without notifying the unmatching capability as described in
RFC2842.
Cisco suggest the use of
neighbor x.x.x.x capability fqdn
to avoid the use of fqdn in open message.

this new command is to remove the use of fqdn capability in the
open message with the peer "x.x.x.x".

Link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/116189-problemsolution-technology-00.pdf

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-02-02 11:31:47 +01:00
Igor Ryzhov
cb781f6097 staticd: fix NB dependency hack
Currently, staticd configuration is tightly coupled with VRF existence.
Because of that, it has to use a hack in NB infrastructure to create a
VRF configuration when at least one static route is configured for this
VRF. This hack is incompatible with mgmtd, because mgmtd doesn't execute
configuration callbacks. Because of that, the configuration may become
out of sync between mgmtd and staticd. There are two main cases:

1. Create static route in a VRF. The VRF data node will be created
   automatically in staticd by the NB hack, but not in mgmtd.
2. Delete VRF which has some static routes configured. The static route
   configuration will be deleted from staticd by the NB hack, but not
   from mgmtd.

To fix the problem, decouple configuration of static routes from VRF
configuration. Now it is possible to configure static routes even if the
VRF doesn't exist yet. Once the VRF is created, staticd applies all the
preconfigured routes.

This change also fixes the problem with static routes being preserved in
the system when staticd "control-plane-protocol" container is deleted
but the VRF is still configured.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-02 00:57:59 +02:00
Louis Scalbert
8af61c8a34 topotests: test leak from the default vrf
Add tests in bgp_vrf_route_leak_basic topotest to check that route
leaking from the default VRF results in an operational route.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 11:46:56 +01:00
Christian Hopps
7521918454 tests: add mgmtd backend notification test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-01 05:37:59 -05:00