Commit Graph

38290 Commits

Author SHA1 Message Date
Christian Hopps
94f70c2100 lib: mgmt_be_client handles datastore notification using CBs
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-18 16:13:54 +00:00
Christian Hopps
2375a11b08 lib: yang: add yang_parse_data function
This is similar to notify and RPC parsers, but this is for normal datastore
data. This is initially used in handling datastore notifications being sent to
another backend client[s].

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-18 16:13:53 +00:00
Donatas Abraitis
13838a87cf
Merge pull request #17880 from LabNConsulting/chopps/ci-arm
tests: ci: add ARM to docker based CI test
2025-01-18 14:58:55 +02:00
Yuqing Zhao
f56a77359b doc: Add support for SRv6 static sid CLI
Add the srv6 static sids configuration and
show running-config sections in static.rst.

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
2a50c7526a tests: Add topotest for SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
52c4028195 vtysh: Add SRv6 static SIDs CLI to vtysh
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
2d23207290 staticd: Add CLIs to show SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
69a49c7359 staticd: Add CLI for SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
4d958078b8 lib: Add CLI node for SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
07ba1cd8b8 staticd: Add Northbound APIs for SRv6
Add Northbound APIs to create/modify/destroy an SRv6 SID

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
73fdae9bea staticd: Initialize/cleanup SRv6
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
33615773c4 staticd: Install SIDs when a dependent interface goes up/down
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
e80f24df7e staticd: Request/Release SIDs to SID Manager
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
7aefc15f64 lib, isisd: Move DEFAULT_SRV6_IFNAME to global srv6.h header
This commit moves DEFAULT_SRV6_IFNAME from isis_srv6.h to srv6.h
because there are other daemons that might want to use it (e.g. staticd).

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
807d90050d staticd: Add infrastructure for SRv6
This commit adds datastructures and helper functions required to support SRv6 in staticd.

* List of locators
* List of SIDs
* Data structure to represent an SRv6 SID
* Functions to allocate/deallocate an SRv6 SID
* Functions to allocate, deallocate and lookup a locator
* Function to initialize/Cleanup SRv6

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
2025a0c617 lib: Add a function to print SRv6 Endpoint Behavior Codepoints
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
57031d43ce staticd: Add debug option for SRv6
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao
f792a215cd yang: Add SRv6 to frr-staticd YANG model
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Christian Hopps
b9b608792d tests: ci: add ARM to docker based CI test
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-18 01:59:47 +00:00
Donatas Abraitis
1d6925e02f bgpd: Show internal data for BGP routes
Sometimes it's very useful to compare pointers from the gdb (and/or from the
logs) or just do some quick adhoc analysis.

