]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
15 months agobgpd: check sockopt returns in rpki_create_socket 15201/head
Louis Scalbert [Tue, 23 Jan 2024 08:51:15 +0000 (09:51 +0100)]
bgpd: check sockopt returns in rpki_create_socket

Check (g|s)etsockopt returns in rpki_create_socket(). Coverity scanner
issues 1575916 and 1575924.

Fixes: a951752d4a ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix memory leak in rpki_create_socket
Louis Scalbert [Tue, 23 Jan 2024 10:52:04 +0000 (11:52 +0100)]
bgpd: fix memory leak in rpki_create_socket

Fix memory leak in rpki_create_socket. Coverity scanner issue 1575914.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix res validity in rpki_create_socket
Louis Scalbert [Tue, 23 Jan 2024 10:52:59 +0000 (11:52 +0100)]
bgpd: fix res validity in rpki_create_socket

Fix coverity scanner issue 1575912 where res pointer is supposed to
valid in:

> socket = vrf_socket(res->ai_family, ...)

but is checked for validity a few lines later.

Note that vrf_getaddrinfo returns an error code if getaddrinfo() fails
to allocate res and in this case, rpki_create_socket() returns.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix deference before check in rpki_create_socket
Louis Scalbert [Tue, 23 Jan 2024 08:29:26 +0000 (09:29 +0100)]
bgpd: fix deference before check in rpki_create_socket

Fix deference before check coverity scanner issue 1575918 in
rpki_create_socket()

Fixes: a951752d4a ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix potential null pointers in rpki
Louis Scalbert [Tue, 23 Jan 2024 08:16:24 +0000 (09:16 +0100)]
bgpd: fix potential null pointers in rpki

Fix potential NULL pointer in RPKI code. Coverity scanner issues: 1575911
1575913157591515759171575919 to 15759231575925 and 1575926.

Fixes: 1420189c11 ("bgpd: add support of rpki in vrf configure context")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agoMerge pull request #15179 from donaldsharp/zebra_neigh_update
Donatas Abraitis [Tue, 23 Jan 2024 06:51:26 +0000 (08:51 +0200)]
Merge pull request #15179 from donaldsharp/zebra_neigh_update

Zebra neigh update

15 months agoMerge pull request #15193 from idryzhov/fix-bgp-rmap-probability
Donatas Abraitis [Tue, 23 Jan 2024 06:49:30 +0000 (08:49 +0200)]
Merge pull request #15193 from idryzhov/fix-bgp-rmap-probability

bgpd: fix route-map match probability deconfiguration callback

15 months agoMerge pull request #15194 from idryzhov/dist-list-fixes
Christian Hopps [Tue, 23 Jan 2024 01:44:01 +0000 (20:44 -0500)]
Merge pull request #15194 from idryzhov/dist-list-fixes

distribute-list fixes and improvements

15 months agoripngd: use correct autocompletion for distribute-list commands 15194/head
Igor Ryzhov [Mon, 22 Jan 2024 21:44:17 +0000 (23:44 +0200)]
ripngd: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate. Also, fix missing "IPv6"
docstring and use correct address family.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoripd: use correct autocompletion for distribute-list commands
Igor Ryzhov [Mon, 22 Jan 2024 21:34:56 +0000 (23:34 +0200)]
ripd: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoeigrpd: use correct autocompletion for distribute-list commands
Igor Ryzhov [Mon, 22 Jan 2024 21:21:58 +0000 (23:21 +0200)]
eigrpd: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate. Also, use address-family-specific
autocompletion.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agobabeld: use correct autocompletion for distribute-list commands
Igor Ryzhov [Mon, 22 Jan 2024 21:21:02 +0000 (23:21 +0200)]
babeld: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: add address-family-specific autocompletion for prefix-lists
Igor Ryzhov [Mon, 22 Jan 2024 21:20:31 +0000 (23:20 +0200)]
lib: add address-family-specific autocompletion for prefix-lists

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: remove global list of distribute-lists
Igor Ryzhov [Mon, 22 Jan 2024 21:00:43 +0000 (23:00 +0200)]
lib: remove global list of distribute-lists

It's not needed anymore, all daemons always pass context.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agobabeld: pass distribute ctx to distribute-list functions
Igor Ryzhov [Mon, 22 Jan 2024 21:00:18 +0000 (23:00 +0200)]
babeld: pass distribute ctx to distribute-list functions

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoeigrpd: convert distribute-list configuration to northbound
Igor Ryzhov [Mon, 22 Jan 2024 20:52:50 +0000 (22:52 +0200)]
eigrpd: convert distribute-list configuration to northbound

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agobgpd: fix route-map match probability deconfiguration callback 15193/head
Igor Ryzhov [Mon, 22 Jan 2024 20:31:21 +0000 (22:31 +0200)]
bgpd: fix route-map match probability deconfiguration callback

Add missing break. Currently, lib_route_map_entry_match_destroy is
called on every commit stage, but it should run only on APPLY.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agosharpd: Allow sharpd to listen to neighbor events 15179/head
Donald Sharp [Fri, 19 Jan 2024 20:13:49 +0000 (15:13 -0500)]
sharpd: Allow sharpd to listen to neighbor events

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agolib, nhrpd: Move neighbor reg/unreg to lib/zclient.c
Donald Sharp [Fri, 19 Jan 2024 19:51:34 +0000 (14:51 -0500)]
lib, nhrpd: Move neighbor reg/unreg to lib/zclient.c

This is needed to be generic.  Let's make it so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months ago*: Rename ZEBRA_NHRP_NEIGH_XXX to ZEBRA_NEIGH_XXX
Donald Sharp [Fri, 19 Jan 2024 19:45:25 +0000 (14:45 -0500)]
*: Rename ZEBRA_NHRP_NEIGH_XXX to ZEBRA_NEIGH_XXX

This does not need to be nhrp specific.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agoMerge pull request #15185 from LabNConsulting/chopps/distlist
Igor Ryzhov [Mon, 22 Jan 2024 14:52:45 +0000 (16:52 +0200)]
Merge pull request #15185 from LabNConsulting/chopps/distlist

add northbound support to distribute-list code.

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 agoripngd: use new distribute-list northbound code. 15185/head
Christian Hopps [Sun, 21 Jan 2024 21:19:28 +0000 (21:19 +0000)]
ripngd: use new distribute-list northbound code.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoripd: use new distribute-list northbound code.
Christian Hopps [Sun, 21 Jan 2024 14:01:58 +0000 (14:01 +0000)]
ripd: use new distribute-list northbound code.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: enable multiple instance support with distribute lists
Christian Hopps [Mon, 22 Jan 2024 01:15:38 +0000 (01:15 +0000)]
lib: enable multiple instance support with distribute lists

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: add northbound support to distribute-list code.
Christian Hopps [Sun, 21 Jan 2024 13:12:39 +0000 (13:12 +0000)]
lib: add northbound support to distribute-list code.

Signed-off-by: Christian Hopps <chopps@labn.net>
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 agolib: cleanup yang lint warnings
Christian Hopps [Sat, 20 Jan 2024 00:33:09 +0000 (00:33 +0000)]
lib: cleanup yang lint warnings

Signed-off-by: Christian Hopps <chopps@labn.net>
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>