]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 months agotests: OSPF topotest for next-hop pruning
Acee Lindem [Wed, 22 Jan 2025 20:32:50 +0000 (20:32 +0000)]
tests: OSPF topotest for next-hop pruning

OSPF topotest to test OSPF next-hop pruning on installation
into zebra routing table. Also fix multicast_pim_dr_nondr_test
topotest which had a duplicate OSPF route in the results.

Signed-off-by: Acee Lindem <acee@lindem.com>
X

3 months agoMerge pull request #17899 from chiragshah6/evpn_dev1
Donatas Abraitis [Wed, 22 Jan 2025 08:23:44 +0000 (10:23 +0200)]
Merge pull request #17899 from chiragshah6/evpn_dev1

bgpd: fix evpn path info get api

3 months agoMerge pull request #17889 from louis-6wind/fix-rpki-table-version
Donatas Abraitis [Wed, 22 Jan 2025 05:06:25 +0000 (07:06 +0200)]
Merge pull request #17889 from louis-6wind/fix-rpki-table-version

tests: remove table version check in bgp rpki topo1

3 months agoMerge pull request #17894 from pguibert6WIND/bmp_send_peerx_twice
Donatas Abraitis [Wed, 22 Jan 2025 05:03:58 +0000 (07:03 +0200)]
Merge pull request #17894 from pguibert6WIND/bmp_send_peerx_twice

bgpd: fix do not send twice peer up/down messages

3 months agobgpd: fix evpn path info get api
Chirag Shah [Tue, 7 Jan 2025 02:57:54 +0000 (18:57 -0800)]
bgpd: fix evpn path info get api

EVPN imported routes AF is not AF_EVPN, in that case
the path info extra with EVPN is nver created.
In order to create evpn info under path extra, define
new api which does not specifically check for AF_EVPN
afi type.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 months agoMerge pull request #17895 from LabNConsulting/chopps/fix-coverity-use-after-free
Donald Sharp [Tue, 21 Jan 2025 19:09:41 +0000 (14:09 -0500)]
Merge pull request #17895 from LabNConsulting/chopps/fix-coverity-use-after-free

lib: fix coverity use after free issue: CID 1620101

3 months agoMerge pull request #17793 from LabNConsulting/working/lb/fix-r8-rpms
Jafar Al-Gharaibeh [Tue, 21 Jan 2025 16:32:32 +0000 (10:32 -0600)]
Merge pull request #17793 from LabNConsulting/working/lb/fix-r8-rpms

Fix Rocky 8 RPMs, add options to build without rpki and docs (default is to include)

3 months agolib: fix coverity use after free issue: CID 1620101
Christian Hopps [Mon, 20 Jan 2025 18:33:15 +0000 (18:33 +0000)]
lib: fix coverity use after free issue: CID 1620101

The code doesn't push more than one group (currently) so wouldn't hit the
bug yet, nice catch by coverity.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agobgpd: fix do not send twice peer up/down messages
Philippe Guibert [Tue, 21 Jan 2025 14:34:13 +0000 (15:34 +0100)]
bgpd: fix do not send twice peer up/down messages

With recent BMP code, on a standard BMP config, the peer up and peer
down messages related to a BGP peer are sent twice, whereas they should
be send only once.

Fix this by better controlling the condition.

Fixes: f8a693311145 ("bgpd: bmp, handle imported bgp instances for peer up/down events")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #17888 from krishna-samy/bgpd_mac_hash
Donatas Abraitis [Tue, 21 Jan 2025 14:29:32 +0000 (16:29 +0200)]
Merge pull request #17888 from krishna-samy/bgpd_mac_hash

bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table

3 months agoMerge pull request #16723 from jklaiber/fix-reload-interface-deletion
Donatas Abraitis [Tue, 21 Jan 2025 14:28:28 +0000 (16:28 +0200)]
Merge pull request #16723 from jklaiber/fix-reload-interface-deletion

tools: fix reload interface deletion