```
donatas# sh ip bgp 1.1.1.0/24 internal
BGP routing table entry for 1.1.1.0/24, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  65002
    127.0.0.1 (inaccessible, import-check enabled) from 127.0.0.1 (127.0.0.2)
      Origin IGP, invalid, external
      Last update: Thu Jan 16 16:49:53 2025
      net: 0x63f3e6fc2ea0, path: 0x63f3e6fc2f50, pathext: 0x63f3e6faed00, attr: 0x63f3e6e8c550
      flags net: 0x0, path: 0x1024, attr: 0x7
donatas#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-17 22:24:35 +02:00
Donatas Abraitis
76ed8f61d8
Merge pull request #17814 from donaldsharp/nhg_removal_in_some_situations 2025-01-17 17:31:19 +02:00
Donald Sharp
19af3f3d7a zebra: Ensure that changes to dg_update_list are protected by mutex
The dg_update_list access is controlled by the dg_mutex in all
other locations.  Let's just add a mutex usage around the initialization
of the dg_update_list even if it's part of the startup, just to keep
things consistent.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-17 10:16:48 -05:00
Donald Sharp
f94ad538cf bgpd: Ensure ibuf count is protected by mutex
Grab the count of streams in ibuf when it is protected
by a mutex.  Since this data is written to it in another
pthread.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-17 10:16:48 -05:00
Donald Sharp
4b96752737 zebra: Add some documentation on when zserv_open should be used
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-17 10:16:48 -05:00
Donald Sharp
283cc51178 ospfd: Fix Coverity SA #1617470, 76 and 78
msg_new takes a uint16_t, the length passed
down variable is a unsigned int, thus 32 bit.
It's possible, but highly unlikely, that the
msglen could be greater than 16 bit.
Let's just add some checks to ensure that
this could not happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-17 10:16:48 -05:00
Donatas Abraitis
db853cc97e bgpd: Implement Link-Local Next Hop capability
Related: https://datatracker.ietf.org/doc/html/draft-white-linklocal-capability

TL;DR; use 16 bytes long next-hops for point-to-point (unnumbered) links instead
of sending 32 bytes (::/LL, GUA/LL, LL/LL combinations).

For backward compatiblity we should handle even 32 bytes existing next hops.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-17 16:48:32 +02:00
Donatas Abraitis
d3c46bce3b bgpd: Set the last reset reason correctly if we change capabilities per-peer
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-17 13:22:38 +02:00
Donatas Abraitis
8878e385d8 tests: Check if Link-Local Next Hop capability works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-17 13:15:19 +02:00
Donatas Abraitis
474cd4b664 doc: Add Link-Local Next Hop capability configuration knobs
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-17 13:15:19 +02:00
Donatas Abraitis
675666cbaf bgpd: Show the MP nexthop length in JSON output
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-17 13:15:19 +02:00
Donatas Abraitis
705e6f881b
Merge pull request #17836 from pguibert6WIND/limit_comm_list_count
limit community list count
2025-01-17 12:44:24 +02:00
Donald Sharp
acc3cfe334
Merge pull request #17727 from idryzhov/netns-all-daemons
lib: introduce global -w option for VRF netns backend
2025-01-16 08:11:07 -05:00
Donatas Abraitis
4e363bd48d
Merge pull request #17862 from LabNConsulting/chopps/ldp-snmp-fix
ldp snmp/grpc test fix
2025-01-16 09:11:25 +02:00
Donatas Abraitis
2df722262f bgpd: Check if the peer really exists before sending dynamic capability
CID: 1617727

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-16 09:06:17 +02:00
Julian Klaiber
f1a1703a0a tools: Allow deleting of interfaces
The frr-reload script currently deletes configurations
line-by-line under an interface context, if the interface was removed.
This approach fails when the interface has already been removed from the system.

This change enables whole interface removal using a single command
(no interface <interface-name>), simplifying the reload process and
reducing reload errors.

Signed-off-by: Julian Klaiber <jklaiber@open-systems.com>
2025-01-16 07:04:15 +01:00
Christian Hopps
f71d5281ce tests: dont run ldp snmp test if no snmp
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-16 02:13:34 +00:00
Christian Hopps
b0f9c4d688 tests: fix missed grpc test requirement for frr-backend addition
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-16 02:13:34 +00:00
Igor Ryzhov
754b949889 tests: use global -w option instead of per-daemon -n
Add ability to enable -w option for all daemons in a topotest and use
this option instead of the deprecated -n.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Igor Ryzhov
300f8dbda4 lib: introduce global -w option for VRF netns backend
Current -n option is only for zebra and mgmtd. All other daemons receive
the VRF backend configuration from zebra upon connection to it. This
leads to a potential race condition - daemons need to know the backend
before they start reading their config, but they can be not connected to
zebra yet at this point. As the VRF backend cannot change during runtime,
let's introduce a new global -w option for setting netns backend, to
make sure that all daemons know their VRF backend immediately after
start.

The reason for introducing a new option instead of making -n global is
that ospfd already uses -n for another purposes.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Igor Ryzhov
6f214d97d1 lib, zebra: move ns context intialization to zebra
vrf->ns_ctxt is only ever used in zebra, so move its initialization to
zebra's callback. Ideally this pointer shouldn't even be a part of
library's vrf struct, and moved to zebra-specific struct, but this is
the first step.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Igor Ryzhov
4877f2f685 lib: remove VRF_BACKEND_UNKNOWN
The backend type cannot be unknown. It is configured to VRF_LITE by
default in zebra anyway, so just init to VRF_LITE in the lib and remove
the UNKNOWN type.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Russ White
0bc373c573
Merge pull request #17838 from opensourcerouting/msdp-topo3
topotests: improve test reliability
2025-01-15 11:11:49 -05:00
Russ White
66a5d76920
Merge pull request #17810 from donaldsharp/bgp_connect_refactor
Bgp connect refactor
2025-01-15 11:11:41 -05:00
Donald Sharp
d43bdb9568
Merge pull request #17855 from opensourcerouting/fix/bgp_enhe_capability_via_dynamic_capability
bgpd: Handle ENHE capability via dynamic capability
2025-01-15 10:34:39 -05:00
Donald Sharp
953d5fd526
Merge pull request #17799 from LabNConsulting/chopps/backend-yang-model
mgmtd backend yang model (depends on #17796)
2025-01-15 10:22:11 -05:00
Donald Sharp
5867c32161
Merge pull request #17776 from nabahr/group-rpf-mode
PIMD: RPF lookup mode per-group, per-source
2025-01-15 10:20:24 -05:00
Donatas Abraitis
5e41d30b44
Merge pull request #17854 from enkechen-panw/flag-reflected
bgpd: remove unused BATTR_REFLECTED for rmap_change_flags
2025-01-15 15:41:17 +02:00
Donatas Abraitis
93ea9748cf
Merge pull request #17859 from donaldsharp/active_routes_are_active
Active routes are active
2025-01-15 15:01:59 +02:00
Donald Sharp
e9bd124149
Merge pull request #17858 from enkechen-panw/aggr-fix5
bgpd: move bgp_aggregate_increment() after bgp_path_info_add()
2025-01-15 07:37:12 -05:00
Donald Sharp
ec6a000b0b zebra: On Nexthop install failure don't set Installation failed
Currently FRR when installing a nexthop group, the installation can fail.
The assumption with the code was that the current nexthop group was
not already installed.  This leaves a problem state where if the
users of the nexthop group are removed, the nexthop group will be
removed possibly leaving a orphaned nexthop group in the data plane.

FRR on a nexthop group installation does not actually know the status
of the nexthop group in the kernel.  It's possible that a earlier
version of the nexthop group is left in play.  It's possible that
there is no nexthop group in the kernel at all.  Leaving the
Installed flag alone allows upon Zebra removing the nexthop
group when it is removed from zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-14 16:23:40 -05:00