]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
15 months agoMerge pull request #15052 from louis-6wind/rpki-vrf-92
Donatas Abraitis [Mon, 22 Jan 2024 14:16:34 +0000 (16:16 +0200)]
Merge pull request #15052 from louis-6wind/rpki-vrf-92

bgpd: add VRF support to RPKI

15 months agoMerge pull request #15176 from LabNConsulting/chopps/mgmtd-northbound-fixes
Igor Ryzhov [Mon, 22 Jan 2024 10:48:15 +0000 (12:48 +0200)]
Merge pull request #15176 from LabNConsulting/chopps/mgmtd-northbound-fixes

Chopps/mgmtd northbound fixes

15 months agoMerge pull request #15125 from pguibert6WIND/srte_pcep_session_json
Donatas Abraitis [Sun, 21 Jan 2024 19:33:35 +0000 (21:33 +0200)]
Merge pull request #15125 from pguibert6WIND/srte_pcep_session_json

Dump PCEP session in json format

15 months agoMerge pull request #15184 from donaldsharp/zebra_touchups
Donatas Abraitis [Sun, 21 Jan 2024 15:02:26 +0000 (17:02 +0200)]
Merge pull request #15184 from donaldsharp/zebra_touchups

Zebra touchups

15 months agoMerge pull request #15178 from donaldsharp/update_unnumbered_doc
Donatas Abraitis [Sun, 21 Jan 2024 11:45:45 +0000 (13:45 +0200)]
Merge pull request #15178 from donaldsharp/update_unnumbered_doc

doc: Update bgp unnumbered documentation

15 months agoMerge pull request #15183 from donaldsharp/zebra_nhg_worms
Donatas Abraitis [Sun, 21 Jan 2024 11:43:35 +0000 (13:43 +0200)]
Merge pull request #15183 from donaldsharp/zebra_nhg_worms

zebra: Fix NEXTHOP_GROUP_FPM define value

15 months agozebra: use break instead of goto 15184/head
Donald Sharp [Sat, 20 Jan 2024 23:50:49 +0000 (18:50 -0500)]
zebra: use break instead of goto

There is a goto statement that would be better served
with a break statement.  Let's try to minimize this
in the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agozebra: Remove function that just calls another function
Donald Sharp [Sat, 20 Jan 2024 23:46:58 +0000 (18:46 -0500)]
zebra: Remove function that just calls another function

Why not just call the one function?

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agozebra: Fix NEXTHOP_GROUP_FPM define value 15183/head
Donald Sharp [Sun, 21 Jan 2024 00:10:07 +0000 (19:10 -0500)]
zebra: Fix NEXTHOP_GROUP_FPM define value

The NEXTHOP_GROUP_FPM #define conflicts with
NEXTHOP_GROUP_KEEP_AROUND.  Not ideal let's fix
this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agodoc: Update bgp unnumbered documentation 15178/head
Donald Sharp [Fri, 19 Jan 2024 18:37:36 +0000 (13:37 -0500)]
doc: Update bgp unnumbered documentation

Mention the limitations of this type of peering
in bgp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agomgmtd: remove heavy duplication in mgmtd config read 15176/head
Christian Hopps [Thu, 18 Jan 2024 17:06:45 +0000 (17:06 +0000)]
mgmtd: remove heavy duplication in mgmtd config read

Previously each container created all it's decendents before descending into
the children and repeating the process.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: better conditionalize leaf-list predicate xpath addition
Christian Hopps [Thu, 18 Jan 2024 04:17:35 +0000 (04:17 +0000)]
lib: better conditionalize leaf-list predicate xpath addition

If we're in the backend we already have the predicate added by mgmtd -- don't
add it again.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: libyang logging temp off to avoid unwanted log message
Christian Hopps [Fri, 19 Jan 2024 15:25:57 +0000 (15:25 +0000)]
lib: libyang logging temp off to avoid unwanted log message

We don't want libyang logging when an schema path doesn't exist
since this is an acceptable outcome.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15175 from idryzhov/affinity-map-fixes
Christian Hopps [Fri, 19 Jan 2024 13:40:09 +0000 (08:40 -0500)]
Merge pull request #15175 from idryzhov/affinity-map-fixes

15 months agoMerge pull request #15168 from mjstapp/daemon_logs
Donatas Abraitis [Fri, 19 Jan 2024 08:56:15 +0000 (10:56 +0200)]
Merge pull request #15168 from mjstapp/daemon_logs

