Commit Graph

5819 Commits

Author SHA1 Message Date
Igor Ryzhov
13359c5cc9 lib: fix processing of notifications on mgmt fe client
Notifications are sent by mgmtd for each session of a client, so they
should be processed once per each session.

Also, add session_id parameter to an async_notification callback as all
other callbacks have this parameter.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-23 18:53:46 +02:00
Christian Hopps
37588ece04
Merge pull request #15401 from idryzhov/fix-nb-crash
Fix order of NB callbacks (and a crash)
2024-02-21 00:16:47 -05:00
Igor Ryzhov
01f371a677 lib: fix order of northbound callbacks
When ordering the NB callbacks according to their priorities, if the
operation is "destroy" we should reverse the order, to destroy the
dependants before the dependencies.

This fixes the crash, that can be reproduced with the following steps:
```
frr# conf term file-lock
frr(config)# affinity-map map bit-position 10
frr(config)# interface test
frr(config-if)# link-params
frr(config-link-params)# affinity map
frr(config-link-params)# exit
frr(config-if)# exit
frr(config)# mgmt commit apply
frr(config)# no affinity-map map
frr(config)# interface test
frr(config-if)# link-params
frr(config-link-params)# no affinity map
frr(config-link-params)# exit
frr(config-if)# exit
frr(config)# mgmt commit apply
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-20 22:32:52 +02:00
Igor Ryzhov
323caf1d70 lib: add missing priority for affinity map callbacks
Other objects depend on affinity-maps being created before them by using
leafref with require-instance true. Set the priority to ensure that.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-20 22:27:29 +02:00
Donald Sharp
605009d729
Merge pull request #15393 from idryzhov/fix-base64
lib: fix base64 encoding
2024-02-20 10:20:28 -05:00
Russ White
8dbfc57ec6
Merge pull request #15377 from opensourcerouting/fix/bgpd_evpn_route_map
lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed
2024-02-20 10:17:46 -05:00
Igor Ryzhov
77149fabaa lib: fix base64 encoding
Remove adding of line feeds when encondig. We're using these functions
only for encoding binary data for storing in YANG data tree.

According to RFC 7950, section 9.8.2:
```
9.8.2.  Lexical Representation

   Binary values are encoded with the base64 encoding scheme (see
   Section 4 in [RFC4648]).
```

According to mentioned RFC 4648, section 3.1:
```
   Implementations MUST NOT add line feeds to base-encoded data unless
   the specification referring to this document explicitly directs base
   encoders to add line feeds after a specific number of characters.