3 months agotests: remove table version check in bgp rpki topo1
Louis Scalbert [Tue, 21 Jan 2025 10:17:04 +0000 (11:17 +0100)]
tests: remove table version check in bgp rpki topo1

Remove table version check in bgp rpki topo1.

Fixes: 5f50b98f8e ("tests: add bgp rpki topo1 rpkiValidationState")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agobgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table
Krishnasamy R [Tue, 21 Jan 2025 09:06:53 +0000 (01:06 -0800)]
bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table

Issue:
During FRR restart, we fail to add some of the local interface's MAC
to the 'bgp mac hash'. Not having local MAC in the hash table can cause
lookup issues while receiving EVPN RT-2.

Currently, we have code to add local MAC(bgp_mac_add_mac_entry) while handling
interface add/up events in BGP(bgp_ifp_up/bgp_ifp_create). But the code
'bgp_mac_add_mac_entry' in bgp_ifp_create is not getting invoked as it
is placed under a specific check(vrf->bgp link check).

Fix:
We can skip this check 'vrf->bgp link existence' as the tenant VRF might
not have BGP instance but still we want to cache the tenant VRF local
MACs. So keeping this check in bgp_ifp_create inline with bgp_ifp_up.

Ticket: #4204154

Signed-off-by: Krishnasamy R <krishnasamyr@nvidia.com>
3 months agoMerge pull request #17883 from opensourcerouting/fix/topotest_dynamic_cap_enhe
Jafar Al-Gharaibeh [Mon, 20 Jan 2025 19:31:47 +0000 (13:31 -0600)]
Merge pull request #17883 from opensourcerouting/fix/topotest_dynamic_cap_enhe

tests: Fix test_bgp_dynamic_capability_enhe topotest

3 months agoMerge pull request #17882 from LabNConsulting/chopps/doc-update-mgmtd
Jafar Al-Gharaibeh [Mon, 20 Jan 2025 19:29:37 +0000 (13:29 -0600)]
Merge pull request #17882 from LabNConsulting/chopps/doc-update-mgmtd

small mgmtd-dev doc update and yanglint cleanup

3 months agoMerge pull request #17874 from pguibert6WIND/bgp_unnumbered_interface_json
Donatas Abraitis [Mon, 20 Jan 2025 15:35:26 +0000 (17:35 +0200)]
Merge pull request #17874 from pguibert6WIND/bgp_unnumbered_interface_json

Bgp unnumbered interface json

3 months agoMerge pull request #17885 from LabNConsulting/chopps/fix-gen-cb-regression
Donatas Abraitis [Mon, 20 Jan 2025 12:26:13 +0000 (14:26 +0200)]
Merge pull request #17885 from LabNConsulting/chopps/fix-gen-cb-regression

tools: fix regression in gen_northbound_callback tool

3 months agotopotests: bgp_ipv6_rtadv, add control over bgp updates
Philippe Guibert [Fri, 17 Jan 2025 16:26:50 +0000 (17:26 +0100)]
topotests: bgp_ipv6_rtadv, add control over bgp updates

Add a test to control the json values of the incoming BGP update
received by an unnumbered BGP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix display json value of interface for BGP unnumbered
Philippe Guibert [Fri, 17 Jan 2025 16:28:00 +0000 (17:28 +0100)]
bgpd: fix display json value of interface for BGP unnumbered

The 'show bgp ipv[4,6] json' command does not display the interface
value of the nexthop, when BGP sessions are unnumbered, whereas the
non json output displays it correctly. The below example indicates
'r1-eth0' wheras in json, the value is not displayed.

> r1# show bgp ipv4
> BGP table version is 3, local router ID is 10.254.254.1, vrf id 0
> Default local pref 100, local AS 101
> Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
>                i internal, r RIB-failure, S Stale, R Removed
> Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
> Origin codes:  i - IGP, e - EGP, ? - incomplete
> RPKI validation codes: V valid, I invalid, N Not found
>
>      Network          Next Hop            Metric LocPrf Weight Path
>  *>  10.254.254.1/32  0.0.0.0                  0         32768 ?
>  *>  10.254.254.2/32  r1-eth0                  0             0 102 ?
>
> Displayed 2 routes and 2 total paths