lib,vtysh: add per-daemon log file config

15 months agozebra: fix default value for affinity-mode 15175/head
Igor Ryzhov [Fri, 19 Jan 2024 01:21:53 +0000 (03:21 +0200)]
zebra: fix default value for affinity-mode

- initialize the necessary bit when creating if_link_params
- fix CLI description to mark extended as the default mode
- correctly set mode to extended when using the "no" form of the command
- handle the "show_defaults" parameter correctly in cli_show callback

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agozebra: remove unnecessary checks from CLI
Igor Ryzhov [Fri, 19 Jan 2024 01:01:40 +0000 (03:01 +0200)]
zebra: remove unnecessary checks from CLI

First, any data tree validation in CLI handler is not correct, because
this code won't be called when the change is done through any other
frontend. Second, these checks are not necessary at all, because NB
layer handles the change between admin-grp/affinity automatically.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agozebra: fix link-params admin-grp config output
Igor Ryzhov [Fri, 19 Jan 2024 00:56:45 +0000 (02:56 +0200)]
zebra: fix link-params admin-grp config output

- it was not printed at all because of the incorrect `yang_dnode_exist`
  check
- the intended output was "admin-group" instead of "admin-grp" used in
  the actual CLI command

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agozebra: rework affinity-map update hook
Igor Ryzhov [Fri, 19 Jan 2024 00:38:43 +0000 (02:38 +0200)]
zebra: rework affinity-map update hook

Don't use config tree when updating internal daemon state. Everything
needed is already stored in internal structures.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: make affinity-map value mandatory
Igor Ryzhov [Thu, 18 Jan 2024 23:52:41 +0000 (01:52 +0200)]
lib: make affinity-map value mandatory

There can't be an affinity map without a bit position.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: validate affinity-map bit position using the yang model
Igor Ryzhov [Thu, 18 Jan 2024 23:40:21 +0000 (01:40 +0200)]
lib: validate affinity-map bit position using the yang model

When affinity mode is "standard", bit position cannot be greater than
31. Add a "must" statement to the YANG model to validate this, and
remove our custom validation code that does the same.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: make affinity-map value unique in the yang model
Igor Ryzhov [Thu, 18 Jan 2024 21:39:32 +0000 (23:39 +0200)]
lib: make affinity-map value unique in the yang model

It allows us to remove the code that does the same thing manually.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: validate affinity-map reference using yang model
Igor Ryzhov [Thu, 18 Jan 2024 21:27:56 +0000 (23:27 +0200)]
lib: validate affinity-map reference using yang model

Change the type of affinity leaf-list in frr-zebra to a leafref with
"require-instance" property set to true. This change tells libyang to
automatically check that affinity-map exists before usage and doesn't
allow it to be deleted if it's referenced. It allows us to remove all
the manual code that is doing the same thing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #15172 from donaldsharp/evpn_mh_bridge_fix
Jafar Al-Gharaibeh [Thu, 18 Jan 2024 21:25:48 +0000 (15:25 -0600)]
Merge pull request #15172 from donaldsharp/evpn_mh_bridge_fix

tests: Fix test_evpn_mh.py to correctly call bridge program

15 months agopathd: add 'show sr-te pcep session json' support 15125/head
Philippe Guibert [Wed, 10 Jan 2024 14:25:03 +0000 (15:25 +0100)]
pathd: add 'show sr-te pcep session json' support

Add support to dump sr-te pcep session in json output.

