Commit Graph

765 Commits

Author SHA1 Message Date
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
David Lamparter
6ea3c091ed build: bump configure.ac to 8.2-dev
[needs to happen ASAP to make sure we're not building confusing
packages.]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-10-06 18:20:52 +02:00
Donatas Abraitis
d03c8a8e06 tools: Require a lower LTTng version to compile
Debian 9 has 2.9.x, only Ubuntu >= 18 has 2.10.x.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-23 20:00:53 +03:00
Russ White
ca45d9e5bf
Merge pull request #8985 from opensourcerouting/ospf6d-gr
ospf6d: introduce support for Graceful Restart (restarting mode)
2021-09-17 12:22:07 -04:00
Renato Westphal
7116509803 ospf6d: introduce support for Graceful Restart (restarting mode)
RFC 5187 specifies the Graceful Restart enhancement to the OSPFv3
routing protocol. This commit implements support for the GR
restarting mode.

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ipv6
  ospf` EXEC-level command needs to be issued before restarting the
  ospf6d daemon (there's no specific requirement on how the daemon
  should be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospf6d is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-09-16 12:26:48 -03:00
Anuradha Karuppiah
1bea8eacb3 build: change the lttng version requirements in frr
Lower the version requirements from 2.12 to 2.10

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-09-15 11:21:22 -07:00
David Lamparter
2554d1265c build: make sed calls portable
The `-i` option on sed isn't standard, and e.g. FreeBSD sed behaves
different regarding the parameter.  Avoid it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
09e33fbe6b build: enable -Wstrict-prototypes
All fixed up, so we can enable this now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
81aff2127f build: use --coverage for gcov
libtool does not understand `-coverage` with a single dash.  Official
gcc docs also say `--coverage` rather than `-coverage`.  (clang lists
both.)

Also, for correct linking, libtool needs `--coverage` in LDFLAGS as
opposed to `-lgcov` (with the latter you get library ordering/deps
issues)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-07-21 17:12:02 +02:00
David Lamparter
63116a7008 build: fix AM_LDFLAGS usage (and gcov)
like the other automake variables, setting `xyz_LDFLAGS` causes
`AM_LDFLAGS` to be ignored for `xyz`.  For some reason I had in my mind
that automake doesn't do this for LDFLAGS, but... it does.  (Which is
consistent with `_CFLAGS` and co.)

So, all the libraries and modules have been ignoring `AM_LDFLAGS` (which
includes `SAN_FLAGS` too).  Set up new `LIB_LDFLAGS` and
`MODULE_LDFLAGS` to handle all of this correctly (and move these bits to
a central location.)

Fixes: #9034
Fixes: 0c4285d77e ("build: properly split CFLAGS from AC_CFLAGS")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-07-21 17:10:08 +02:00
Colin Sames
3f70087c2a configure.ac: fix help text to --enable-undefined-sanitizer
Signed-off-by: Colin Sames <colin.sames@haw-hamburg.de>
2021-07-15 19:18:02 +02:00
Russ White
000df71ccd
Merge pull request #8767 from opensourcerouting/ospfd-gr
ospfd: introduce support for Graceful Restart (restarting mode)
2021-07-13 06:39:53 -04:00
Quentin Young
e15106149f
Merge pull request #8508 from opensourcerouting/systemd-no-lib 2021-07-06 14:54:25 +00:00
Renato Westphal
1051417011 ospfd: introduce support for Graceful Restart (restarting mode)
RFC 3623 specifies the Graceful Restart enhancement to the OSPF
routing protocol. This PR implements support for the restarting mode,
whereas the helper mode was implemented by #6811.

This work is based on #6782, which implemented the pre-restart part
and settled the foundations for the post-restart part (behavioral
changes, GR exit conditions, and on-exit actions).

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ospf`
  EXEC-level command needs to be issued before restarting the ospfd
  daemon (there's no specific requirement on how the daemon should
  be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospfd is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-07-05 11:43:02 -03:00
Quentin Young
71bae95e4a
Merge pull request #8888 from dlqs/lua-call 2021-07-05 04:13:20 +00:00
Ondřej Surý
06417e9f18 debian: Remove the changelog-auto automation in favor of dch
Signed-off-by: Ondřej Surý <ondrej@sury.org>
2021-07-03 17:02:37 +02:00
Ondřej Surý
25785834af debian: Adjust tarsource.sh to use native debian/changelog
Signed-off-by: Ondřej Surý <ondrej@sury.org>
2021-07-03 17:02:37 +02:00
David Lamparter
ab140d61cd build, doc: extricate --enable-systemd
Ouch, that is a *lot* of places to update...

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-29 17:57:09 +02:00
Donald Lee
555f7625a8 tests: put lua scripting unit tests behind flag
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-06-25 17:29:15 +08:00
David Lamparter
6418e2d342 lib: try CLOCK_THREAD_CPUTIME_ID
This might be faster if at some point in the future the Linux vDSO
supports CLOCK_THREAD_CPUTIME_ID without making a syscall.  (Same
applies for other OSes.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:59 +02:00
David Lamparter
45f0118832 lib: make cputime checks runtime options (v2)
...really no reason to force this into a compile time decision.  The
only point is avoiding the getrusage() syscall, which can easily be a
runtime decision.

[v2: also split cputime & walltime limits]

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:59 +02:00
David Lamparter
94a64dab86 build: remove unused --disable-rusage
This option does literally nothing.  Not sure since when, but the value
is not used anywhere at all.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:58 +02:00
David Lamparter
2ee5fdba02 build: remove --enable-exampledir
This is no longer used with the recent config example removal.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:58 +02:00
Christian Hopps
b256a06b22 grpc: improve checks for GRPC C++ requirements
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-27 12:04:33 +00:00
Quentin Young
f4db21a5fb
Merge pull request #8707 from LabNConsulting/chopps/improve-grpc-req-checks 2021-05-26 20:11:53 +00:00
Christian Hopps
41b7a9898d grpc: improve checks for GRPC C++ requirements
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-22 00:01:06 +00:00
Mark Stapp
1c35c57c96 build: display Werror in configure output if configured
Include -Werror with the listing of compiler flags.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-05-20 15:30:26 -04:00
Donald Sharp
11d557869c build: Update configure.ac to reflect new master version
That we are building towards.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-18 14:41:39 -04:00
Christian Hopps
3bb513c399 lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang

staticd init load time of 10k routes now 6s vs ly1 time of 150s

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-13 16:24:48 -04:00
Donald Sharp
6b334023f7 build: Limit libyang version to under 2.0
Ensure that master is not built with libyang version 2 or greater
since we'll fail.

Fixes: #8524
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-01 18:38:26 -04:00
David Lamparter
f1d85301f3 build: fix pthread CFLAGS for function checks
The pthread_* checks for extra pthread features really need
PTHREAD_CFLAGS...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-27 15:11:33 +02:00
David Lamparter
1b636c0ad4 build: run autoupdate
AC_TRY_COMPILE is deprecated too.  Also configure.ac isn't executable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:37 +02:00
David Lamparter
19083e4f75 build: remove deprecated AC_WORDS_BIGENDIAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:37 +02:00
David Lamparter
8b11dfcaec build: use AC_CONFIG_AUX_DIR
aka the "put shit into a subdirectory" option

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:36 +02:00
David Lamparter
0c4285d77e build: properly split CFLAGS from AC_CFLAGS
`CFLAGS` is a "user variable", not intended to be controlled by
configure itself.  Let's put all the "important" stuff in AC_CFLAGS and
only leave debug/optimization controls in CFLAGS.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:36 +02:00
David Lamparter
817f39203c
Merge pull request #8318 from qlyoung/improve-lua-autoconf-detection
configure.ac: better lua detection
2021-03-24 15:05:01 +01:00
Quentin Young
428df07cd5 configure.ac: better lua detection
Make sure to constrain the Lua autoconf search to
Lua 5.3 interpreter and libraries.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-03-23 19:20:38 +00:00
Mark Stapp
f0812f010e build: add -ggdb3 to dev build
Add a little more gdb-specific debugging info for dev builds.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-19 08:20:54 -04:00
Donald Sharp
3406c16cbe
Merge pull request #7963 from volta-networks/feat_pceplib_into_frr_github
pceplib: Integrate pcelib into frr
2021-03-16 14:03:34 -04:00
Javier Garcia
749714731e pceplib: Integrate pcelib into frr
Signed-off-by: Brady Johnson <brady@voltanet.io>
Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-03-05 12:12:47 +01:00
David Lamparter
5609b3af49 lib/clippy: add libelf wrapper
This adds _clippy.ELFFile, which provides a fast wrapper around libelf.
The API is similar to / a subset of pyelfutils, which unfortunately is
painfully slow (to the tune of minutes instead of seconds.)

The idea is that xrefs can be read out of ELF files by reading out the
"xref_array" section or "FRRouting/XREF" note.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
Mark Stapp
4e90d19ea3 build: detect ICC, only try ICC options if ICC
Some ICC command-line options can cause confusion for other
compilers; test for ICC specifically, and only try to use those
options if ICC is being used.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-15 13:59:02 -05:00
Quentin Young
51ab4dbaad lib: support mallinfo2()
mallinfo() is deprecated as of glibc 2.33 and emits a warning if used.
Support mallinfo2() if available.

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
2021-02-10 18:35:15 -05:00
David Lamparter
8e427c2938 lib: "xref" identifier infrastructure
This adds the machinery for cross reference points (hence "xref") for
things to be annotated with source code location or other metadata
and/or to be uniquely identified and found at runtime or by dissecting
executable files.

The extraction tool to walk down an ELF file is done and working but
needs some more cleanup and will be added in a separate commit.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-01 17:18:02 +01:00
Donald Sharp
776a2f8666 *: Update version string
Update the version string to reflect work towards next release

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-27 15:32:52 -05:00
Donald Sharp
6df6d7bdf1
Merge pull request #7368 from eololab/add-pidfile-in-frr.service
tools: add PIDFile option in frr.service
2021-01-26 13:29:26 -05:00
Russ White
c0b6ef23f7
Merge pull request #7639 from qlyoung/frr-lua
Scripting
2021-01-19 07:17:03 -05:00
Bo Zhang
9a3b4141db configure.ac: Correct library name for sysrepo
Northbound_sysrepo: Correct sysrepo library name in configure.ac

Signed-off-by: Bo Zhang <logbob0401@gmail.com>
2021-01-15 22:09:27 -08:00
Sebastien Merle
efba0985fc pathd: Add optional support for PCEP to pathd
This new dynamic module makes pathd behave as a PCC for dynamic candidate path
using the external library pcpelib https://github.com/volta-networks/pceplib .

The candidate paths defined as dynamic will trigger computation requests to the
configured PCE, and the PCE response will be used to update the policy.

It supports multiple PCE. The one with smaller precedence will be elected
as the master PCE, and only if the connection repeatedly fails, the PCC will
switch to another PCE.

Example of configuration:

segment-routing
 traffic-eng
  pcep
   pce-config CONF
    source-address ip 10.10.10.10
    sr-draft07
   !
   pce PCE1
    config CONF
    address ip 1.1.1.1
   !
   pce PCE2
    config CONF
    address ip 2.2.2.2
   !
   pcc
    peer PCE1 precedence 10
    peer PCE2 precedence 20
   !
  !
 !
!

Co-authored-by: Brady Johnson <brady@voltanet.io>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-12-18 16:47:52 +01:00
Sebastien Merle
4d7b695d3a pathd: New SR-TE policy management daemon
This new daemon manages Segment-Routing Traffic-Engineering
(SR-TE) Policies and installs them into zebra. It provides
the usual yang support and vtysh commands to define or change
SR-TE Policies.

In a nutshell SR-TE Policies provide the possibility to steer
traffic through a (possibly dynamic) list of Segment Routing
segments to the endpoint of the policy. This list of segments
is part of a Candidate Path which again belongs to the SR-TE
Policy. SR-TE Policies are uniquely identified by their color
and endpoint. The color can be used to e.g. match BGP
communities on incoming traffic.

There can be multiple Candidate Paths for a single
policy, the active Candidate Path is chosen according to
certain conditions of which the most important is its
preference. Candidate Paths can be explicit (fixed list of
segments) or dynamic (list of segment comes from e.g. PCEP, see
below).

Configuration example:

segment-routing
 traffic-eng
  segment-list SL
   index 10 mpls label 1111
   index 20 mpls label 2222
  !
  policy color 4 endpoint 10.10.10.4
   name POL4
   binding-sid 104
   candidate-path preference 100 name exp explicit segment-list SL
   candidate-path preference 200 name dyn dynamic
  !
 !
!

There is an important connection between dynamic Candidate
Paths and the overall topic of Path Computation. Later on for
pathd a dynamic module will be introduced that is capable
of communicating via the PCEP protocol with a PCE (Path
Computation Element) which again is capable of calculating
paths according to its local TED (Traffic Engineering Database).
This dynamic module will be able to inject the mentioned
dynamic Candidate Paths into pathd based on calculated paths
from a PCE.

https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-12-18 16:34:02 +01:00
Stephen Worley
3bece1e0e3
Merge pull request #7162 from opensourcerouting/zebra-human-netlink
zebra: human readable netlink dumps
2020-12-14 14:03:35 -05:00
Quentin Young
c4db9bfaaf build: fix default scriptdir path
Should be /etc/frr/scripts, not /usr/lib/frr/scripts :)

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-12-01 18:42:24 -05:00
Quentin Young
e4e0229aba lib: add support for scripts directory
Specify default via --with-scriptdir at compile time, override default
with --scriptdir at runtime. If unspecified, it's {sysconfdir}/scripts
(usually /etc/frr/scripts)

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-12-01 18:37:14 -05:00
Quentin Young
fa22080d22 build: HAVE_LUA -> HAVE_SCRIPTING
And also guard all scripting-related stuff with HAVE_SCRIPTING.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-12-01 18:37:14 -05:00
Quentin Young
2784d2c7d2
Merge pull request #7475 from eololab/add-more-parameters-for-crosscompilation
build: add more precious variables for cross-compilation
2020-11-24 11:44:29 -05:00
Quentin Young
439be082d3 Revert "debian: Adjust tarsource.sh to use native debian/changelog"
This reverts commit 4ffb9a4c9d.
2020-11-19 17:12:41 -05:00
Quentin Young
fb0b3592ca Revert "debian: Remove the changelog-auto automation in favor of dch"
This reverts commit cace1d9bf1.
2020-11-19 17:12:40 -05:00
Ondřej Surý
cace1d9bf1 debian: Remove the changelog-auto automation in favor of dch
Signed-off-by: Ondřej Surý <ondrej@sury.org>
2020-11-19 21:30:06 +01:00
Ondřej Surý
4ffb9a4c9d debian: Adjust tarsource.sh to use native debian/changelog
Signed-off-by: Ondřej Surý <ondrej@sury.org>
2020-11-19 21:29:59 +01:00
Donald Sharp
d377cf01e7
Merge pull request #7210 from idryzhov/route-types-disable-daemon
lib: respect --disable-daemon flags in route_types.h
2020-11-18 19:38:14 -05:00
Emanuele Bovisio
20fdd70fd0 build: add more precious variables for cross-compilation
Using AC_ARG_VAR function, it's possible to add LD, AR, OBJCOPY,
OBJDUMP, RANLIB and STRIP to the list of precious variables in
$ac_precious_vars for configure tool.

Doing this, we are enabling a new set of variables (HOST_LD, HOST_AR,
HOST_OBJCOPY, HOST_OBJDUMP, HOST_RANLIB and HOST_STRIP) useful for
cross-compiling when the target toolchain is prepending a prefix
to these tools.

Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
2020-11-06 17:42:40 +01:00
Emanuele Bovisio
566397ba65 tools: add PIDFile option in frr.service
when type is forking, it is recommended to also use the PIDFile= option,
so that systemd can reliably identify the main process of the service.

Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
2020-10-30 16:33:20 +01:00
Donald Sharp
215a213d3f
Merge pull request #7366 from eololab/add-disable-rpath-option-in-configure
build: add --disable-rpath option in configure
2020-10-27 20:20:24 -04:00
Quentin Young
552e2a306a lib: add trace.h, frrtrace(), support for USDT
Previous commits added LTTng tracepoints. This was primarily for testing
/ trial purposes; in practice we'd like to support arbitrary tracing
methods, and especially USDT probes, which SystemTap and dtrace expect,
and which are supported on at least one flavor of BSD (FreeBSD).

To that end this patch adds an frr-specific tracing macro, frrtrace(),
which proxies into either DTRACE_PROBEn() or tracepoint() macros
depending on whether --enable-usdt or --enable-lttng is passed at
compile time.

At some point this could be tweaked to allow compiling in both types of
probes. Ideally there should be some logic there to use LTTng's optional
support for generating USDT probes when both are requested.

No additional libraries are required to use USDT, since these probes are
a kernel feature and only need the <sys/sdt.h> header.

- add --enable-usdt to toggle use of LTTng tracepoints or USDT probes
- add new trace.h library header for use with tracepoint definition
  headers
- add frrtrace() wrapper macro; this should be used to define
  tracepoints instead of using tracepoint() or DTRACE_PROBEn()

Compilation with USDT does nothing as of this commit; the existing LTTng
tracepoints need to be converted to use the frrtrace*() macros in a
subsequent commit.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-23 15:13:51 -04:00
Quentin Young
0cbcadccf7 lib, configure.ac: initial LTTng support
This commit adds initial support for LTTng.

When --enable-lttng=no or is not specified, no tracing code is included.
When --enable-lttng=yes, LTTng tracing events are (will be) generated.

configure.ac:
- add --enable-lttng
- define HAVE_LTTNG when enabled
- minimum LTTng version: 2.12.0

lib:
- add trace.[ch]
- update subdir.am

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-23 15:13:51 -04:00
Emanuele Bovisio
7134d0e9b2 build: add --disable-rpath option in configure
Add an option to remove RPATH entry from binary files.
Useful for cross-compilation, otherwise libtool hardcodes
the building path.

Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
2020-10-23 10:00:08 +02:00
Zoran Pericic
354196c027 nhrp: Make vici socket path configurable
nhrp: Configure vici socket path using

configure --with-vici-socket=/var/run/charon.vici

If not specified default to /var/run/charon.vici

Signed-off-by: Zoran Peričić <zpericic@netst.org>
2020-10-12 19:34:53 +02:00
Igor Ryzhov
b3b4dfa5ae lib: respect --disable-daemon flags in route_types.h
* remove pre-generation of route_types.h from configure

  This change is a partial revert of commit 306ed6816. This is a little
  drawback, but at least "make lib/libfrr.la", mentioned in the commit,
  still works because route_types.h is forced to be built in f1b32b2e5.

* add "enabled" field to route_types.txt to track which daemon should
  be enabled to add the routing protocol to "show ip route" header and
  to redistribution list

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 12:59:46 +03:00
Igor Ryzhov
0eb5751da9 vtysh: respect --disable-daemon configure flags
Don't install nodes for daemons that are disabled by configure flags.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-09-29 14:03:57 +03:00
Igor Ryzhov
80525224c3 build: remove redundant commas
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-09-27 19:22:02 +03:00
Rafael Zalamena
eead0bc46b zebra: human readable netlink dumps
Add new compile option to enable human readable netlink dumps with
`debug zebra kernel msgdump`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-09-23 23:07:02 -03:00
Donald Sharp
32d9e333b7 doc: Update Documentation to note Solaris Unsupported status
With the change of Solaris going from Supported -> UnSupported
the documentation needed to be updated to reflect the reality
on the ground.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-21 10:02:20 -04:00
Donald Sharp
cae8bc967c *: Remove solaris from FRR
The Solaris code has gone through a deprecation cycle.  No-one
has said anything to us and worse of all we don't have any test
systems running Solaris to know if we are making changes that
are breaking on Solaris.  Remove it from the system so
we can clean up a bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-21 10:02:20 -04:00
Donald Sharp
c8a3405af8 *: Update version string
Update the version string to reflect work towards next release

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-09 10:10:54 -04:00
Donald Sharp
9dc0503345
Merge pull request #6376 from opensourcerouting/bump-libyang-req-version-1.x
build, yang: bump libyang minimum required version to 1.0.184
2020-09-08 12:06:10 -04:00
Jakub Urbańczyk
4efd721d1e zebra: remove fuzzing stuff
The fuzzing code that is in the master branch is outdated and unused, so it
is worth to remove it to improve readablity of the code.

All the code related to the fuzzing is in the `fuzz` branch.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-25 17:31:07 +02:00
Renato Westphal
240b7826f6 build, yang: bump libyang minimum required version to 1.0.184
It's time to say good bye to libyang 0.16.105. The recently
released libyang 1.0.184 includes numerous bug fixes and performance
improvements that we need.

Despite the major version bump from 0.x to 1.x, the libyang API is
the same except for a single backward-incompatible change in the
user types interface (which we're currently not using). Hence no
code changes were necessary to adapt FRR to libyang 1.x.

This commit also reintroduces some leafrefs that needed to be
removed from our YANG modules due to a bug that was present on
libyang 0.16.105.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-07 14:07:46 -03:00
Jafar Al-Gharaibeh
e063f27136 build: Allow removal of build configs from version string
A new config option `--disable-version-build-config`
allows you to show short version string by dropping
"configured with:" and all of its build configs

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2020-06-19 11:15:43 -05:00
David Lamparter
5c90637711 build: use configfile mode in init script
This only applies for split-config;  the init script would create an
empty config file with default permissions.

Reported-by: Robert Scheck <robert@fedoraproject.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-05-11 21:50:27 +02:00
Donald Sharp
f3a9e1ab65 *: Update version string
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-11 08:04:15 -04:00
David Lamparter
209135f188 build: silence idiotic libtool warnings
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-27 10:02:11 +02:00
David Lamparter
94cfb0692e build: make clippy Makefile rules nicer
These are easy to get subtly wrong, and doing so can cause
nondeterministic failures when racing in parallel builds.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-27 09:52:41 +02:00
Santosh P K
09133ff4f7
Merge pull request #5451 from opensourcerouting/rcu-log
logging subsystem rewrite
2020-04-16 20:23:44 +05:30
David Lamparter
4c015942b1 build: fix git detection for worktrees
When using additional git worktrees, .git is not a directory.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-08 16:30:12 +02:00
David Lamparter
0bdeb5e58d lib: rewrite zlog lock-free & TLS-buffered
This is a full rewrite of the "back end" logging code.  It now uses a
lock-free list to iterate over logging targets, and the targets
themselves are as lock-free as possible.  (syslog() may have a hidden
internal mutex in the C library;  the file/fd targets use a single
write() call which should ensure atomicity kernel-side.)

Note that some functionality is lost in this patch:
- Solaris printstack() backtraces are ditched (unlikely to come back)
- the `log-filter` machinery is gone (re-added in followup commit)
- `terminal monitor` is temporarily stubbed out.  The old code had a
  race condition with VTYs going away.  It'll likely come back rewritten
  and with vtysh support.
- The `zebra_ext_log` hook is gone.  Instead, it's now much easier to
  add a "proper" logging target.

v2: TLS buffer to get some actual performance

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-01 06:53:26 +02:00
Ruben Kerkhof
5fa861b052 build: enable -Wundef warnings
Now that we've fixed all of them, enable them by default if the compiler
supports it.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-30 11:22:58 +02:00
David Lamparter
ac92fc9e9f build: gcc -fplugin=frr-format support
Try to find the plugin and add it to CFLAGS if successful.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-03-29 10:45:46 +02:00
David Lamparter
aef4a13f4f sharpd: add "logpump" to bulk test logging
This just generates log messages in bulk for testing logging backend
performance.  It's in sharpd so the full "context" of being in a daemon
is available (e.g. different logging configs, parallel load in the main
thread.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-03-24 15:58:36 +01:00
Ruben Kerkhof
87559aa474 build: disable pimd on MacOS
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-20 15:20:29 +01:00
Ruben Kerkhof
0476fdad7a build: really disable pimd on OpenBSD
For some reason the check did not work

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-18 17:51:18 +01:00
Mark Stapp
3fa94379a7 build: disable VRRPD if not linux
Only allow configure to try to build VRRPD on linux; other
platforms disable it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-03-18 08:26:31 -04:00
Ruben Kerkhof
f616c954f8 build: no need for braces in variables
If the variable is the only word between quotes, there's no need to use
braces.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 12:30:47 +01:00
Ruben Kerkhof
31d7b6daee build: no need to compare with "x"
As long as the arguments of the test are quoted,
modern shells handle it just fine.

A bunch of the tests already did this, convert the rest.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 12:09:13 +01:00
Ruben Kerkhof
7075f6a058 build: quote the right hand side of tests too
For consistency

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 11:53:15 +01:00
Ruben Kerkhof
9377fc4f5d build: always quote variables in tests
If they are not defined, ./configure will throw hard to debug errors
like:
./configure: line 1678: test: =: unary operator expected

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 11:27:04 +01:00
Ruben Kerkhof
7cda3a87d1 build: fix building with -Werror=undef
In the unlikely event you are building with -Werror=undef, several
configure checks fail. Fix those.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-10 16:27:50 +01:00
Donald Sharp
e2b26a4d4e configure: Fixup --disable-irdp option to reflect reality
The help text was not properly setup for `--disable-irdp` fix
it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-16 14:39:49 -05:00
David Lamparter
d60693fdf8 build: accept libunwind without pkg-config
NetBSD installs LLVM's libunwind without a pkg-config file, but it
works perfectly fine.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-01-17 15:50:50 +01:00