```

Therefore, line feeds must not be added to the encoded data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-19 15:35:22 +02:00
Christian Hopps
4a93d171c2 lib: mgmtd: add xpath arg to notification message
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-18 18:53:37 -05:00
Christian Hopps
1d4ea437e4 lib: always call new notification hooks too
- call the new notification hooks when backends call the old notification
posting API.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-15 13:03:25 -05:00
Christian Hopps
dff28248c3 lib: actually create the tree for the conversion
Before this fix would always return empty results b/c there was no
libyang tree to print to output format.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-15 06:13:08 -05:00
Christian Hopps
b8e07049a8 lib: fix memleak on success
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-15 06:13:08 -05:00
Donatas Abraitis
439b739495 lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed
Convert only when this is really needed, e.g. `match ip address prefix-list ...`.

Otherwise, we can't have mixed match clauses, like:

```
match ip address prefix-list p1
match evpn route-type prefix
```

This won't work, because the prefix is already converted, and we can't extract
route type, vni, etc. from the original EVPN prefix.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-15 12:07:43 +02:00
Russ White
e74c3b0746
Merge pull request #15320 from donaldsharp/vtysh_limit_fds
lib, ospfclient, vtysh: Allow for a minimum fd poll size
2024-02-13 09:50:00 -05:00
Igor Ryzhov
3ac3a6605d lib, mgmtd: rework processing of yang notifications
Currently, YANG notification processing is done using a special type of
callbacks registered in backend clients. In this commit, we start using
regular northbound infrastructure instead, because it already has a
convenient way of registering xpath-specific callbacks without the need
for creating additional structures for each necessary notification. We
also now pass a notification data to the callback, instead of a plain
JSON. This allows to use regular YANG library functions for inspecting
notification fields, instead of manually parsing the JSON.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-11 13:26:52 +02:00
Igor Ryzhov
d94f80fbc4 lib, mgmtd: fix processing of yang notifications
Current code assumes that notification is always sent in stripped JSON
format and therefore notification xpath starts at the third symbol of
notification data. Assuming JSON is more or less fine, because this
representation is internal to FRR, but the assumption about the xpath is
wrong, because it won't work for not top-level notifications. YANG
allows to define notification as a child for some data node deep into
the tree and in this case notification data contains not only the
notification node itself, but also all its parents.

To fix the issue, parse the notification data and get its xpath from its
schema node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-10 01:00:24 +02:00
Donald Sharp
fcf1ab9c21
Merge pull request #15325 from opensourcerouting/fix/show_getsockopt
bgpd: Do not show TCP MSS if the socket is broken
2024-02-08 10:33:34 -05:00
Christian Hopps
ab3d0846bd
Merge pull request #15286 from idryzhov/fix-mgmt-startup
Fix conflict in mgmtd on startup
2024-02-07 16:04:11 -05:00
Donatas Abraitis
65497556ed bgpd: Do not show TCP MSS if the socket is broken
Just avoid calling for TCP MSS socket option if it's not in use.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-02-07 23:03:37 +02:00
Igor Ryzhov
2574f03a13 vtysh: remove resync workaround when exiting to config node
When exiting from a level below the config node, like `router rip`,
vtysh executes a resync by sending "end" and "conf term [file-lock]"
commands to all the daemons. As statet in the description comment, it's
done "in case one of the daemons is somewhere else". I don't think this
actually ever happens, but even if it is, it is a bug in a daemon that
needs to be fixed. This resync was okay before the introduction of
mgmtd, but now it unlocks and locks back the datastores during the
configuration reading process, which can lead to a failure which is
explained in the previous commit.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-07 18:37:29 +02:00
Donald Sharp
729dd6f626 lib, ospfclient, tests, vtysh: Allow for a minimum fd poll size
There exists cases where just honoring the FD_LIMIT size
as given to us by the operating system makes no sense.
Let's just make a switch to allow for this for things
like vtysh and ospfclient which will never have 1k files
open at any given time.

Fixes: #15315
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-07 10:38:02 -05:00
Donald Sharp
87b69cdd74
Merge pull request #15294 from okda-networks/sysrepo_set_sess_err
lib: set change errmsg in sysrepo session
2024-02-05 14:59:45 -05:00
Donald Sharp
cac925f005
Merge pull request #15291 from idryzhov/mgmtd-yang-embed
lib, mgmtd: fix missing embedded modules
2024-02-05 07:34:38 -05:00
Donald Sharp
015c11646d
Merge pull request #15297 from idryzhov/mgmtd--n
mgmtd: fix missing -n flag and help
2024-02-05 07:31:11 -05:00
Igor Ryzhov
066bb6dc2d lib: add ietf-yang-metadata to the list of built-in modules
We don't need to manually load built-in modules. This fixes the
following warning in mgmtd:
```
YANG model "ietf-yang-metadata@*" "*@*"not embedded, trying external file
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-04 22:27:28 +02:00
Igor Ryzhov
c1b4976786 *: use af-specific autocompletion for prefix-lists when possible
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-04 22:26:48 +02:00
Igor Ryzhov
7ef83dcf0c lib: fix autocompletion for prefix-lists
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-04 22:26:48 +02:00
Igor Ryzhov
9c5f0ea98d lib: fix autocompletion for access-lists
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-04 22:26:48 +02:00
Igor Ryzhov
ea6a7d3fa3 lib, mgmtd: don't register NB config callbacks in mgmtd
mgmtd is supposed to only register CLI callbacks. If configuration
callbacks are registered, they are getting called on startup when mgmtd
reads config files, and they can use infrastructure that is not
initialized on mgmtd, or allocate some memory that is never freed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-04 22:25:57 +02:00
Donald Sharp
5ddf2aaa52 lib: Actually create the rcu and save it before using it
In a non-controlled startup, the rcu data structures were
not being created until after logging could happen.  This
is bad.  Move it so that the rcu data structures are
created first, before logging( HA! ) can happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-03 23:08:20 -05:00
ali-aqrabawi
cfe1b5b684
lib: set change errmsg in sysrepo session
this will enable sysrepo based cli users to know what went wrong
when config change fails