> ubuntu2204# show sr-te pcep session
> PCE q
>  PCE IP 192.0.2.40 port 4189
>  PCC IP 192.0.2.10 port 4189
>  PCC MSD 10
>  Session Status UP
>  Precedence 10, best candidate
>  Confidence normal
>  Timer: KeepAlive config 30, pce-negotiated 70
>  Timer: DeadTimer config 120, pce-negotiated 120
>  Timer: PcRequest 30
>  Timer: SessionTimeout Interval 30
>  Timer: Delegation Timeout 10
>  No TCP MD5 Auth
>  PCE SR Version draft07
>  Next PcReq ID 5
>  Next PLSP  ID 2
>  Connected for 171 seconds, since 2023-10-28 09:36:44 UTC
>  PCC Capabilities: [PCC Initiated LSPs] [Stateful PCE] [SR TE PST]
>  PCE Capabilities: [Stateful PCE] [SR TE PST]
>  PCEP Message Statistics
>                         Sent   Rcvd
>          Message Open:     2      1
>     Message KeepAlive:     1      6
>         Message PcReq:     4      0
>         Message PcRep:     0      0
>        Message Notify:     4      0
>         Message Error:     0      5
>         Message Close:     0      0
>        Message Report:     5      0
>        Message Update:     0      1
>      Message Initiate:     0      0
>      Message StartTls:     0      0
>     Message Erroneous:     0      0
>                 Total:    16     13
> PCEP Sessions => Configured 1 ; Connected 1
> ubuntu2204# show sr-te pcep session  json
> {
>   "pcepSessions":[
>     {
>       "pceName":"q",
>       "pceAddress":"192.0.2.40",
>       "pcePort":4189,
>       "pccAddress":"192.0.2.10",
>       "pccPort":4189,
>       "pccMsd":10,
>       "sessionStatus":"UP",
>       "bestMultiPce":true,
>       "precedence":10,
>       "confidence":"normal",
>       "keepaliveConfig":30,
>       "deadTimerConfig":120,
>       "pccPcepRequestTimerConfig":30,
>       "sessionTimeoutIntervalSec":30,
>       "delegationTimeout":10,
>       "tcpMd5Authentication":false,
>       "draft07":true,
>       "draft16AndRfc8408":false,
>       "nextPcRequestId":5,
>       "nextPLspId":2,
>       "sessionKeepalivePceNegotiatedSec":70,
>       "sessionDeadTimerPceNegotiatedSec":120,
>       "sessionConnectionDurationSec":177,
>       "sessionConnectionStartTimeUTC":"2023-10-28 09:36:44",
>       "pccCapabilities":" [PCC Initiated LSPs] [Stateful PCE] [SR TE PST]",
>       "pceCapabilities":" [Stateful PCE] [SR TE PST]",
>       "messageStatisticsReceived":{
>         "messageOpen":1,
>         "messageKeepalive":6,
>         "messagePcReq":0,
>         "messagePcRep":0,
>         "messageNotify":0,
>         "messageError":5,
>         "messageClose":0,
>         "messageReport":0,
>         "messageUpdate":1,
>         "messageInitiate":0,
>         "messageStartTls":0,
>         "messageErroneous":0,
>         "total":13
>       },
>       "messageStatisticsSent":{
>         "messageOpen":2,
>         "messageKeepalive":1,
>         "messagePcReq":4,
>         "messagePcRep":0,
>         "messageNotify":4,
>         "messageError":0,
>         "messageClose":0,
>         "messageReport":5,
>         "messageUpdate":0,
>         "messageInitiate":0,
>         "messageStartTls":0,
>         "messageErrneous":0,
>         "total":16
>       }
>     }
>   ],
>   "pcepSessionsConfigured":1,
>   "pcepSessionsConnected":1
> }

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
15 months agopceplib: add json string option to subgroup counter
Philippe Guibert [Wed, 10 Jan 2024 14:26:05 +0000 (15:26 +0100)]
pceplib: add json string option to subgroup counter

The created counters in pceplib library are structures with
a string attribute which is used for further display. This
string information is not formatted for json output.

Add a second option in the create_subgroup_counter() creation
API to provide the json attribute output.

Create a json naming compatible with caml format for each
subgroup counter used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
15 months agotests: Fix test_evpn_mh.py to correctly call bridge program 15172/head
Donald Sharp [Thu, 18 Jan 2024 14:58:50 +0000 (09:58 -0500)]
tests: Fix test_evpn_mh.py to correctly call bridge program

Getting this error:

2024-01-17 19:05:20,688 WARNING: torm11: Router(torm11): proc failed: rc 255 pid 2436134
args: /usr/bin/nsenter --mount=/proc/2435168/ns/mnt --net=/proc/2435168/ns/net --uts=/proc/2435168/ns/uts -F /bin/bash -c /sbin/bridge vlan add vid 1000 dev bridge
stdout: RTNETLINK answers: Operation not supported
stderr: *empty*

