Commit Graph

762 Commits

Author SHA1 Message Date
Christian Hopps
2596308a09 doc: configure: add configure option to generate .ccls file
`ccls` needs information from FRR build configuration to work,
so allow creation of a custom ccls config during autoconf.

Paraphrasing the doc entry: ccls is a very powerful tool that allows
dev environments to provide sophisticated IDE functionality, e.g.,
semantically aware jumps and code refactoring...

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-18 09:32:32 -04:00
Christian Hopps
6b7481aa8d lib: add build option to set startup log timestemp precision
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-04-29 02:36:06 -04:00
Donatas Abraitis
74675f8d44 build: Take LUA_LIBS from pkg-config
Alpine Linux has LUA_LIB with a broken path, let's use pkg-config to grab
the LUA_LIBS properly.

checking for library containing lua_load... no
configure: error: Lua 5.3 libraries are required to build with Lua support. No other version is supported.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-04-08 21:04:06 +03:00
Donatas Abraitis
c9bdc0c79e tools: Set correct directory of vtysh for frr-reload.py
Before it was setting SDIR, which is /usr/lib/frr, but the vtysh binary is put
under bindir (which is /usr/local by default). And running `/usr/lib/frr/frr reload`
failed.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-24 19:38:46 +02:00
Yash Ranjan
74335ceb27 mgmtd: Add MGMT Transaction Framework
This commit introduces the MGMT Transaction framework that takes
management requests from one (or more) frontend client sessions,
translates them into transactions and drives them to completion
in co-oridination with one (or more) backend client daemons
involved in the request.

This commit includes the following functionalities in the changeset:
1. Introduces the actual Transaction module. Commands added related to
   transaction are:
   a. show mgmt transaction all
2. Adds support for commit rollback feature which stores upto the 10
   commit buffers. Each commit has a commit-id which can be used to
   rollback to the exact configuration state.
   Commands supported for this feature are:
   a. show mgmt commit-history
   b. mgmt rollback commit-id COMMIT_ID
3. Add hidden commands to enable record various performance metrics:
   a. mgmt performance-measurement
   b. mgmt reset-statistic

Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2023-03-21 22:08:32 -04:00
Christian Hopps
1c84efe4fa mgmtd: Bringup MGMTD daemon and datastore module support
Features added in this commit:
1. Bringup/shutdown new management daemon 'mgmtd' along with FRR.
2. Support for Startup, Candidate and Running DBs.
3. Lock/Unlock DS feature using pthread lock.
4. Load config from a JSON file onto candidate DS.
5. Save config to a JSON file from running/candidate DS.
6. Dump candidate or running DS contents on the terminal or a file in
   JSON/XML format.
7. Maintaining commit history (Full rollback support to be added in
   future commits).
8. Addition of debug commands.

Co-authored-by: Yash Ranjan <ranjany@vmware.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
2023-03-21 22:08:32 -04:00
Donatas Abraitis
96475dfde9
Merge pull request #12707 from donaldsharp/missed_enums
Missed enums
2023-02-07 22:22:27 +02:00
Donatas Abraitis
16c38045b1 build: FRR 9.0 development version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-07 21:25:42 +02:00
Donald Sharp
57ba9e9d7c *: Add -Wswitch-enum to build
The -Wswitch-enum will allow the compiler to warn us
when a developer creates a switch over a enum and is
using `default:` when they should be iterating over
every enum

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-31 15:15:59 -05:00
David Lamparter
c2c6c55e8d build: enable format string warnings
I thought these were included in `-Wall -Wextra`, but apparently not.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-27 12:01:20 +01:00
David Lamparter
d9a2d546da build: pim6d is Linux only
This stops breaking build on FreeBSD.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-12-08 12:45:38 +01:00
Mark Stapp
cee45b84f4 build: enable pim6d by default
Change configure.ac so that pim6d is enabled by default; a
command-line option can disable it.

Signed-off-by: Mark Stapp <mjs@labn.net>
2022-12-01 13:57:46 -05:00
Donatas Abraitis
061f5d1cb4 lib: Add PCRE2 support
Some results:

```
====
PCRE
====
% ./a.out "^65001" "65001"
comparing: ^65001 / 65001

ret status: 0
[14:31] donatas-pc donatas /home/donatas
% ./a.out "^65001_" "65001"
comparing: ^65001_ / 65001

ret status: 0

=====
PCRE2
=====
% ./a.out "^65001" "65001"
comparing: ^65001 / 65001

ret status: 0
[14:30] donatas-pc donatas /home/donatas
% ./a.out "^65001_" "65001"
comparing: ^65001_ / 65001

ret status: 1
```

Seems that if using PCRE2, we need to escape outer `()` chars and `|`. Sounds
like a bug.
But this is only with some older PCRE2 versions. With >= 10.36, I wasn't able
to reproduce this, everything is fine and working as expected.

Adding _FRR_PCRE2_POSIX definition because pcre2posix.h does not have
include's guard.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-07 21:23:53 +02: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
Russ White
07735ca345
Merge pull request #11980 from isabelladeleon12/set_overload_startup
isisd: Add support for set-overload on-startup
2022-10-13 10:59:24 -04:00
Isabella de Leon
450841fe05 isisd: Add JSON object functions to save overload status between restarts.
Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-10-12 16:57:32 -07:00
Donatas Abraitis
b81570c690 build: FRR 8.5 development version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-10-04 21:33:18 +03:00
Khem Raj
9399d58c13 configure: Check for readline() function instead of main
main is not a function found in libreadline, its better to check for a
function thats provided by it.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-01 10:45:36 -07:00
Mobashshera Rasool
7e08c08069 pim6d: Disable pim6d compilation by default
By default, disable pim6d compilation. If someone
wants to enable the compilation, should use ./configure option
with --enable-pim6d.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-07 07:14:27 -07:00
Anuradha Karuppiah
fd03f1d4b7 configure, zebra: include DPDK headers and shared libs in the dp-dpdk build
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
   -> Moved new capabilities needed to under HAVE_DPDK
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-06-27 07:56:55 -04:00
Anuradha Karuppiah
36c3b29675 zebra: infastructure for the new dataplane plugin
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-06-27 07:56:55 -04:00
Donatas Abraitis
981b254297 lib: Require at least 2.1.42 version of sysrepo when compiling
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-06-09 18:03:22 +03:00
Donatas Abraitis
087350d968 build: FRR 8.4 development version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-06-07 22:47:17 +03:00
Pushpasis Sarkar
4d571bb3c4
Merge pull request #11158 from cyberstormdotmu/master
lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.
2022-06-07 21:05:03 +05:30
Loganaden Velvindron
04b4b595d3 lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.
explicit_bzero() is available as an API to clean up sensitive data
and avoid compiler optimizations that remove calls to memset() or bzero().

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
2022-05-31 18:00:18 +04:00
Donatas Abraitis
124bd0e1b2 configure: Require librtr >= 0.8.0
We ship 0.8.0 in our repos.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-10 09:48:30 +03:00
Donatas Abraitis
d6a4be826e configure: Drop trailing whitespaces
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-10 09:48:30 +03:00
Donald Sharp
a71e190d44
Merge pull request #10961 from opensourcerouting/build-ms-ext
build: enable `-fms-extensions`
2022-04-20 07:51:45 -04:00
Donald Sharp
485ac9a79b *: Fix spelling of neccessary
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:11:29 -04:00
David Lamparter
3f115705d3 build: enable -fms-extensions
This eases incorporating fields from/"subclassing" another struct.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-04 18:33:10 +02:00
David Lamparter
baad07c59d build: stick -g into LDFLAGS
Without `-g` in LDFLAGS we won't get debug info even if it's enabled in
CFLAGS.  Since we're controlling debug info through CFLAGS, there's no
harm in always having `-g` in LDFLAGS.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-31 17:35:32 +02:00
David Lamparter
bec667a6bc vtysh: show live log messages
https://www.youtube.com/watch?v=8psFQCEgA18

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-28 13:33:27 +01:00
David Lamparter
fe972cbfd4
Merge pull request #9947 from mjstapp/mpls_incoming 2022-02-26 16:47:08 +01:00
Mark Stapp
c9781f524c build: correct help output about netlink debug
The configure flag _disables_ netlink debug; make the help
text match that.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-02-25 09:53:02 -05:00
David Lamparter
a9338fa449 pim6d: IPv6-adjust mroute code
This is just hitting the pim_mroute code with a hammer until it doesn't
print warnings anymore.  This is NOT quite tested or working yet, it
just compiles.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-16 16:40:56 +01:00
Abhinay Ramesh
6cb85350df ospf6d: Stitching the auth trailer code with rest of ospf6.
Problem Statement:
==================
RFC 7166 support for OSPF6 in FRR code.

