Commit graph

34103 commits

Author SHA1 Message Date
Christian Hopps 8790457c46 lib: add simplified native msg support
This is intended to replace protobuf use in mgmtd.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-26 08:34:56 -05:00
Quentin Young 080299fe10
Merge pull request #15063 from idryzhov/dev-doc-graphviz
doc: add graphiz dependency for dev docs
2023-12-23 22:50:23 -05:00
Igor Ryzhov c3c5431da2
Merge pull request #15053 from opensourcerouting/fix/drop_ipv6_address_configured
zebra: Drop ipv6_address_configured() function
2023-12-22 22:13:32 +02:00
Igor Ryzhov 4907ce966b doc: add graphiz dependency for dev docs
There's a graph in cli.rst that needs graphviz to be built.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-12-22 16:08:43 +02:00
Donatas Abraitis eba1c1e23b
Merge pull request #15059 from donaldsharp/generate_support_bundle_on_test_failure
Generate support bundle on test failure
2023-12-22 09:32:32 +02:00
Donatas Abraitis 1225954fb6
Merge pull request #15060 from donaldsharp/keychain_free_no_i_really_mean_it
lib: Keychain.c was using free
2023-12-22 09:31:21 +02:00
Donald Sharp 09fbf2e56d lib: Keychain.c was using free
This is a bit of a bummer that this slipped through
for so long.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-21 17:01:56 -05:00
Donald Sharp daa80a5afa tools: Add some more data to support bundles
The ipv[4|6] vpn tables in bgp were not being
gathered.  This would be useful for some situations

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-21 10:26:47 -05:00
Donald Sharp 1aa6c5ec23 tests: Stop some warning messages on test runs
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-21 10:24:23 -05:00
Donald Sharp 7477d8732f tests: Auto generate support bundle when a test fails
Tests can fail, let's be proactive and gather up a support
bundle when they fail.  It will help diagnose the problem
to some extent.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-21 10:22:22 -05:00
Donatas Abraitis 1332be595e zebra: Drop ipv6_address_configured() function
Not used.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-21 15:25:27 +02:00
Russ White bbda45a825
Merge pull request #15047 from LabNConsulting/aceelindem/fix-opaque-functab-leak
ospfd: Fix opaque functab memory leak and opaque AS External LSA cleanup problems
2023-12-20 15:42:25 -05:00
Acee dec87faab6 ospfd: Fix opaque functab leak and opaque AS cleanup problems
1. Fix ospf opaque LSA function table memory leak.
   2. Remove incorrect one-to-one association of OSPF info-per-type
      to function table (since there many be many).
   3. Fix a problem with opaque AS external cleanup that was exposed
      by #2.
   4. Fix LSA memory leak in ospf_opaque_type9_lsa_if_cleanup().

Signed-off-by: Acee <aceelindem@gmail.com>
2023-12-20 09:43:51 -05:00
Russ White b6cb72fccd
Merge pull request #15046 from FRRouting/revert-15002-bgp_evpn_label_no_delete
Revert "bgpd: When receiving a label, store it"
2023-12-19 11:42:04 -05:00
Donald Sharp d1b3f070b1
Revert "bgpd: When receiving a label, store it" 2023-12-19 11:40:24 -05:00
Russ White a3388fa6b1
Merge pull request #15002 from donaldsharp/bgp_evpn_label_no_delete
bgpd: When receiving a label, store it
2023-12-19 11:34:04 -05:00
Donald Sharp 066f379ffd
Merge pull request #15022 from opensourcerouting/fix/change_to_log.error
tools: Use error log level when failing to execute commands via frr-reload.py
2023-12-18 08:58:09 -05:00
Donald Sharp 490928b6d4
Merge pull request #15036 from opensourcerouting/fix/use_constants_for_addpath_cap_length
bgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value
2023-12-18 08:54:39 -05:00
Donald Sharp b3e5ee5e44
Merge pull request #15037 from opensourcerouting/fix/validate_send_receive_flags
bgpd: Validate Addpath capability flags per AF
2023-12-18 08:54:22 -05:00
Donatas Abraitis 24ecc73274
Merge pull request #15032 from leonshaw/fix/bgp-default-withdraw
bgpd: "default-originate" shouldn't withdraw non-default routes
2023-12-18 12:39:51 +02:00
Xiao Liang 4538247c99 tests: Check for 0.0.0.0/1 in bgp_default_route
Ensure that 0.0.0.0/1 route can be advertised along with
default-originate.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
2023-12-18 15:14:33 +08:00
Donatas Abraitis 0f05e56bed bgpd: Validate Addpath capability flags per AF
Send/Receive:
         This field indicates whether the sender is (a) able to receive
         multiple paths from its peer (value 1), (b) able to send
         multiple paths to its peer (value 2), or (c) both (value 3) for
         the <AFI, SAFI>.

         If any other value is received, then the capability SHOULD be
         treated as not understood and ignored [RFC5492].

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-17 21:25:51 +02:00
Donatas Abraitis e09b5afb9d
Merge pull request #15035 from donaldsharp/more_frr_memory_leaks_on_shutdown
More frr memory leaks on shutdown
2023-12-17 12:04:47 +02:00
Donatas Abraitis 66c78c6c58 bgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-17 12:03:36 +02:00
Donald Sharp e700069534 nhrpd: Cleanup a hash on nhrp shutdown
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-16 09:29:00 -05:00
Donald Sharp f38687b8f5 lib, bgpd, nhrpd: Cleanup memory in lib/resolver on shutdown
This memory was not being cleaned up on shutdown.  Fix this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-16 09:18:41 -05:00
Xiao Liang 4d74ba929d bgpd: "default-originate" shouldn't withdraw non-default routes
Prevent "default-originate" from withdrawing non-default routes like
0.0.0.0/1 by checking prefix length.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
2023-12-15 18:27:39 +08:00
Donatas Abraitis a912f8fab7
Merge pull request #15015 from donaldsharp/test_ospf_suppress_fa_cleanup
tests: ospf_suppress_fa sleeps, convert to run_and_expect
2023-12-15 07:01:27 +02:00
Donald Sharp db4bdf7a3a
Merge pull request #15023 from opensourcerouting/fix/drop_redundant_vrf_name
bgpd: Drop redundant VRF name printing for `show bgp summary`
2023-12-14 20:26:52 -05:00
Mark Stapp 594be7d922
Merge pull request #15025 from donaldsharp/dplane_fpm_nl_wedgied
zebra: Prevent possible wedged fpm write
2023-12-14 16:52:59 -05:00
Donald Sharp 68edff198e
Merge pull request #15026 from Orange-OpenSource/ospf-te
ospfd: Correct LSA parser which fulfill the TED
2023-12-14 16:16:34 -05:00
Olivier Dugeon 55ad785753 tests: Update OSPF TE topotests
The OSPF TE topotest is using switches to interconnect router. During the test,
interfaces are shutdown on some routers to simulate link failure and check that
the TED is correctly updated. However, the switche between router avoid the
detection by the neighbor router that the interface is down i.e. the interface
line remains up as it is conneted to the switch and not to the router.