As I understand it the correct thing to do here is pass in:
bridge vlan add vid 1000 dev bridge self

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agodoc: add doc for daemon-specific log cli 15168/head
Mark Stapp [Thu, 18 Jan 2024 13:30:01 +0000 (08:30 -0500)]
doc: add doc for daemon-specific log cli

Add doc for the daemon-specific log file cli

Signed-off-by: Mark Stapp <mjs@labn.net>
15 months agotopotests: add vrf test to bgp_rpki_topo1 15052/head
Louis Scalbert [Mon, 18 Dec 2023 12:04:11 +0000 (13:04 +0100)]
topotests: add vrf test to bgp_rpki_topo1

Add vrf test to bgp_rpki_topo1

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add show bgp rpki prefix-count command
Philippe Guibert [Thu, 12 Mar 2020 09:26:31 +0000 (10:26 +0100)]
bgpd: add show bgp rpki prefix-count command

Add "show bgp rpki prefix-count" command to show the number of received
prefixes from RPKI cache servers.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: add information for per vrf rpki commands
Philippe Guibert [Thu, 19 Sep 2019 14:52:45 +0000 (16:52 +0200)]
doc: add information for per vrf rpki commands

Add documentation for per VRF RPKI commands

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: remove rpki ssh local server public key
Louis Scalbert [Thu, 18 Jan 2024 10:19:00 +0000 (11:19 +0100)]
doc: remove rpki ssh local server public key

It is not used anymore.

Fixes: 2a5f5ec00f ("bgpd: Drop SSH public key for RPKI CLI option")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: fix rpki ipv4 address family example
Louis Scalbert [Thu, 18 Jan 2024 10:15:11 +0000 (11:15 +0100)]
doc: fix rpki ipv4 address family example

Fix RPKI IPv4 address family example.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: use documentation range in rpki manual
Louis Scalbert [Thu, 18 Jan 2024 10:00:53 +0000 (11:00 +0100)]
doc: use documentation range in rpki manual

Use documentation range in rpki manual

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add vrf name to some rpki logs
Philippe Guibert [Mon, 3 Feb 2020 12:41:09 +0000 (13:41 +0100)]
bgpd: add vrf name to some rpki logs

Add VRF name to some rpki logs

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: set rpki validation state in vrf table
Philippe Guibert [Mon, 3 Feb 2020 12:36:58 +0000 (13:36 +0100)]
bgpd: set rpki validation state in vrf table

Set the RPKI validation state in the VRF BGP table. It allows applying
a route-maps with "match rpki <state>" on a VRF neighbor.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: show per vrf rpki configuration in show run
Philippe Guibert [Thu, 19 Sep 2019 14:37:14 +0000 (16:37 +0200)]
bgpd: show per vrf rpki configuration in show run

Show per VRF RPKI configuration in "show run".

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add support of rpki in vrf configure context
Philippe Guibert [Thu, 19 Sep 2019 12:13:57 +0000 (14:13 +0200)]
bgpd: add support of rpki in vrf configure context

Add support of RPKI commands in the VRF configure context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add support of vrf to rpki in enable mode
Philippe Guibert [Thu, 19 Sep 2019 09:42:46 +0000 (11:42 +0200)]
bgpd: add support of vrf to rpki in enable mode

Add a "vrf <vrfname>" argument to "show rpki" and "rpki" commands in
enable mode

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: create cache server socket in vrf
Philippe Guibert [Tue, 29 Oct 2019 16:56:47 +0000 (17:56 +0100)]
bgpd: create cache server socket in vrf

Create cache server socket in vrf

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: start or stop rpki at vrf creation or deletion
Louis Scalbert [Thu, 21 Dec 2023 10:04:01 +0000 (11:04 +0100)]
bgpd: start or stop rpki at vrf creation or deletion

Start or stop a RPKI cache servers in VRF when they are created or
deleted.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add a hook to inform a vrf is enabled/disabled
Philippe Guibert [Tue, 29 Oct 2019 16:52:52 +0000 (17:52 +0100)]
bgpd: add a hook to inform a vrf is enabled/disabled

Add a hook to call a future callback function when bgpd knows from zebra
about the activation of de-activation of a VRF. It will be used by the
RPKI module in next commits.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: remove rpki config command from enable node
Philippe Guibert [Thu, 19 Sep 2019 14:41:12 +0000 (16:41 +0200)]
bgpd: remove rpki config command from enable node