RCA:
====
This feature is newly supported in FRR

Fix:
====
Core functionality implemented in previous commit is
stitched with rest of ospf6 code as part of this commit.

Risk:
=====
Low risk

Tests Executed:
===============
Have executed the combination of commands.

Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2022-02-09 01:57:08 +00:00
Donald Sharp
b564209367
Merge pull request #8458 from opensourcerouting/xref-5424
lib: RFC5424 syslog support
2022-02-08 15:56:20 -05:00
Donatas Abraitis
23ad8186e5 build: FRR 8.3 development version
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-01 11:02:03 +02:00
David Lamparter
d948c317c5 build: check for sendmmsg() and struct mmsghdr
These will be used by the RFC5424 log target.

Signed-off-by: David Lamparter <equinox@diac24.net>
2022-01-17 00:38:56 +01:00
anlan_cs
fc539216ce build: add "--with-service-timeout" in configure.ac
On lower CPU with lots of static routes, it will cost more than 2
minutes.

2 minutes is the default timeout value, we can adjust it by configure:
./configure --with-service-timeout=<digit>

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2022-01-06 07:42:36 -05:00
Fabrice Fontaine
bacabf2476 configure.ac: fix enable_bmp typo
enable_bmp doesn't exist, use enable_bgp_bmp

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-12-16 23:23:43 +01:00
Fabrice Fontaine
c919fce32d configure.ac: drop --enable-pcep option and HAVE_PATHD_PCEP
Drop --enable-pcep option and HAVE_PATHD_PCEP which does nothing since
749714731e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-12-15 16:51:33 +01:00
Quentin Young
23b2f11a47
Merge pull request #9798 from abuibrahim/master
fix broken northbound confd
2021-11-30 00:17:28 -05:00
Ruslan Babayev
688c536fb3 yang: confd: compile yang modules to fxs
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2021-11-11 23:05:46 -08:00
David Lamparter
3bd7df45a2 build: link libcrypt & libdl to libfrr only
They're not needed elsewhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-11 15:29:48 +01:00
David Lamparter
53c6125b9f build: link libelf to clippy only
It's not needed elsewhere & generates a bogus dependency.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-11 15:29:30 +01:00
David Lamparter
0198bd1fbb build: fix more libtool stupidity for modules
libtool, the radioactive dumpster fire of the GNU ecosystem.

A module should not have a SONAME set.  SONAMEs are for (versioned)
libraries on search paths.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-11 14:40:03 +01:00
David Lamparter
5b21845971 build: adjust compiler/C11 bits for autoconf 2.70+
`autoconf` finally arrived in the 2010s and tries to do ISO C11.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-11 12:18:44 +01:00
David Lamparter
6125c10c29 build: work around AC_PROG_LEX deprecation warning
`AC_PROG_LEX without either yywrap or noyywrap is obsolete`, says
autoconf 2.70.  Sadly, there is no transition window for this, in 2.69
the macro takes no arguments.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-11 11:58:50 +01:00
Donald Sharp
7f39a26c77 *: If building clippy we must have python3
When building clippy we must have python 3.  Let's
ensure that we test for it and stop the auto-make
if it is not installed on the system.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-12 15:41:07 -04:00