Commit Graph

35139 Commits

Author SHA1 Message Date
Russ White
018fad7806
Merge pull request #15450 from opensourcerouting/fix/coverity
bgpd: Check if attributes exists for the path before checking mp_nexthop_len
2024-03-05 08:43:28 -05:00
Igor Ryzhov
8287fbe453 lib: fix apply_finish callback in northbound
When a node is top-level, we shouldn't stop the whole processing, we
should just skip this single node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-05 15:30:37 +02:00
Donatas Abraitis
fa5acd5a16
Merge pull request #15476 from donaldsharp/dplane_thread_issue_i_believe
zebra: fnc->obuf could be accessed without a lock
2024-03-05 14:53:41 +02:00
Martin Winter
a44918640f
Merge pull request #15369 from donaldsharp/fpm_stub_addition
Add ability to test dplane_fpm_nl.c file
2024-03-05 13:06:42 +01:00
Donatas Abraitis
e993ba1812 doc: Fix one spelling dissallowed to disallowed
Closes: https://github.com/FRRouting/frr/issues/15465

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-05 08:57:39 +02:00
Christian Hopps
21aa86319c
Merge pull request #15470 from idryzhov/fix-darr-vsprintf
lib: fix __darr_in_vsprintf
2024-03-04 22:45:02 -05: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
Christian Hopps
4caffbda8e lib: add keychain northbound support
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-04 20:00:15 -05:00
Igor Ryzhov
cb6032d6b3 lib: fix infinite loop in __darr_in_vsprintf
`darr_avail` returns the available capacity excluding the already
existing terminating NULL byte. Take this into account when using
`darr_avail`. Otherwise, if the error length is a power of 2, the
capacity is never enough and the function stucks in an infinite loop.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-05 02:08:30 +02:00
Donald Sharp
e7a1fbbcf6 zebra: fnc->obuf could be accessed without a lock
Found by coverity.  Let's just lock the writeable
amount to see if it is possible.  It's ok because
we want to know if we have room *now*.  If another
pthread runs it will only remove data from fnc->obuf
and make more room.  So this is ok.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 18:08:06 -05:00
Donald Sharp
0beabd76e5 debian: Add a frr-test-tools debian package
This package will hold test tools that are built and useful for
developers of FRR but not useful for everyday usage of FRR.  This
is separted out because these are useful enough to have in their
own package.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -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
Donald Sharp
a0c4fe2ca6 doc: Add show fpm status [json] command to documentation
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -05:00
Donald Sharp
0a9e8ef491 zebra: Add show fpm status [json] command
Add a command to get the status of the dplane_fpm_nl
module.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -05:00
Donald Sharp
fef93e6149 zebra: Add fpm_listener
Add a tiny fpm_listener program to allow FRR to test the
fpm.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:06:35 -05:00
Donald Sharp
852a74807f doc, tools: Remove ARRAY_SIZE check
checkpatch.pl wants you to use ARRAY_SIZE in a kernel
header file.  We don't have access to this kernel header
file for normal compilation.  I'm just going to remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04 11:03:46 -05:00
Donatas Abraitis
c256a9a40a
Merge pull request #15467 from donaldsharp/bgp_best_selection_cleanup
Bgp best selection cleanup
2024-03-04 13:35:35 +02:00
Igor Ryzhov
ee0c1cc1e4 lib: fix __darr_in_vsprintf
If the initial darr capacity is not enough for the output, the `ap` is
reused multiple times, which is wrong, because it may be altered by
`vsnprintf`. Make a copy of `ap` each time instead of reusing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-04 02:24:26 +02:00
Christian Hopps
29dba445b4 lib: add automatic xpath-based completion
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-03 17:59:36 -05:00
Christian Hopps
3fa5a77def yang: modify standard model
We need to operate w/o cryptographic algorithm during key creation
due to how our legacy CLI works (each command issuing a single YANG
modification).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-03 17:59:36 -05:00
Donatas Abraitis
9feb1aab76
Merge pull request #15448 from louis-6wind/bmp-labels
bgpd: export labels into BMP
2024-03-03 20:21:17 +02:00
Donald Sharp
0186c94ce6
Merge pull request #15458 from opensourcerouting/fix/bgpd_send_hold_timer_expired_notification_code
bgpd: Send "Send Hold Timer Expired" on such events notification
2024-03-02 21:21:08 -05:00
Donald Sharp
0a8dfbec45 bgpd: Simplify for loop
This for loop has no chance of removing entries so there is no
need to do a bit of complicated code to handle the case where
an entry can be removed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-02 21:05:46 -05:00
Donald Sharp
f9c86734e5 bgpd: Allow string creation to handle NULL case
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-02 21:05:46 -05:00
Donald Sharp
4d307c9914 bgpd: Both possible paths unset a flag, so reduce
Both paths through the code unset a flag, so reduce the
duplication.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-02 21:05:46 -05:00
Donald Sharp
b56758dae8 bgpd: Testing for valid pointer is done by for loop
No need to test for valid pointer as that the for loop will
do so as well.  This reduces indentation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-02 21:05:46 -05:00
Igor Ryzhov
1d67a6e0bf
Merge pull request #15461 from vjardin/ifdef_warning
fix warning if ripngd disabled
2024-03-01 23:12:03 +02:00
Christian Hopps
0f6538263d yang: Add initial model and generated code.
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-01 13:12:23 -05:00
Vincent JARDIN
717b3350bb mgmtd: fix warning if ripngd disabled
./configure [...] --disable-ripngd