Fix this by adding an 'interface' keyword in the json attributes.

> "nexthops":[{"ip":"2001:db8:1::2","hostname":"r2","afi":"ipv6",
> "scope":"global"},{"interface":"r1-eth0","ip":"fe80::1868:d7ff:fe66:45ae",
> "hostname":"r2","afi":"ipv6","scope":"link-local","used":true}]}]

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #16894 from wenwang00/project-phoenixwing-ysj
Philippe Guibert [Mon, 20 Jan 2025 08:20:15 +0000 (09:20 +0100)]
Merge pull request #16894 from wenwang00/project-phoenixwing-ysj

staticd: Add support for SRv6 Static SIDs

3 months agoMerge pull request #17884 from LabNConsulting/chopps/fix-dnode-create
Donatas Abraitis [Mon, 20 Jan 2025 07:14:59 +0000 (09:14 +0200)]
Merge pull request #17884 from LabNConsulting/chopps/fix-dnode-create

lib: fix dnode_create to use correct libyang function.

3 months agotools: fix regression in gen_northbound_callback tool
Christian Hopps [Mon, 20 Jan 2025 06:01:59 +0000 (06:01 +0000)]
tools: fix regression in gen_northbound_callback tool

When support for new style `get()` was added inadvertently stopped
generating other callbacks and prototypes. Fix this.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: fix dnode_create to use correct libyang function.
Christian Hopps [Sat, 18 Jan 2025 23:39:32 +0000 (23:39 +0000)]
lib: fix dnode_create to use correct libyang function.

The previous use of `lyd_new_path()` returns the first node created, rather
than the xpath target node. The code is lucky in the sense that it is
normally only creating a single node rather than a branch. Fix this to
use `lyd_new_path2()` which returns the target node to actually implement
the semantics expected by callers of `dnode_create()` (i.e., returning the
newly created target node).

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: Fix test_bgp_dynamic_capability_enhe topotest
Donatas Abraitis [Sat, 18 Jan 2025 21:06:13 +0000 (23:06 +0200)]
tests: Fix test_bgp_dynamic_capability_enhe topotest

Drop redundant function (duplicate), and reset counters for r2 instead of r1.

We check received capabilities on r2, hence we need to flush the counters on r2 too.

Fixes: d1cfd730601e5063d126ca1e78be5695fe909a77 ("tests: Check if ENHE capability can be handled dynamically")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agoMerge pull request #17876 from LabNConsulting/chopps/backend-ds-notify
Donald Sharp [Sat, 18 Jan 2025 19:42:18 +0000 (14:42 -0500)]
Merge pull request #17876 from LabNConsulting/chopps/backend-ds-notify

Handle datastore notifications correctly in backend clients (daemons)

3 months agodoc: add misplaced doc change for mgmtd development
Christian Hopps [Sat, 18 Jan 2025 18:17:18 +0000 (18:17 +0000)]
doc: add misplaced doc change for mgmtd development

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agoyang: lint cleanup of test module
Christian Hopps [Sat, 18 Jan 2025 18:17:36 +0000 (18:17 +0000)]
yang: lint cleanup of test module

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: split notify test to regular and datastore notify tests
Christian Hopps [Thu, 16 Jan 2025 06:15:26 +0000 (06:15 +0000)]
tests: split notify test to regular and datastore notify tests

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agomgmtd: testc: add listen for datastore notifications
Christian Hopps [Thu, 16 Jan 2025 06:14:54 +0000 (06:14 +0000)]
mgmtd: testc: add listen for datastore notifications

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: improve error handling for datastore notifications
Christian Hopps [Fri, 17 Jan 2025 21:21:33 +0000 (21:21 +0000)]
lib: improve error handling for datastore notifications

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: mgmtd: only send notify selectors to backends that provide.
Christian Hopps [Sat, 18 Jan 2025 06:57:35 +0000 (06:57 +0000)]
lib: mgmtd: only send notify selectors to backends that provide.