Signed-off-by: ali-aqrabawi <aaqrabaw@okdanetworks.com>
2024-02-03 23:57:13 +03:00
Donald Sharp
3a6c3129dd
Merge pull request #15265 from louis-6wind/fix-rpki-logs
bgpd,lib: fix logging from rpki_create_socket()
2024-02-03 08:40:27 -05:00
Donald Sharp
3d57f04395
Merge pull request #10151 from pguibert6WIND/ensure_routing_protocols_good_bw
zebra: avoid having speed set to UINT32_MAX
2024-02-02 12:51:35 -05:00
Donald Sharp
22b79197bb
Merge pull request #15279 from idryzhov/staticd-fixes
several fixes for staticd configuration
2024-02-02 11:51:03 -05:00
Donatas Abraitis
4650d5aa5a
Merge pull request #15278 from idryzhov/fix-no-vrf
lib: fix "no vrf" command
2024-02-02 15:23:49 +02:00
Donatas Abraitis
4ec8522ed4
Merge pull request #15282 from donaldsharp/poll_info
lib: Warn operator when fd limit is set too large
2024-02-02 13:09:49 +02:00
Louis Scalbert
73f72c5266 lib: add ability to log from external pthread
External libraries can re-enter the FRR code through a hook function. A
crash occurs when logging from this hook function if the library has
initiated a new pthread, as the FRR RCU context is not initialized for
this thread.

Add frr_pthread_non_controlled_startup() function to initialize a valid
RCU context within a FRR pthread context, originating from an external
pthread.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-02 10:25:05 +01:00
Donald Sharp
d023a0ceec lib: Warn operator when fd limit is set too large
It's unlikely that an operator will ever set a fd
limit of over 100k.  Let's warn the operator that
things are in a bit of a wonky state.

Fixes: #15280
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-01 21:23:56 -05:00
Igor Ryzhov
75662912e3 lib: fix "no vrf" command
Remove operational data check from CLI command. It never works in mgmtd
and it is not needed in backend daemons because it's done in
`lib_vrf_destroy` callback.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-02 01:22:50 +02:00
Igor Ryzhov
cb781f6097 staticd: fix NB dependency hack
Currently, staticd configuration is tightly coupled with VRF existence.
Because of that, it has to use a hack in NB infrastructure to create a
VRF configuration when at least one static route is configured for this
VRF. This hack is incompatible with mgmtd, because mgmtd doesn't execute
configuration callbacks. Because of that, the configuration may become
out of sync between mgmtd and staticd. There are two main cases:

1. Create static route in a VRF. The VRF data node will be created
   automatically in staticd by the NB hack, but not in mgmtd.
2. Delete VRF which has some static routes configured. The static route
   configuration will be deleted from staticd by the NB hack, but not
   from mgmtd.

To fix the problem, decouple configuration of static routes from VRF
configuration. Now it is possible to configure static routes even if the
VRF doesn't exist yet. Once the VRF is created, staticd applies all the
preconfigured routes.

This change also fixes the problem with static routes being preserved in
the system when staticd "control-plane-protocol" container is deleted
but the VRF is still configured.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-02 00:57:59 +02:00
Donald Sharp
9d8fd14b56
Merge pull request #15276 from mjstapp/port_registry
*: create a single registry of daemons' default port values
2024-02-01 16:07:11 -05:00
Mark Stapp
72b31b96fc *: create a single registry of daemons' default port values
Create a single registry of default port values that daemons
are using. Most of these are vty ports, but there are some
others for features like ospfapi and zebra FPM.