This patch update the tested topology by removing the switch and connect
directly the router excepted the inter AS link on R3. Interface are also
renamed accordingly.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2023-12-14 18:39:16 +01:00
Olivier Dugeon a3230323f7 ospfd: Correct LSA parser which fulfill the TED
Traffic Engineering Database (TED) is fulfill from the various LSA advertised
and received by the router. To remove information on the TED, 2 mechanisms are
used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of
prefixes advertised in the Router LSA with the list of corresponding edges and
subnets contained in the TED. However, this second mechanism assumes that the
Router LSA is unique and contains all prefixes of the advertised router.
But, this is wrong. Prefixes could be advertised with several Router LSA.
This conduct to remove edge and subnet in the TED while it should be maintained.
The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy
loaded.

This simple patch removed deletion of edges and subnets when parsing the Router
LSA and only removed them when the corresponding TE Opaque LSA is flushed. In
addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This
patch also correct this second problem.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2023-12-14 18:39:16 +01:00
Donald Sharp 48df84a044 tests: ospf_suppress_fa sleeps, convert to run_and_expect
The test_ospf_suppres_fa.py script is using straight
up sleeps before testing that the next step worked properly.
On a unloaded test system this will work 100% of the time
on a loaded test system this will have random failures.
Convert the test to use run_and_expect and give each
section of the test 30 seconds to get to the next state
appropriately instead of 10.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-14 10:42:45 -05:00
Donald Sharp 61af06c813 zebra: Use event_add_event instead of _timer
The t_dequeue was being enqueued with a timer of 0
this is really an event instead of a timer.  Let's
use that instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-14 09:14:00 -05:00
Donald Sharp 3209ca4b08 zebra: Prevent possible wedged fpm write
An operator is reporting that the dplane_fpm_nl connection has
started to accumulate contexts.  One such path that could cause
this is that the obuf used is full and stays full.  This would
imply that what ever is on the receiving end has gotten wedged
and is not reading from the stream of data being sent it's way.
If after 15 seconds of no response, let's declare the connection
dead and reset it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-14 09:12:46 -05:00
Martin Winter 0d57a9a954
Merge pull request #14890 from louis-6wind/exabgp4
topotests: convert to exabgp 4 and python3
2023-12-14 05:46:24 -08:00
Donatas Abraitis f68154184c doc: Update examples of show bgp summary
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-14 15:14:40 +02:00
Donatas Abraitis f97abbdc69 tests: Adopt topotests for show bgp summary non-JSON output
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-14 15:09:39 +02:00
Louis Scalbert 73ce39c443 topotests: tmp fix delay in bgp_peer_type_multipath_relax
Workaround an issue in bgp_peer_type_multipath_relax.

Link: https://github.com/FRRouting/frr/issues/14895
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 11:39:32 +01:00
Louis Scalbert 3dc8b2c1f5 doc: update for exabgp 4
Update the documentation to require exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 11:39:24 +01:00
Louis Scalbert aee4afcc10 docker: update ubuntu template for exabgp 4
Update ubuntu template for exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 11:38:39 +01:00
Louis Scalbert a54d18cb1c topotests: remove python2 support
Remove python2 support

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert 5d1d44d18a topotests: convert bgp_ecmp_topo1 to python3
Convert bgp_ecmp_topo1 to python3

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert 75a849fc0d topotests: convert exabgp scripts to python3
Convert exabgp scripts to python3

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert 5383945609 topotests: cleanup bgp_peer_type_multipath_relax
Cleanup bgp_peer_type_multipath_relax to make it more readable.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert da8333d9bb topotests: convert bgp_peer_type_multipath_relax to exabgp 4
Convert bgp_peer_type_multipath_relax to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert 5533f18dc6 topotests: convert bgp_prefix_sid2 to exabgp 4
Convert bgp_prefix_sid2 to exabgp 4

Do not advertise prefixes to exabgp to avoid an issue where exabgp
resets the bgp session with the following notification:

> invalid ipv6 mpls-vpn next-hop length 48 expected 24 or 40

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert 811ad11a7e topotests: convert bgp_prefix_sid to exabgp 4
Convert bgp_prefix_sid to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00
Louis Scalbert cfcad6fd99 topotests: convert bgp_vrf_netns to exabgp 4
Convert bgp_vrf_netns to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:30 +01:00