- Previously we sent selectors to all backends when a replace was
  done, improve this to only send them to backends that provide
  the selected state.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: mgmt_be_client handles datastore notification using CBs
Christian Hopps [Thu, 16 Jan 2025 04:13:08 +0000 (04:13 +0000)]
lib: mgmt_be_client handles datastore notification using CBs

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: yang: add yang_parse_data function
Christian Hopps [Thu, 16 Jan 2025 04:14:03 +0000 (04:14 +0000)]
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>
3 months agoMerge pull request #17880 from LabNConsulting/chopps/ci-arm
Donatas Abraitis [Sat, 18 Jan 2025 12:58:55 +0000 (14:58 +0200)]
Merge pull request #17880 from LabNConsulting/chopps/ci-arm

tests: ci: add ARM to docker based CI test

3 months agodoc: Add support for SRv6 static sid CLI
Yuqing Zhao [Mon, 13 Jan 2025 10:51:34 +0000 (11:51 +0100)]
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>
3 months agotests: Add topotest for SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:27:36 +0000 (11:27 +0100)]
tests: Add topotest for SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agovtysh: Add SRv6 static SIDs CLI to vtysh
Yuqing Zhao [Mon, 13 Jan 2025 10:14:04 +0000 (11:14 +0100)]
vtysh: Add SRv6 static SIDs CLI to vtysh

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Add CLIs to show SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:13:38 +0000 (11:13 +0100)]
staticd: Add CLIs to show SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Add CLI for SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:13:07 +0000 (11:13 +0100)]
staticd: Add CLI for SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agolib: Add CLI node for SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:10:48 +0000 (11:10 +0100)]
lib: Add CLI node for SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Add Northbound APIs for SRv6
Yuqing Zhao [Mon, 13 Jan 2025 10:10:20 +0000 (11:10 +0100)]
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>
3 months agostaticd: Initialize/cleanup SRv6
Yuqing Zhao [Mon, 13 Jan 2025 10:04:38 +0000 (11:04 +0100)]
staticd: Initialize/cleanup SRv6

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Install SIDs when a dependent interface goes up/down
Yuqing Zhao [Mon, 13 Jan 2025 10:04:19 +0000 (11:04 +0100)]
staticd: Install SIDs when a dependent interface goes up/down

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Request/Release SIDs to SID Manager
Yuqing Zhao [Mon, 13 Jan 2025 10:03:48 +0000 (11:03 +0100)]
staticd: Request/Release SIDs to SID Manager

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agolib, isisd: Move DEFAULT_SRV6_IFNAME to global srv6.h header
Yuqing Zhao [Wed, 15 Jan 2025 12:16:21 +0000 (13:16 +0100)]
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>
3 months agostaticd: Add infrastructure for SRv6
Yuqing Zhao [Mon, 13 Jan 2025 10:02:23 +0000 (11:02 +0100)]
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>
3 months agolib: Add a function to print SRv6 Endpoint Behavior Codepoints
Yuqing Zhao [Thu, 16 Jan 2025 07:57:04 +0000 (08:57 +0100)]
lib: Add a function to print SRv6 Endpoint Behavior Codepoints

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Add debug option for SRv6
Yuqing Zhao [Wed, 15 Jan 2025 17:43:37 +0000 (18:43 +0100)]
staticd: Add debug option for SRv6

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agoyang: Add SRv6 to frr-staticd YANG model
Yuqing Zhao [Mon, 13 Jan 2025 09:50:05 +0000 (10:50 +0100)]
yang: Add SRv6 to frr-staticd YANG model

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agotests: ci: add ARM to docker based CI test
Christian Hopps [Fri, 17 Jan 2025 19:40:14 +0000 (19:40 +0000)]
tests: ci: add ARM to docker based CI test

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agoMerge pull request #17814 from donaldsharp/nhg_removal_in_some_situations
Donatas Abraitis [Fri, 17 Jan 2025 15:31:19 +0000 (17:31 +0200)]
Merge pull request #17814 from donaldsharp/nhg_removal_in_some_situations