could lead to:

mgmtd/mgmt_vty.c:614:5: warning: "HAVE_RIPNGD" is not defined, evaluates to 0 [-Wundef]
  614 | #if HAVE_RIPNGD
      |     ^~~~~~~~~~~

Signed-off-by: Vincent Jardin <vjardin@free.fr>
2024-03-01 17:36:15 +01:00
Mark Stapp
e3bc6e39e4
Merge pull request #15449 from sri-mohan1/srib-24-zebra
zebra: changes for code maintainability
2024-03-01 09:22:40 -05:00
Alexander Rose
561ad925e9 ospfd: Send update for route with new metric
When an AS-external-route is deleted on our system and later added again
with a new metric, then the ospfd would first send a LS-update to remove
the old route and later another LS-update to add the route with the new
metric again.
But when this metric-change happens with no time inbetween the ospfd
recognizes this as the same route and does not send any LS-update.
With the change made here, the ospfd will interpret this route as a
different route, when the metric has changed.

Signed-off-by: Alexander Rose <alexander.rose@secunet.com>
2024-03-01 13:10:43 +01: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
Farid Mihoub
d9ce12cd3f bgpd: add labeled vpn bmp monitoring support
Support BMP monitoring for the BGP labeled VPN prefixes.

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
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
4967bf6d72 bgpd: Send "Send Hold Timer Expired" on such events notification
This is required by the current (latest/-02 draft).

IANA has registered code 8 for "Send Hold Timer Expired" in the "BGP
Error (Notification) Codes" sub-registry under the "Border Gateway
Protocol (BGP) Parameters" registry.

https://datatracker.ietf.org/doc/html/draft-ietf-idr-bgp-sendholdtimer

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-29 15:37:53 +02: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
36ae7f331a
Merge pull request #14898 from chiragshah6/mdev
tools: fix frr-reload for nbr deletion
2024-02-29 09:26:13 +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
Donatas Abraitis
b652119235
Merge pull request #15446 from mjstapp/fix_config_typo
tools: fix typo in configure script
2024-02-28 11:34:06 +02:00
Donatas Abraitis
8c69979013
Merge pull request #15447 from louis-6wind/bmp-safi
bmp: fix vty_out for monitor afi loc-rib
2024-02-28 11:33:35 +02:00
sri-mohan1
966d276ec6 zebra: changes for code maintainability
these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-02-28 13:24:17 +05:30
Donatas Abraitis
3f7ed2c99c bgpd: Check if attributes exists for the path before checking mp_nexthop_len
CID: 1583901

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-28 08:26:25 +02:00
Farid Mihoub
3104d482e9 bmp: fix vty_out for monitor afi loc-rib
"show run" displays BMP monitor AFI in upper case.

> bmp targets bmp1
>  bmp monitor IPv4 unicast loc-rib

Display it in lower case.

> bmp targets bmp1
>  bmp monitor ipv4 unicast loc-rib

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-27 19:12:19 +01:00
Mark Stapp
ce74e20a57 tools: fix typo in configure script
Fix a small typo nit in the configure script.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-02-27 12:36:38 -05:00
Russ White
0f3923d821
Merge pull request #13721 from pguibert6WIND/route_target_wrong_display
bgpd: fix route-target display with as dotted format
2024-02-27 12:01:45 -05:00