Remove rpki config command from enable node. It cannot work.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: move rpki variables in a per vrf fist
Philippe Guibert [Wed, 4 Sep 2019 15:51:22 +0000 (17:51 +0200)]
bgpd: move rpki variables in a per vrf fist

RPKI stores its data in global variables. It does not allow specific
date per VRF.

Move global variable to a new structure named rpki_vrf and maintain a
per VRF list of rpki_vrf. The changes are cosmetic because only the
default VRF is supported yet.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agoMerge pull request #15166 from LabNConsulting/chopps/fix-munet
Donatas Abraitis [Thu, 18 Jan 2024 07:18:04 +0000 (09:18 +0200)]
Merge pull request #15166 from LabNConsulting/chopps/fix-munet

tests: fix munet accessing missing attribute

15 months agolib,vtysh: add per-daemon log file config
Mark Stapp [Wed, 17 Jan 2024 21:15:07 +0000 (16:15 -0500)]
lib,vtysh: add per-daemon log file config

Add a config that specifies per-deamon log file names.
Move the handy generated list of daemon names from vtysh to lib;
edit the gitignore files to match.

Signed-off-by: Mark Stapp <mjs@labn.net>
15 months agoMerge pull request #15162 from opensourcerouting/fix/aspath4_set_flag
Donald Sharp [Wed, 17 Jan 2024 13:19:34 +0000 (08:19 -0500)]
Merge pull request #15162 from opensourcerouting/fix/aspath4_set_flag

bgpd: Set capability received flag only after sanity checks

15 months agotests: fix munet accessing missing attribute 15166/head
Christian Hopps [Wed, 17 Jan 2024 09:18:21 +0000 (09:18 +0000)]
tests: fix munet accessing missing attribute

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agotests: Adopt tests for AS4 handling 15162/head
Donatas Abraitis [Tue, 16 Jan 2024 14:28:41 +0000 (16:28 +0200)]
tests: Adopt tests for AS4 handling

When received malformed AS4 capability, it should return -1 (notification send),
and the received flag SHOULD NOT be set.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agobgpd: Send notification if AS4 capability failed to parse (malformed)
Donatas Abraitis [Tue, 16 Jan 2024 13:29:32 +0000 (15:29 +0200)]
bgpd: Send notification if AS4 capability failed to parse (malformed)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agobgpd: Set role capability received flag only if parsed correctly
Donatas Abraitis [Tue, 16 Jan 2024 12:37:51 +0000 (14:37 +0200)]
bgpd: Set role capability received flag only if parsed correctly

If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agobgpd: Set hostname capability received flag only if parsed correctly
Donatas Abraitis [Tue, 16 Jan 2024 12:37:16 +0000 (14:37 +0200)]
bgpd: Set hostname capability received flag only if parsed correctly

If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agobgpd: Set ADD-PATH capability received flag only if parsed correctly
Donatas Abraitis [Tue, 16 Jan 2024 12:36:20 +0000 (14:36 +0200)]
bgpd: Set ADD-PATH capability received flag only if parsed correctly

If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agobgpd: Set AS4 capability received flag only if parsed correctly
Donatas Abraitis [Tue, 16 Jan 2024 12:35:10 +0000 (14:35 +0200)]
bgpd: Set AS4 capability received flag only if parsed correctly

If we receive a malformed packet, we might end-up with a bad state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agoMerge pull request #15160 from vjardin/doc_typo
Donatas Abraitis [Tue, 16 Jan 2024 07:44:41 +0000 (09:44 +0200)]
Merge pull request #15160 from vjardin/doc_typo

doc: typo, fix end of line

15 months agoMerge pull request #15161 from LabNConsulting/chopps/munet-0-13-12
Donatas Abraitis [Tue, 16 Jan 2024 07:44:04 +0000 (09:44 +0200)]
Merge pull request #15161 from LabNConsulting/chopps/munet-0-13-12

import munet 0.13.12

15 months agotests: import munet 0.13.12 15161/head
Christian Hopps [Mon, 15 Jan 2024 22:43:06 +0000 (22:43 +0000)]
tests: import munet 0.13.12

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agotests: set environment variable munet 0.13.12 will use
Christian Hopps [Mon, 15 Jan 2024 22:25:41 +0000 (22:25 +0000)]
tests: set environment variable munet 0.13.12 will use

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agodoc: typo, fix end of line 15160/head
Vincent Jardin [Mon, 15 Jan 2024 21:51:09 +0000 (22:51 +0100)]
doc: typo, fix end of line