3 months agoMerge pull request #17836 from pguibert6WIND/limit_comm_list_count
Donatas Abraitis [Fri, 17 Jan 2025 10:44:24 +0000 (12:44 +0200)]
Merge pull request #17836 from pguibert6WIND/limit_comm_list_count

limit community list count

3 months agoMerge pull request #17727 from idryzhov/netns-all-daemons
Donald Sharp [Thu, 16 Jan 2025 13:11:07 +0000 (08:11 -0500)]
Merge pull request #17727 from idryzhov/netns-all-daemons

lib: introduce global -w option for VRF netns backend

3 months agoMerge pull request #17862 from LabNConsulting/chopps/ldp-snmp-fix
Donatas Abraitis [Thu, 16 Jan 2025 07:11:25 +0000 (09:11 +0200)]
Merge pull request #17862 from LabNConsulting/chopps/ldp-snmp-fix

ldp snmp/grpc test fix

3 months agotools: Allow deleting of interfaces
Julian Klaiber [Mon, 2 Sep 2024 13:13:40 +0000 (15:13 +0200)]
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>
3 months agotests: dont run ldp snmp test if no snmp
Christian Hopps [Thu, 16 Jan 2025 01:07:53 +0000 (01:07 +0000)]
tests: dont run ldp snmp test if no snmp

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: fix missed grpc test requirement for frr-backend addition
Christian Hopps [Thu, 16 Jan 2025 01:09:14 +0000 (01:09 +0000)]
tests: fix missed grpc test requirement for frr-backend addition

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: use global -w option instead of per-daemon -n
Igor Ryzhov [Wed, 1 Jan 2025 21:22:52 +0000 (23:22 +0200)]
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>
3 months agolib: introduce global -w option for VRF netns backend
Igor Ryzhov [Fri, 27 Dec 2024 19:33:39 +0000 (21:33 +0200)]
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>
3 months agolib, zebra: move ns context intialization to zebra
Igor Ryzhov [Fri, 27 Dec 2024 13:10:27 +0000 (15:10 +0200)]
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>
3 months agolib: remove VRF_BACKEND_UNKNOWN
Igor Ryzhov [Thu, 26 Dec 2024 21:08:21 +0000 (23:08 +0200)]
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>
3 months agoMerge pull request #17838 from opensourcerouting/msdp-topo3
Russ White [Wed, 15 Jan 2025 16:11:49 +0000 (11:11 -0500)]
Merge pull request #17838 from opensourcerouting/msdp-topo3

topotests: improve test reliability

3 months agoMerge pull request #17810 from donaldsharp/bgp_connect_refactor
Russ White [Wed, 15 Jan 2025 16:11:41 +0000 (11:11 -0500)]
Merge pull request #17810 from donaldsharp/bgp_connect_refactor

Bgp connect refactor

3 months agoMerge pull request #17855 from opensourcerouting/fix/bgp_enhe_capability_via_dynamic_...
Donald Sharp [Wed, 15 Jan 2025 15:34:39 +0000 (10:34 -0500)]
Merge pull request #17855 from opensourcerouting/fix/bgp_enhe_capability_via_dynamic_capability

bgpd: Handle ENHE capability via dynamic capability

3 months agoMerge pull request #17799 from LabNConsulting/chopps/backend-yang-model
Donald Sharp [Wed, 15 Jan 2025 15:22:11 +0000 (10:22 -0500)]
Merge pull request #17799 from LabNConsulting/chopps/backend-yang-model