Signed-off-by: Mark Stapp <mjs@labn.net>
2024-02-01 11:40:02 -05:00
Donald Sharp
a8e8f1bc72 lib: Reduce size of hash_bucket by 8 bytes
pahole reports that the hash_bucket has 2 4 byte holes
in the data structure.  Let's reorganize this a bit
and save 8 bytes per hash_bucket instance.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-01 07:53:31 -05:00
Igor Ryzhov
a2caf2b5e1
Merge pull request #15268 from LabNConsulting/chopps/quieter-code
lowercase and localize debug/err macros
2024-02-01 10:54:30 +02:00
Christian Hopps
e9fc85f421 mgmtd: convert MGMTD_FE_CLIENT_DBG() to debug_fe_client()
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-31 20:19:23 -05:00
Christian Hopps
21f3b4e5c5 mgmtd: convert MGMTD_BE_CLIENT_DBG() to debug_be_client()
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-31 20:19:23 -05:00
Igor Ryzhov
c19d0a5bf3 mgmtd: add our own format definitions for frontend messages
It allows people not familiar with libyang and FRR internals to use
mgmtd FE API by looking only at `mgmt_msg_native.h` header. We still use
the same values to avoid a lot of mapping code, and ensure that any
change doesn't slip unnoticed by using static asserts.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-31 02:20:13 +02:00
Igor Ryzhov
e13c590abe mgmtd: add ability to choose datastore to get data from
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-31 02:20:13 +02:00
Igor Ryzhov
4317c8ffa6 mgmtd: add support for with-defaults parameter to get-data
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-31 02:20:13 +02:00
Igor Ryzhov
642078de8e
Merge pull request #15254 from LabNConsulting/chopps/notifications
Add YANG notifications
2024-01-31 02:18:20 +02:00
Christian Hopps
1e884ba12f mgmtd: backend subscriptions to notifications
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-30 15:41:26 -05:00
Christian Hopps
25bb8b203c lib: mgmtd: add YANG notification support
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-30 04:57:10 -05:00
Mark Stapp
cad880c2df lib: init new bitfield word after realloc
Realloc doesn't init - ensure a newly-allocated word is inited.

Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-29 12:56:28 -05:00
Philippe Guibert
42c1652dcb lib,ospf6d: fix reference bandwidth description
Fix reference bandwidth description. It is Kbps, not Mbps.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-29 14:52:35 +01:00
Igor Ryzhov
15514b6d28 lib, mgmtd, zebra: cleanup of zebra conversion to mgmtd
- use `apply_finish` callback when possible to avoid multiple applies per commit
- move table range working to the CLI handler
- remove unnecessary conditional compilation
- remove unnecessary boolean conversion

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:46:38 +02:00
Igor Ryzhov
3900813298 zebra: convert to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
05948a4d98 lib: use shared candidate between vty and mgmtd client
When the daemon is partially mgmtd-converted, it receives configuration
from vty and mgmtmd simultaneosly. This configuration must be
synchronized.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
dc6ff4c0de lib: convert affinity-map to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
fe76036002 lib: fix yang_dnode_dup
When duplicating nodes, we should always keep flags, especially the
LYD_NEW flag that indicates not validated data. This allows to select a
new choice's case without the need to explicitly remove the existing one.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
741d1d0090 zebra: convert vrf configuration output to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
3625360d88 lib: add support for "features" when loading YANG modules
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov
a6db1c14a4 zebra: convert interface evpn mh es-id commands to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
Igor Ryzhov
be712fc697 zebra: convert interface link-params packet-loss command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
Igor Ryzhov
20fe60f40d lib: fix conversion of yang decimal64 to double
Current denominators are not integers and some of them lose precision
because of that, for example, 1e-6 is actually stored as
9.9999999999999995e-07 and 1-e12 is stored as 9.9999999999999998e-13.
When multiplying by such denominators, we receive incorrect values.
Changing denominators to integers and using division instead of
multiplication improves precision and solves the problem.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
Igor Ryzhov
93744dbe88 zebra: convert interface link-params bandwidth commands to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
Igor Ryzhov
e633296443 lib: don't set LP_EXTEND_ADM_GRP by default
It shouldn't be set unless some affinity is configured. NB callbacks
set this flag correctly when necessary.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
David Lamparter
bbd858935f build: homologize path handling
Use consistent `e_somepath` names for expanded versions of `somepath`.
Also remove all paths from `config.h` and put them into
`lib/config_paths.h` - this is to make more obvious when someone is
doing something probably not quite properly structured.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:02:52 +01:00
David Lamparter
bfd6d8ee19 lib, mgmtd: fix commit history location
Both of these belong in `/var/lib`, not `/var/run`.

Rather hilariously, the history read in
`mgmt_history_read_cmt_record_index` was always failing, because it was
doing a `file_exists(MGMTD_COMMIT_FILE_PATH)` check.  Which is the wrong
macro - it's `.../commit-%s.json`, including the unprocessed `%s`, which
would never exist.

I guess noone ever tried if this actually works.  Cool.

On the plus side, this means I don't have to implement legacy
compatibility for this, since it never worked to begin with.