Signed-off-by: Vincent Jardin <vjardin@free.fr>
15 months agoMerge pull request #15154 from idryzhov/mgmt-get-data
Christian Hopps [Mon, 15 Jan 2024 12:03:34 +0000 (07:03 -0500)]
Merge pull request #15154 from idryzhov/mgmt-get-data

mgmtd get-data request expansion

15 months agoMerge pull request #15156 from LabNConsulting/chopps/yang-mtu-32
Donatas Abraitis [Mon, 15 Jan 2024 09:27:15 +0000 (11:27 +0200)]
Merge pull request #15156 from LabNConsulting/chopps/yang-mtu-32

yang: lib: interface MTUs can be larger than uint16

15 months agoMerge pull request #15034 from louis-6wind/topotest-rpki
Donatas Abraitis [Mon, 15 Jan 2024 09:26:43 +0000 (11:26 +0200)]
Merge pull request #15034 from louis-6wind/topotest-rpki

bgpd, topotests: add bgp_rpki_topo1 and RPKI fixes

15 months agotests: add tests for mgmt get-data exact node request 15154/head
Igor Ryzhov [Sat, 13 Jan 2024 22:54:08 +0000 (00:54 +0200)]
tests: add tests for mgmt get-data exact node request

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib, mgmtd: add ability to request the exact node in get-data request
Igor Ryzhov [Sat, 13 Jan 2024 22:53:21 +0000 (00:53 +0200)]
lib, mgmtd: add ability to request the exact node in get-data request

RESTCONF expects to receive the exact node as a result, not the whole
data tree.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: fix oper data leaf creation
Igor Ryzhov [Sat, 13 Jan 2024 22:41:54 +0000 (00:41 +0200)]
lib: fix oper data leaf creation

When creating an initial tree trunk for oper data walk, if the xpath
represents a leaf, the leaf is created with an incorrect empty value.
If it doesn't actually exist in daemon's oper data, its value is not
overwritten later and an empty value is returned in the result.

For example, when requesting
`/frr-interface:lib/interface[name='eth0']/description`, the result is:
```
{
  "frr-interface:lib": {
    "interface": [
      {
        "name": "eth0",
        "description": ""
      }
    ]
  }
}
```
instead of an empty JSON that it should be.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agotests: add tests for mgmt get-data with config
Igor Ryzhov [Sat, 13 Jan 2024 20:58:19 +0000 (22:58 +0200)]
tests: add tests for mgmt get-data with config

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib, mgmtd: add ability to set content type in get-data request
Igor Ryzhov [Sat, 13 Jan 2024 20:51:45 +0000 (22:51 +0200)]
lib, mgmtd: add ability to set content type in get-data request

Like in RESTCONF GET request and NETCONF get-data request, make it
possible to request state-only, config-only, or all data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #15150 from LabNConsulting/chopps/config-file-integrated
Donatas Abraitis [Mon, 15 Jan 2024 06:43:44 +0000 (08:43 +0200)]
Merge pull request #15150 from LabNConsulting/chopps/config-file-integrated

doc: update config file doc for integrated requirement

15 months agolib, mgmtd: add separate get-data request for the frontend
Igor Ryzhov [Sat, 13 Jan 2024 20:34:17 +0000 (22:34 +0200)]
lib, mgmtd: add separate get-data request for the frontend

Currently it's the same as get-tree request for the backend, but it is
going to be expanded in the following commits.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agovtysh, mgmtd: send interface commands to mgmtd
Igor Ryzhov [Sat, 13 Jan 2024 20:26:15 +0000 (22:26 +0200)]
vtysh, mgmtd: send interface commands to mgmtd

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agomgmtd: add option to specify netns as the vrf backend
Igor Ryzhov [Sun, 14 Jan 2024 14:55:46 +0000 (16:55 +0200)]
mgmtd: add option to specify netns as the vrf backend

mgmtd has to know if netns is used as the vrf backend to correctly
process interface names in northbound.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: fix yang_lyd_trim_xpath
Igor Ryzhov [Sat, 13 Jan 2024 20:09:18 +0000 (22:09 +0200)]
lib: fix yang_lyd_trim_xpath