mgmtd backend yang model (depends on #17796)

3 months agoMerge pull request #17776 from nabahr/group-rpf-mode
Donald Sharp [Wed, 15 Jan 2025 15:20:24 +0000 (10:20 -0500)]
Merge pull request #17776 from nabahr/group-rpf-mode

PIMD: RPF lookup mode per-group, per-source

3 months agoMerge pull request #17854 from enkechen-panw/flag-reflected
Donatas Abraitis [Wed, 15 Jan 2025 13:41:17 +0000 (15:41 +0200)]
Merge pull request #17854 from enkechen-panw/flag-reflected

bgpd: remove unused BATTR_REFLECTED for rmap_change_flags

3 months agoMerge pull request #17859 from donaldsharp/active_routes_are_active
Donatas Abraitis [Wed, 15 Jan 2025 13:01:59 +0000 (15:01 +0200)]
Merge pull request #17859 from donaldsharp/active_routes_are_active

Active routes are active

3 months agoMerge pull request #17858 from enkechen-panw/aggr-fix5
Donald Sharp [Wed, 15 Jan 2025 12:37:12 +0000 (07:37 -0500)]
Merge pull request #17858 from enkechen-panw/aggr-fix5

bgpd: move bgp_aggregate_increment() after bgp_path_info_add()

3 months agozebra: On Nexthop install failure don't set Installation failed
Donald Sharp [Tue, 14 Jan 2025 21:23:40 +0000 (16:23 -0500)]
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>
3 months agobgpd: Handle ENHE capability via dynamic capability
Donatas Abraitis [Tue, 14 Jan 2025 16:57:45 +0000 (18:57 +0200)]
bgpd: Handle ENHE capability via dynamic capability

FRR supports dynamic capability which is useful to exchange the capabilities
without tearing down the session. ENHE capability was missed to be included
handling via dynamic capability. Let's add it too.

This was missed and asked in Slack that it would be useful.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agotests: Check if ENHE capability can be handled dynamically
Donatas Abraitis [Tue, 14 Jan 2025 16:56:48 +0000 (18:56 +0200)]
tests: Check if ENHE capability can be handled dynamically

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agozebra: Nexthops need to be ACTIVE in some cases
Donald Sharp [Tue, 14 Jan 2025 20:12:32 +0000 (15:12 -0500)]
zebra: Nexthops need to be ACTIVE in some cases

Currently if you have an interface down event, Zebra
sets the nexthop(s) as !ACTIVE that use it.  On
interface up events the singleton nexthops are not being
set as ACTIVE.  Due to timing events it is sometimes
possible to end up with a route that is using a singleton

Change singleton nexthops to set the nexthop to ACTIVE.
This will allow the nexthop to be reinstalled appropriately
as well.

I was able to easily reproduce this using sharpd since
it does not attempt to reinstall the routes when a interface
goes up/down.

Before:

D>* 10.0.0.0/32 [150/0] via 192.168.102.34, dummy2, weight 1, 00:00:01

sharpd@eva ~/frr5 (master)> sudo ip link set dummy2 down ; sudo ip link set dummy2 up

D>  10.0.0.0/32 [150/0] (350) via 192.168.102.34, dummy2 inactive, weight 1, 00:00:10

After code change:

D>* 10.0.0.0/32 [150/0] (73) via 192.168.102.34, dummy2, weight 1, 00:00:14

sharpd@eva ~/frr5 (master)> sudo ip link set dummy2 down ; sudo ip link set dummy2 up

D>* 10.0.0.0/32 [150/0] (73) via 192.168.102.34, dummy2, weight 1, 00:00:21

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 months agolib: northbound/mgmtd: add backend model support
Christian Hopps [Mon, 6 Jan 2025 12:52:31 +0000 (07:52 -0500)]
lib: northbound/mgmtd: add backend model support

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agoMerge pull request #17796 from LabNConsulting/chopps/datastore-notifications
Donald Sharp [Tue, 14 Jan 2025 18:47:28 +0000 (13:47 -0500)]
Merge pull request #17796 from LabNConsulting/chopps/datastore-notifications

operational-state (datastore) change notifications

3 months agoMerge pull request #17581 from mjstapp/fix_fpm_netlink
Donald Sharp [Tue, 14 Jan 2025 18:42:29 +0000 (13:42 -0500)]
Merge pull request #17581 from mjstapp/fix_fpm_netlink

zebra: avoid race between FPM pthread and zebra main pthread in netlink encode/decode

3 months agobgpd: move bgp_aggregate_increment() after bgp_path_info_add()
Enke Chen [Tue, 14 Jan 2025 18:29:22 +0000 (10:29 -0800)]
bgpd: move bgp_aggregate_increment() after bgp_path_info_add()

Route aggregation should be checked after a route is added, and
not before. This is for code flow and consistency.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agoMerge pull request #17850 from Jafaral/wr-rpg
Donald Sharp [Tue, 14 Jan 2025 17:41:15 +0000 (12:41 -0500)]
Merge pull request #17850 from Jafaral/wr-rpg

pimd: always write cand-rp group config even when rp is inactive

3 months agoMerge pull request #17841 from Jafaral/pim-bsr-rp
Donald Sharp [Tue, 14 Jan 2025 17:39:52 +0000 (12:39 -0500)]
Merge pull request #17841 from Jafaral/pim-bsr-rp

pimd: fix BSR RPs timing out

3 months agobgpd: remove unused BATTR_REFLECTED for rmap_change_flags
Enke Chen [Sun, 12 Jan 2025 08:27:12 +0000 (00:27 -0800)]
bgpd: remove unused BATTR_REFLECTED for rmap_change_flags

Remove unused BATTR_REFLECTED for rmap_change_flags.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agoMerge pull request #17800 from opensourcerouting/fix/import_between_vrf_respect_allow...
Russ White [Tue, 14 Jan 2025 15:19:26 +0000 (10:19 -0500)]
Merge pull request #17800 from opensourcerouting/fix/import_between_vrf_respect_allowas_in

bgpd: Respect allowas-in value from the source VRF's peer

3 months agoMerge pull request #17803 from anlancs/ospfd/fix-redundant-timers
Russ White [Tue, 14 Jan 2025 15:17:20 +0000 (10:17 -0500)]
Merge pull request #17803 from anlancs/ospfd/fix-redundant-timers

ospfd: avoid the redundant timers

3 months agoMerge pull request #17806 from opensourcerouting/fix/lua5.4_support
Russ White [Tue, 14 Jan 2025 15:09:04 +0000 (10:09 -0500)]
Merge pull request #17806 from opensourcerouting/fix/lua5.4_support

Lua 5.4 support

3 months agoMerge pull request #17837 from enkechen-panw/aggr-fix4
Russ White [Tue, 14 Jan 2025 15:05:06 +0000 (10:05 -0500)]
Merge pull request #17837 from enkechen-panw/aggr-fix4

bgpd: fix churn of aggregate routes from duplicate config

3 months agoMerge pull request #17842 from enkechen-panw/aggr-safi
Donald Sharp [Tue, 14 Jan 2025 14:37:39 +0000 (09:37 -0500)]
Merge pull request #17842 from enkechen-panw/aggr-safi

bgpd: remove unused safi in bgp_aggregate structure

3 months agoMerge pull request #17846 from Jafaral/fix-latex-warn
Donald Sharp [Tue, 14 Jan 2025 14:37:09 +0000 (09:37 -0500)]
Merge pull request #17846 from Jafaral/fix-latex-warn

doc: fix LaTex warnings, add documentation to build docs

3 months agoMerge pull request #17639 from pguibert6WIND/bmp_import_vrf_view
Russ White [Tue, 14 Jan 2025 13:38:37 +0000 (08:38 -0500)]
Merge pull request #17639 from pguibert6WIND/bmp_import_vrf_view

Ability to import BMP information from a separate BGP instance

3 months agotopotest: add a test to control the community-list count
Philippe Guibert [Fri, 10 Jan 2025 16:46:56 +0000 (17:46 +0100)]
topotest: add a test to control the community-list count

Add a test to control the community-list count.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: add 'match community-count' command to restrict comm count
Philippe Guibert [Fri, 10 Jan 2025 16:29:10 +0000 (17:29 +0100)]
bgpd: add 'match community-count' command to restrict comm count

Add a mechanism in route-map to filter out route-map which have a list
of communities greater than the given number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #17840 from Jafaral/pim-acl-test
Donatas Abraitis [Tue, 14 Jan 2025 07:08:41 +0000 (09:08 +0200)]
Merge pull request #17840 from Jafaral/pim-acl-test

tests: remove unnecessary wildcard fields from pim acl test

3 months agoMerge pull request #17847 from chiragshah6/freloadfix
Donatas Abraitis [Tue, 14 Jan 2025 07:07:14 +0000 (09:07 +0200)]
Merge pull request #17847 from chiragshah6/freloadfix

tools: fix frr-reload for nbr deletion of no form cmds

3 months agopimd: always write cand-rp group config even when rp is inactive
Jafar Al-Gharaibeh [Tue, 14 Jan 2025 05:34:08 +0000 (23:34 -0600)]
pimd: always write cand-rp group config even when rp is inactive

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agolib: fix new (incorrect) CLANG SA warnings
Christian Hopps [Fri, 10 Jan 2025 12:01:00 +0000 (07:01 -0500)]
lib: fix new (incorrect) CLANG SA warnings

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: add datastore notification test
Christian Hopps [Wed, 8 Jan 2025 16:11:43 +0000 (11:11 -0500)]
tests: add datastore notification test

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agomgmtd: add notify selectors to filter datastore notifications
Christian Hopps [Wed, 8 Jan 2025 15:34:57 +0000 (10:34 -0500)]
mgmtd: add notify selectors to filter datastore notifications

- Additionally push the selectors down to the backends

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: notify on datastore (oper-state) changes
Christian Hopps [Sat, 14 Dec 2024 23:26:49 +0000 (18:26 -0500)]
lib: notify on datastore (oper-state) changes

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: if: track oper-state inline
Christian Hopps [Mon, 2 Dec 2024 00:48:53 +0000 (19:48 -0500)]
lib: if: track oper-state inline

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: vrf: track oper-state inline
Christian Hopps [Wed, 8 Jan 2025 14:57:10 +0000 (09:57 -0500)]
lib: vrf: track oper-state inline

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: northbound: add basic oper-state update functions
Christian Hopps [Tue, 7 Jan 2025 11:46:23 +0000 (06:46 -0500)]
lib: northbound: add basic oper-state update functions

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotools: fix frr-reload for nbr deletion of no form cmds
Chirag Shah [Mon, 13 Jan 2025 02:31:02 +0000 (18:31 -0800)]
tools: fix frr-reload for nbr deletion of no form cmds

When a bgp neighbor removed from associated to peer-group,
the neighbor is fully deleted, subsequent deletion of any
configuration related to the neighbor leads to failure
in frr-reload.
Handle any 'no neighbor ...' part of lines_to_del list

Testing:
Below first line would delete the neighbor swp1.10,
the existing code before the change handles to remove
config starts with 'neighbor swp1.10 ...' but not
'no neighbor swp1.10 ...'.

(Pdb) (lines_to_del)
 (('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2'),
 (('router bgp 100',), 'neighbor swp1.10 advertisement-interval 1'),
 (('router bgp 100',), 'neighbor swp1.10 timers 3 9'),
 (('router bgp 100',), 'neighbor swp1.10 timers connect 1'),
 (('router bgp 100',), 'no neighbor swp1.10 capability dynamic'),

Before fix:

(Pdb) (lines_to_del)
[(('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2'),
 (('router bgp 100',), 'no neighbor swp1.10 capability dynamic')]

frr-reload log:
2025-01-13 05:13:11,172  INFO: Executed "router bgp 100  no neighbor swp1.10 interface peer-group dpeergrp_2 exit"
2025-01-13 05:13:11,227 ERROR: Failed to execute router bgp 100  neighbor swp1.10 capability dynamic exit
2025-01-13 05:13:11,228 ERROR: "router bgp 100 --  neighbor swp1.10 capability dynamic -- exit" we failed to remove this command

After fix:

(Pdb)(lines_to_del)
 [(('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2')]

Signed-off-by: Chirag Shah <chirag@nvidia.com>