(SQLite3 DB location is also changed in this commit since it also uses
`DAEMON_DB_DIR`.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:02:52 +01:00
David Lamparter
cd35ecc575 lib: create frr_daemon_state_{load,save}
These functions load daemon-specific persistent state from
`/var/lib/frr` and supersede open-coded variants of similar calls in
ospfd, ospf6d and isisd to save GR state and/or sequence numbers.

Unlike the open-coded variants, the save call correctly `fsync()`s the
saved data to ensure disk contents are consistent.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter
a97d0c5875 lib: set up frr_libstatedir
This needs to be used for persistent state, which currently is misplaced
into `/var/run` / `/run` where it gets deleted across reboots.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter
72783ecca2 build: nuke ZEBRA_SERV_PATH
This just unnecessarily complicates things by involving autoconf.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter
0d5a2497ca lib, mgmtd: fix wrong mgmtd socket paths
These paths were ignoring the `-N` namespacing option.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
David Lamparter
42eeea090e *: rename frr_vtydir to frr_runstatedir
Also remove frr_init_vtydir(), just initialize to default.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-27 19:01:19 +01:00
Christian Hopps
e6eec072ab ripngd: convert ripngd to mgmtd
- a couple small fixes for ripd conversion as well.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 17:40:55 -05:00
Igor Ryzhov
1254d5fc4e
Merge pull request #15220 from LabNConsulting/chopps/ripd-convert
ripd to mgmtd
2024-01-26 23:29:59 +02:00
Christian Hopps
83abe9c3cb ripd: ripd convert to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:46 -05:00
Igor Ryzhov
1bf395232d lib: fix removing access/prefix lists
CLI for access/prefix list removal was using `nb_cli_apply_changes`
multiple times in the same command. It's fine for regular daemons but
not for mgmtd. Refactor the code to apply changes only once.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-26 12:34:23 -05:00
Igor Ryzhov
e39b60bac1 lib: add yang function for counting data nodes
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-26 12:34:23 -05:00
Christian Hopps
63ca751c11 lib: convert filters to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:23 -05:00
Christian Hopps
dabc92de9e lib: convert route-map to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:23 -05:00
Donatas Abraitis
147f476fc1
Merge pull request #15221 from mjstapp/log_immed_config
lib: add log immediate-mode to running config output
2024-01-25 09:58:45 +02:00
Mark Stapp
2889d0e7a6 lib: add log immediate-mode to running config output
The immediate-mode config wasn't in the running config output;
add it.

Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-24 13:00:41 -05:00
Donald Sharp
c3a66e5082
Merge pull request #15173 from louis-6wind/nhrp-noarp
nhrpd: unset noarp flag using a zapi message
2024-01-24 10:53:29 -05:00
Donald Sharp
16406a31d3
Merge pull request #15196 from idryzhov/nb-leaf-list
lib: remove leaf-list xpath hack from northbound
2024-01-24 10:49:52 -05:00
Louis Scalbert
2ee43c873e lib,zebra: add zapi message to control noarp flag
Add a ZAPI message to control the setting of the IFF_NOARP flag.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-24 10:05:29 +01:00
Igor Ryzhov
a594cda8ce lib: remove leaf-list xpath hack from northbound
Currently, when editing a leaf-list, `nb_candidate_edit` expects to
receive it's xpath without a predicate and the value in a separate
argument, and then creates the full xpath. This hack is complicated,
because it depends on the operation and on the caller being a backend or
not. Instead, let's require to always include the predicate in a
leaf-list xpath. Update all the usages in the code accordingly.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-23 12:33:39 +02:00
Donatas Abraitis
92a56d2fa2
Merge pull request #15179 from donaldsharp/zebra_neigh_update
Zebra neigh update
2024-01-23 08:51:26 +02:00
Igor Ryzhov
6dbd2465e1 lib: add address-family-specific autocompletion for prefix-lists
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-22 23:20:31 +02:00
Igor Ryzhov
061c69f3f5 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>
2024-01-22 23:00:43 +02:00
Donald Sharp
a0d38a7ac6 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>
2024-01-22 12:14:59 -05:00
Donald Sharp
275edb5c16 *: 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>
2024-01-22 12:14:59 -05:00
Igor Ryzhov
22d1ad786f
Merge pull request #15185 from LabNConsulting/chopps/distlist
add northbound support to distribute-list code.
2024-01-22 16:52:45 +02:00
Donatas Abraitis
20ec72d7ca
Merge pull request #15052 from louis-6wind/rpki-vrf-92
bgpd: add VRF support to RPKI
2024-01-22 16:16:34 +02:00
Christian Hopps
a993b8e9bb lib: enable multiple instance support with distribute lists
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-22 11:32:29 +00:00
Christian Hopps
eba64f79cc lib: add northbound support to distribute-list code.
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-22 11:32:29 +00:00
Igor Ryzhov
8664dd9362
Merge pull request #15176 from LabNConsulting/chopps/mgmtd-northbound-fixes
Chopps/mgmtd northbound fixes
2024-01-22 12:48:15 +02:00
Christian Hopps
fa7ff16e2b 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>
2024-01-19 15:27:24 +00:00
Christian Hopps
9e34d817fc 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>
2024-01-19 15:27:24 +00:00
Christian Hopps
f05a4e3b57 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>
2024-01-19 15:25:57 +00:00
Christian Hopps
e37f18b780
Merge pull request #15175 from idryzhov/affinity-map-fixes 2024-01-19 08:40:09 -05:00
Donatas Abraitis
2844d093b5
Merge pull request #15168 from mjstapp/daemon_logs
lib,vtysh: add per-daemon log file config
2024-01-19 10:56:15 +02:00