We should traverse all top-level siblings, not only the first one.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #15151 from idryzhov/mgmtd-vrf
Christian Hopps [Sun, 14 Jan 2024 17:04:46 +0000 (12:04 -0500)]
Merge pull request #15151 from idryzhov/mgmtd-vrf

mgmtd: remove full vrf initialization

15 months agoyang: lib: interface MTUs can be larger than uint16 15156/head
Christian Hopps [Sun, 14 Jan 2024 12:35:00 +0000 (12:35 +0000)]
yang: lib: interface MTUs can be larger than uint16

Technically changing a leaf from uint16 to uint32 is a NBC change; however,
increasing this to uint32 should not break anyone in reality.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15152 from LabNConsulting/chopps/doc-mgmtd-convert-update
Donald Sharp [Sun, 14 Jan 2024 01:46:36 +0000 (20:46 -0500)]
Merge pull request #15152 from LabNConsulting/chopps/doc-mgmtd-convert-update

doc: mgmtd: update mgmtd conversion doc to be current.

15 months agodoc: update config file doc for integrated requirement 15150/head
Christian Hopps [Fri, 12 Jan 2024 18:02:42 +0000 (18:02 +0000)]
doc: update config file doc for integrated requirement

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15149 from donaldsharp/pim_vxlan_issues_2
Donatas Abraitis [Sat, 13 Jan 2024 19:10:07 +0000 (21:10 +0200)]
Merge pull request #15149 from donaldsharp/pim_vxlan_issues_2

Some code realignment in pim

15 months agoMerge pull request #15135 from idryzhov/mgmt-unused
Donatas Abraitis [Sat, 13 Jan 2024 19:08:24 +0000 (21:08 +0200)]
Merge pull request #15135 from idryzhov/mgmt-unused

mgmtd: remove unused/redundant variables

15 months agoMerge pull request #15137 from spmzt/master
Donatas Abraitis [Sat, 13 Jan 2024 19:07:25 +0000 (21:07 +0200)]
Merge pull request #15137 from spmzt/master

build: make buildtest.sh BSD compatible

15 months agodoc: mgmtd: update mgmtd conversion doc to be current. 15152/head
Christian Hopps [Sat, 13 Jan 2024 14:26:55 +0000 (14:26 +0000)]
doc: mgmtd: update mgmtd conversion doc to be current.

Also change `be_client_xpaths` to `be_client_config_xpaths` referred in the doc
to make much clearer it's use (since there's a separate `be_client_oper_xpaths`.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agomgmtd: remove full vrf initialization 15151/head
Igor Ryzhov [Sat, 13 Jan 2024 13:51:59 +0000 (15:51 +0200)]
mgmtd: remove full vrf initialization

We don't really need full VRF infrastructure in mgmtd. We only need to
register vty commands.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #15144 from LabNConsulting/chopps/cov-issue-2
Donatas Abraitis [Fri, 12 Jan 2024 21:38:23 +0000 (23:38 +0200)]
Merge pull request #15144 from LabNConsulting/chopps/cov-issue-2

lib: fix coverity issue

15 months agopimd: Use vrf name instead of id in some debugs 15149/head
Donald Sharp [Fri, 12 Jan 2024 20:01:46 +0000 (15:01 -0500)]
pimd: Use vrf name instead of id in some debugs

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agopimd: Re-align pim_msg_get_jp_group_size
Donald Sharp [Fri, 12 Jan 2024 17:00:45 +0000 (12:00 -0500)]
pimd: Re-align pim_msg_get_jp_group_size

This function was/is heavily indented, let's refactor
this a bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agoMerge pull request #15138 from opensourcerouting/fix/drop_unused_var_bgp_damp
Donald Sharp [Fri, 12 Jan 2024 19:34:46 +0000 (14:34 -0500)]
Merge pull request #15138 from opensourcerouting/fix/drop_unused_var_bgp_damp

bgpd: Drop dampening `tmax` variable from struct

15 months agoMerge pull request #15121 from routingrocks/rajesh/bgp_peer_ttl
Donatas Abraitis [Fri, 12 Jan 2024 18:26:34 +0000 (20:26 +0200)]
Merge pull request #15121 from routingrocks/rajesh/bgp_peer_ttl

bgpd: Set correct TTL for the dynamic neighbor peers

