Commit Graph

17 Commits

Author SHA1 Message Date
David Lamparter
1530a35423 vtysh: fix find and list commands
I simply missed that `node->cmd_vector` is needed for `find` and `list`
to work correctly.

Fixes: #17043
Fixes: 4bc41193e8 ("vtysh, lib: preprocess CLI graphs")
Reported-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-10-22 20:43:59 +02:00
David Lamparter
4bc41193e8 vtysh, lib: preprocess CLI graphs
Store a parsed and built graph of the CLI nodes in vtysh, rather than
parsing and building that graph every time vtysh starts up.

This provides a 3x to 5x reduction in vtysh startup overhead:

`vtysh -c 'configure' -c 'interface lo' -c 'do show version'`

- before: 92.9M cycles, 1114 samples
- after: 16.5M cycles, 330 samples

This improvement is particularly visible for users scripting `vtysh -c`
calls, which notably includes topotests.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-07-31 08:08:53 -04:00
Donald Sharp
73ad64a6f4 *: Modify agentx to be allowed to be called
If you had a situation where an operator turned on
ospfd with snmp but not ospf6d and agentx was configured
then you get into a situation where ospf6d would complain
that the config for agentx did not exist.  Let's modify
the code to allow this situation to happen.

Fixes: #15896
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-10 10:16:29 -04:00
Christian Hopps
4caffbda8e lib: add keychain northbound support
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-04 20:00:15 -05:00
Igor Ryzhov
42d6b864cd build: remove mgmtd exception from xref2vtysh
We may actually need to send CLI commands to mgmtd and another daemon at
the same time, for example, if this daemon is not mgmtd-converted. The
only daemon this exception protects is staticd. But we don't actually
need any configuration commands in staticd, so just remove the exception
and don't install unnecessary commands to staticd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02: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
Christian Hopps
83abe9c3cb ripd: ripd convert to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-26 12:34:46 -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
Christian Hopps
ef91d34f01 zebra: add zebra to mgmtd oper-state
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28 17:53:40 +00:00
Mahdi Varasteh
f5011cd5dd [ospfd]: add support for RFC 5709 HMAC-SHA Auth
This patch includes:
* Implementation of RFC 5709 support in OSPF. Using
openssl library and FRR key-chain,
one can use SHA1, SHA256, SHA384, SHA512 and
keyed-MD5( backward compatibility with RFC 2328) HMAC algs.
* Updating documentation of OSPF
* add topotests for new HMAC algorithms

Signed-off-by: Mahdi Varasteh <varasteh@amnesh.ir>
2023-09-16 07:38:23 +03:30
Christian Hopps
cfa0facbf9 mgmtd: fully implement debug flags for mgmtd and clients
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-01 13:47:12 -04:00
Donald Sharp
cb37cb336a *: Rename thread.[ch] to event.[ch]
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.

In this commit rename the thread.[ch] files to event.[ch].

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:16 -04:00
Christian Hopps
fc52ca1e18 mgmtd: nb library for client front-end code
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-03-21 22:08:32 -04:00
David Lamparter
acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
David Lamparter
3dd40da369 python: fix for old (< 3.6) Python versions
Sigh.  No type annotations, no f-strings.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26 17:12:34 +01:00
David Lamparter
89cb86aeb0 build, vtysh: extract vtysh commands from .xref
Rather than running selected source files through the preprocessor and a
bunch of perl regex'ing to get the list of all DEFUNs, use the data
collected in frr.xref.

This not only eliminates issues we've been having with preprocessor
failures due to nonexistent header files, but is also much faster.
Where extract.pl would take 5s, this now finishes in 0.2s.  And since
this is a non-parallelizable build step towards the end of the build
(dependent on a lot of other things being done already), the speedup is
actually noticeable.

Also files containing CLI no longer need to be listed in `vtysh_scan`
since the .xref data covers everything.  `#ifndef VTYSH_EXTRACT_PL`
checks are equally obsolete.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26 17:12:34 +01:00