15 months agoMerge pull request #15130 from donaldsharp/pim_vxlan_issues
Donatas Abraitis [Fri, 12 Jan 2024 18:26:10 +0000 (20:26 +0200)]
Merge pull request #15130 from donaldsharp/pim_vxlan_issues

Pim vxlan issues

15 months agolib: fix coverity issue 15144/head
Christian Hopps [Fri, 12 Jan 2024 16:37:30 +0000 (16:37 +0000)]
lib: fix coverity issue

** CID 1575595:  Null pointer dereferences  (REVERSE_INULL)

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15133 from LabNConsulting/chopps/coverity-fixes
Donatas Abraitis [Fri, 12 Jan 2024 14:06:26 +0000 (16:06 +0200)]
Merge pull request #15133 from LabNConsulting/chopps/coverity-fixes

lib: fix coverity issues

15 months agomgmtd: remove redundant next_phase variable 15135/head
Igor Ryzhov [Thu, 11 Jan 2024 21:41:29 +0000 (23:41 +0200)]
mgmtd: remove redundant next_phase variable

next_phase is always curr_phase + 1. It's not necessary to maintain it
separately. Also rename curr_phase to phase.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #14542 from idryzhov/nb-op-cb-split
Christian Hopps [Fri, 12 Jan 2024 11:07:57 +0000 (06:07 -0500)]
Merge pull request #14542 from idryzhov/nb-op-cb-split

Add more northbound operation types

15 months agobuild: make buildtest.sh BSD compatible 15137/head
Seyed Pouria Mousavizadeh Tehrani [Fri, 12 Jan 2024 10:38:10 +0000 (14:08 +0330)]
build: make buildtest.sh BSD compatible

Signed-off-by: Seyed Pouria Mousavizadeh Tehrani <p.mousavizadeh@protonmail.com>
15 months agoMerge pull request #15136 from idryzhov/ignore-cbs
Donatas Abraitis [Fri, 12 Jan 2024 09:56:59 +0000 (11:56 +0200)]
Merge pull request #15136 from idryzhov/ignore-cbs

lib, mgmtd: rename ignore_cbs to ignore_cfg_cbs

15 months agobgpd: Drop dampening `tmax` variable from struct 15138/head
Donatas Abraitis [Fri, 12 Jan 2024 09:29:43 +0000 (11:29 +0200)]
bgpd: Drop dampening `tmax` variable from struct

Not used anywhere.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agoMerge pull request #15127 from opensourcerouting/fix/doc_libyang_artifacts
Christian Hopps [Fri, 12 Jan 2024 08:32:37 +0000 (03:32 -0500)]
Merge pull request #15127 from opensourcerouting/fix/doc_libyang_artifacts

doc: libyang nits

15 months agoMerge pull request #15134 from idryzhov/fix-commit-clients
Christian Hopps [Fri, 12 Jan 2024 08:32:03 +0000 (03:32 -0500)]
Merge pull request #15134 from idryzhov/fix-commit-clients

mgmtd: don't try to send config to disconnected clients

15 months agoMerge pull request #15131 from LabNConsulting/chopps/oper-choice-case
Igor Ryzhov [Thu, 11 Jan 2024 22:20:45 +0000 (00:20 +0200)]
Merge pull request #15131 from LabNConsulting/chopps/oper-choice-case

Chopps/oper choice case

15 months agolib, mgmtd: rename ignore_cbs to ignore_cfg_cbs 15136/head
Igor Ryzhov [Thu, 11 Jan 2024 21:47:48 +0000 (23:47 +0200)]
lib, mgmtd: rename ignore_cbs to ignore_cfg_cbs

Setting this variable to true makes NB ignore only configuration-related
callbacks. CLI-related callbacks are still loaded and executed, so
rename the variable to make it clearer.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agomgmtd: remove unused pending_be_proc variable
Igor Ryzhov [Thu, 11 Jan 2024 21:08:01 +0000 (23:08 +0200)]
mgmtd: remove unused pending_be_proc variable

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agomgmtd: don't try to send config to disconnected clients 15134/head
Igor Ryzhov [Thu, 11 Jan 2024 18:58:09 +0000 (20:58 +0200)]
mgmtd: don't try to send config to disconnected clients

When determining the interested backend clients for a configuration
change, don't consider disconnected clients. This fixes a crash in
`mgmt_txn_send_be_txn_create` when trying to send data to a non-existing
adapter.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>