Commit Graph

796 Commits

Author SHA1 Message Date
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
David Lamparter
9c1be10509 build: fix shell == mis-use
The "test" program uses =, not ==.  A lot of shells accept == as an
extension, but not all do and it's technically out of spec.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-01-17 13:53:59 +01:00
Quentin Young
b4fd9ea7f0 configure.ac: add --enable-clang-coverage
Like gcov but better!
Also has a driveby fix for --enable-dev-build being mutually exclusive
with --enable-gcov...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-01-16 16:26:22 -05:00
Donald Sharp
26c4ab2f43 *: Modify version number of build
With the pull of the 7.3 stabilization branch, update the
version number we will auto generate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-01-14 08:21:57 -05:00
Quentin Young
982187afb5 configure.ac: make msan & ubsan flags additive
These were setting = SAN_FLAGS, we want to add to the variable. Note
MSAN can't be used with any other sanitizer (except UBSan) but the
compiler will complain about that if you use it wrong so we don't need
to enforce it here.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-01-03 15:03:37 -05:00
Quentin Young
0beeb6760b configure.ac: add --enable-undefined-sanitizer
For UBSan

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-01-01 21:09:35 -05:00
Donald Sharp
fd193241e9 zebra: Do not build mlag protobuf support if version 3 is not avail
Older versions of protobuf-c do not support version 3 of the
protocol.  Add a check into the system to see if we have
version 3 available and if so, compile it in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-12-15 09:37:51 -05:00
David Lamparter
d621815a0e zebra: create zebra_cumulus_mlag module
This is pretty much just to get rid of the HAVE_CUMULUS.  The
hook/module API is as "wtf" as it was before...

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-11 11:40:47 +01:00
David Lamparter
684959068c build: apply DFLT_NAME/profiles in init script
Hopefully at some point we can get rid of the --enable-datacenter switch
and just have the init script do magic.  Should already work for Cumulus
as it is.

NB: the profile name can't be baked into the package.  The whole point
is to make the package profile-agnostic;  in theory at some point the
exact same package files should work on both, say, a Cumulus switch and
a Linux software BGP DFZ router.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06 15:13:32 +01:00
Donald Sharp
f75e802d8a *: Allow disabling of getrusage calls
getrusage, in a heavily stressed system, can account for
signficant running time due to process switching to the kernel.
Allow the end-operator to specify `--disable-cpu-time` to
avoid this call.  Additionally we cause `show thread cpu` to
not show up if this is selected.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-16 13:34:59 -04:00
Rafael Zalamena
65209e4fbf configure.ac: fix memory sanitizer test
We should test for `-fsanitize=memory` instead of `-fsanitize=thread`
when enabling memory sanitizer. While here, fix the error message.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-10-08 21:24:26 -03:00
Donald Sharp
d3fc71f304
Merge pull request #4912 from lucize/carescross
clippy: don't fail on CARES and libcap when clippy-only selected
2019-09-24 08:14:45 -04:00
Donald Sharp
da44fd80f0 configure: Update versioning
We have pulled the 7.2 branch let's update the master branch
to say it's 7.3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-20 14:36:01 -04:00
Lucian Cristian
2cd3abe419 clippy: fail libcap test only when !enable_clippy_only
when building native clippy we don't need libcap

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2019-09-13 07:16:18 +03:00
Lucian Cristian
2163a630eb clippy: CARES fail only if !enable_clippy_only
test for CARES otherwise config will fail with conditional "CARES" not defined

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2019-09-13 07:12:34 +03:00
Quentin Young
68376178e5
Merge pull request #4919 from opensourcerouting/config-warnings
build: error out on implicit missing libcap, warn for protobuf FPM
2019-09-03 14:55:38 -04:00
David Lamparter
7bfe765ae0 build: only build without libcap on request
Linux FRR builds without libcap are massively slow due to the
signal-based UID/GID synchronization across threads.  This disables the
automatic fallback to build without libcap;  it can still be requested
with "--disable-capabilities" but if the option isn't given in either
direction and we can't find libcap that's an error now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-02 20:52:56 +02:00
Martin Winter
2d82431a95 build: Fix checks for c_ares
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2019-08-30 19:22:29 +02:00
David Lamparter
83c64a7d32 build: make BMP optional
Sigh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-08-30 19:22:29 +02:00
David Lamparter
ed18356f1f bgpd/bmp: BMP implementation
This implements BMP.  There's no fine-grained history here, the non-BMP
preparations are already split out from here so all that remains is BMP
proper.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-08-30 19:22:23 +02:00
Donald Sharp
fd00c97cfa *: Start process of possibly deprecating Solaris
The FRR community has run into an issue where keeping up our
CI system to work with solaris has become a fairly large burden.
We have also sent emails and asked around and have not found
anyone standing up saying that they are using Solaris.

Given the fact that we do not have any comprehensive testing
being done w/ solaris and the fact that we are getting a steady
stream of new features that will never work on solaris and
we cannot find anyone to say that they are using it.  Let's
start the drawn out process of deprecating the code.

If in the mean-time someone comes forward with the fact that
they are using it we can then not deprecate it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-27 14:55:48 -04:00
Michal Ruprich
0513a27153 ospfd,ripd: Enabling build with openssl
Enabling openssl library for md5 authentication in RIP and OSPF

Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
2019-08-08 16:03:20 +02:00
Jafar Al-Gharaibeh
7bc33bcc19
Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers
build, lib: bump libyang requirement version to >= 0.16.105 (-r3)
2019-07-09 17:59:17 +03:00
David Lamparter
fe9e7b71cf lib: split off c-ares code from nhrpd
This is useful in other places too, e.g. for BMP outbound connections.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-03 17:15:34 +02:00
Renato Westphal
716ffcc8fe build, lib: bump libyang requirement version to >= 0.16.105
After ~4 months of deprecation period [1], drop support for older
libyang versions that don't support embedded extensions.

In addition to support for embedded extensions, libyang 0.16-r3
contains several bug fixes and performance improvements compared
to libyang-0.16-r1. It was about time to update.

Fixes:
* Issue #3273
* Issue #3971

[1] See commit 68626e08.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-07-01 22:59:54 -03:00
Donald Sharp
7ec5e2bf70
Merge pull request #4514 from opensourcerouting/warnings-20190612
*: kill more warnings
2019-06-17 15:19:42 -04:00
Quentin Young
42aac9b2ab
Merge pull request #4500 from opensourcerouting/clippy-improve
clippy: batch of improvements
2019-06-13 15:06:24 -04:00
David Lamparter
e8ef2be65b build: improve ranlib -D autoconf test
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-13 13:35:33 +02:00
David Lamparter
39c94f89da build: use -O2, not -Os
apparently -Os is quite a bit slower...

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12 19:35:43 +02:00
David Lamparter
72ad94d548 build: improve env var handling for cross build
We can use `$ac_precious_vars` to get at autoconf's conception of which
environment variables are relevant.  This makes "HOST_..." setup more
consistent for cross-compilation setups.

Fixes: #4006
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12 19:22:59 +02:00
David Lamparter
a71c5039ad build: improve clippy options
* adds a `--with-clippy=...` option to use a prebuilt clippy binary
* limits the autoconf tests done for `--enable-clippy-only`
  (e.g. no libyang)

Fixes: #3921
Fixes: #4006
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12 19:22:59 +02:00
David Lamparter
1af5b6d9a3 build: use -Wno-yacc on bison 3.3+
we only support bison, we don't care about yacc compatibility.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12 19:22:59 +02:00
David Lamparter
2655e41fa2 build: slim down configure.ac
Quite a few tests are deprecated/unnecessary at this point.  Remove
everything that is pointless.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12 19:22:55 +02:00
Donald Sharp
3f759ec92f
Merge pull request #4449 from opensourcerouting/py-detect
build: refactor & revamp python autoconf logic
2019-06-07 07:19:35 -04:00
Donald Sharp
43e587c1d1 *: Convert over to all -N namespace to change DAEMON_VTY_DIR
When the user specifies -N namespace allow it to influence the
frr_vtydir(DAEMON_VTY_DIR) to have namespace in it's path
like so: $frrstate_dir/<namespace>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04 19:52:46 -04:00
Donald Sharp
0d675e4946 ldpd: Allow for -N <namespace> to influence location of LDPD_SOCKET
If --ctl_socket is used this will override any other option and will
be used

If -N <namespace> is used, then we will setup the LDPD_SOCKET
in $frr_statedir/<namespace>/ldpd.sock

If neither option is used, then we will use $frr_statedir/ldpd.sock

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04 10:37:19 -04:00
Donald Sharp
89277ebf76 bfdd: Allow -N to influence BFDD_CONTROL_SOCKET
When selecting to run bfdd with -N allow the namespace passed
in to be added to the $frr_statedir/<namespace name>/bfdd.sock

If --bfdctl is passed in that will override the -N option.

If neither --bfdctl or -N is passed in then the default
of  $frr_statedir/bfdd.sock is used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04 10:37:19 -04:00
Donald Sharp
4e99f30932 lib: Allow -N to modify the zapi domain socket
When using -z, allow that to override the zapi domain socket
path.  If using -N add the namespace name to the path to
$frr_statedir/<namespace>/zserv.api.  If you don't specify
the -N or -z option then it is $frr_statedir/zserv.api

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04 10:37:19 -04:00
David Lamparter
45da32d7a4 build: refactor & revamp python autoconf logic
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-04 16:21:20 +02:00
Quentin Young
97b5f22bcd vrrpd: update auto*, init scripts, etc
Add vrrpd to all the usual places daemons need to go

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
5435a2bf61 vrrpd: initial commit
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
5dbb0a7b2a build: fix Lua build
Each of Lua's major versions are incompatible with each other. Ubuntu,
at least, does not provide a single liblua.so or /usr/include/lua; all
SOs and headers are versioned, e.g. liblua5.3.so and
/usr/include/lua5.3. There's already an m4 macro in the GNU collection
to handle this situation, so let's use that.

This allows building with Lua enabled to work on platforms other than
Fedora.

* Move lib/lua.[ch] -> lib/frrlua.[ch] to prevent path conflicts
* Fix configure.ac search for proper CPP and linker flags
* Add Lua include path to AM_CPPFLAGS
* Update vtysh/extract.pl.in

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-10 16:08:32 +00:00
Donald Sharp
d8a1cf2c9f configure: Update to newer version
We've pulled the next stabilization branch

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-08 09:54:35 -04:00
Quentin Young
6915af74fd
Merge pull request #4082 from opensourcerouting/grpc-nb-plugin
gRPC northbound plugin
2019-05-07 16:53:17 -04:00
Renato Westphal
1b8de275c8 lib, yang: disable libyang custom user types temporarily
libyang 1.0 introduced a few changes in the user types API, and
these changes made FRR incompatible with libyang 1.x. In order to
ease our migration from libyang 0.x to libyang 1.x, let's disable
our libyang custom user types temporarily so that FRR can work
with both libyang 0.x and libyang 1.x. This should be especially
helpful to the CI systems during the transition. Once the migration
to libyang 1.x is complete, this commit will be reverted.

Disabling our libyang custom user types should have only
minimal performance implications when processing configuration
transactions. The user types infrastructure should be more important
in the future to perform canonization of YANG data values when
necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-05-06 22:07:18 -03:00
Renato Westphal
ec2ac5f28a lib: add new gRPC-based northbound plugin
This is an experimental plugin for now. Full documentation will
come later.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-04-26 18:15:32 -03:00
David Lamparter
440d5faa3a lib: add "seqlock" wait/broadcast primitive
Manually tested rather extensively in addition to included unit tests,
should work as intended.

NB: The OpenBSD futex() code is "future"; it's not actually in OpenBSD
(yet?) and thus untested.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-04-18 12:44:29 +02:00
Donald Sharp
47e0a3b46b configure: Default to 16 way ecmp on compilation
If a person who is compiling FRR does not specify the
multipath number on configure we are defaulting to a ecmp of 1.
Let's change this to 16.  In this day and age most everything
supports actual ecmp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-06 10:44:34 -05:00
Donald Sharp
5fa3430885
Merge pull request #3836 from opensourcerouting/debian/master-kill-backports
[master] debian packaging
2019-02-23 18:23:21 -05:00
Renato Westphal
c06c9ded21
Merge pull request #3835 from qlyoung/build-update-libyang-doc-link
build: update doc link for libyang warning
2019-02-20 15:14:03 -03:00
David Lamparter
3ec9556728 watchfrr: build in defaults for -r/-s/-k
There's no good reason to not have these options default to the
installation path of tools/watchfrr.sh.  Doing so allows us to ditch
watchfrr_options from daemons/daemons.conf completely.

Fixes: #3652
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-19 21:34:31 +01:00
David Lamparter
74afa5e686 debian: cleanly split off from dist tarball
The debian/ directory is distributed separately for tarballs in 3.0
(quilt) format.  Including it in the dist tarball causes problems with
automake when the separately distributed debian directory is unpacked on
top of the dist tarball;  the clean and correct thing to do here is to
not include the debian/ directory in dist tarballs.

Users have two choices for building FRR Debian packages:
- build straight off git
- build from a "frr.tar" + "frr-debian.tar"

The tarsource.sh tool does the right thing when invoked with the -D
("Debian") option.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-19 21:31:18 +01:00
David Lamparter
b3c4c164b5 debian: make package "official"
Move us into place in debian/

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-19 21:30:54 +01:00
David Lamparter
93b389bb9e debian: move changelog out of the way
The official Debian package will have a manually maintained changelog in
place of the symlink.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-19 21:30:53 +01:00
Quentin Young
18f7f76767 build: update doc link for libyang warning
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-19 19:53:54 +00:00
Renato Westphal
0619d86e5c build: fix linking to libconfd
Commit fdbd8086b1 removed the explicit -lconfd flag from
lib_confd_la_LIBADD in favor of using the CONFD_LIBS variable. The
problem, however, is that ConfD doesn't use pkg-config nor anything
similar, so CONFD_LIBS is not created automatically by autotools.

Fix this problem by manually assigning -lconfd to the CONFD_LIBS
variable in the configure script.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-02-18 13:29:24 -03:00
Donald Sharp
cfef27e56e
Merge pull request #3622 from mjstapp/fix_cpp_compile
libs, daemons: changes to permit c++ compilation
2019-02-13 12:47:23 -05:00
David Lamparter
8ed561e1f1 tests: add C++ header compatibility smoke test
Compiling an empty C file with most headers included and -Wc++-compat
gives us a build error if we introduce some stupid C++-incompatible
change.

While this won't catch everything, it's a good start.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-11 22:34:12 -02:00
Lars Seipel
3eb4fbb0f5 zebra: support DNS configuration options in rtadv
Add support for the RDNSS and DNSSL router advertisement
options described in RFC 8106.

Signed-off-by: Lars Seipel <ls@slrz.net>
2019-02-02 19:10:19 +01:00
David Lamparter
fdbd8086b1 build: fix a whole bunch of *FLAGS
- some target_CFLAGS that needed to include AM_CFLAGS didn't do so
- libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all
- consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@
- 2 dependencies were missing for clippy

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-01-30 19:13:51 +01:00
David Lamparter
68626e08f7 build, lib/yang: bake in extensions if possible (v2)
LIBS<>LDFLAGS was wrong on this one.

Fixes: 02a0df1f22
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-01-30 18:29:47 +01:00
David Lamparter
02a0df1f22 build, lib/yang: bake in extensions if possible
Starting with libyang 0.16.74, we can load internally embedded yang
extensions instead of going through the file system/dlopen.  Detect
support for this at build time and use if available.

NB: the fallback mechanism will go away in a short while.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-01-24 17:44:41 +01:00
David Lamparter
a28436ca47
Merge pull request #3655 from rubenk/macos-fixes
A few small build fixes for Mac OS
2019-01-24 13:51:37 +01:00
Ruben Kerkhof
1b68b1cdd3 Only check for .interp when we have objcopy
On Mac OS, where we don't have objcopy, ./configure logs:

checking for objcopy... no
checking for .interp value to use... ./configure: line 22174: conftest.interp: No such file or directory

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-01-23 16:22:13 +01:00
Ruben Kerkhof
29d46e4bb6 Redirect output of ranlib to /dev/null
./configure on Mac OS logs:
checking whether ranlib supports D option... error: /Library/Developer/CommandLineTools/usr/bin/ranlib: unknown option character `D' in: -D
Usage: /Library/Developer/CommandLineTools/usr/bin/ranlib [-sactfqLT] [-] archive [...]
no

This is quite noisy.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-01-23 16:22:13 +01:00
Ruben Kerkhof
23e6726e0b Redirect output of $AR check to /dev/null
./configure logs this on Mac OS:

checking whether ar supports D option... /Library/Developer/CommandLineTools/usr/bin/ar: illegal option -- D
usage:  ar -d [-TLsv] archive file ...
	ar -m [-TLsv] archive file ...
	ar -m [-abiTLsv] position archive file ...
	ar -p [-TLsv] archive [file ...]
	ar -q [-cTLsv] archive file ...
	ar -r [-cuTLsv] archive file ...
	ar -r [-abciuTLsv] position archive file ...
	ar -t [-TLsv] archive [file ...]
	ar -x [-ouTLsv] archive [file ...]
no

This is quite noisy and we're only interested in the result of the
check, not the output.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-01-23 16:22:13 +01:00
Donald Sharp
80d551ddd1 *: Convert to new version number
After much discussion we have decided to update the version of master
to 7.1 dev.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-22 18:32:28 -05:00
Donald Sharp
65f1b6f85f configure: Add a bit more warning to the enable-shell option
This option probably did not have enough of a please be careful
warning around it.  Let's add a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-09 08:47:52 -05:00
Donald Sharp
ea2abdc22b
Merge pull request #3434 from opensourcerouting/init-new
[master] init script & vtysh pager rework
2018-12-09 09:38:41 -05:00
David Lamparter
9b76e054ad build: fix reproducibility re. -fdebug-prefix-map
If CFLAGS contains something like `-fdebug-prefix-map=/build/path=.`, we
need to remove it from CONFIG_ARGS so it doesn't get baked into `show
version`.  Otherwise, build becomes non-reproducible if the build path
changes.  To avoid other things creeping in, let's just remove *FLAGS in
their entirety.  (Not really reliable information anyway.)

With this commit, FRR build should be 100% reproducible.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-07 19:35:26 +01:00
David Lamparter
ea4d91bfba debian/tools: new init script
This separates the init script used for the system (and called in the
systemd unit file) from the script that watchfrr uses to control
daemons.  Mixing these two caused the entire thing to become a rather
huge spaghetti mess.

Note that there is a behaviour change in that the new script always
starts zebra regardless of zebra_enable.

Side changes:
- Ubuntu 12.04 removed from backports since it doesn't work anyway
- zebra is always started regardless of zebra_enable.  To disable FRR,
  the entire init script should be disabled through policy.
- no-watchfrr operation is no longer supported by the scripts in the
  Debian packages.  (This is intentional.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-06 23:05:48 +01:00
Renato Westphal
76ca535697 build: fix detection of the confd binary
The confd binary must be searched in the path given by the user and not
in the system standard directories. This is necessary because, the way
confd is distributed, multiple installations of confd (from different
versions) are possible. Users must choose at configure time which confd
installation they want to use.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-26 13:07:42 -02:00
David Lamparter
2cc4f280ed build: refuse non-working linking options
We only support:
* --enable-shared --disable-static --disable-static-bin
* --enable-shared --enable-static --disable-static-bin
* --enable-shared --enable-static --enable-static-bin

(The second option is not particularly useful.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-11-19 16:32:14 +01:00
Ruben Kerkhof
99e9f424bb configure.ac: consistently quote all m4 macros
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2018-11-14 12:32:41 +01:00
Ruben Kerkhof
1f104f57ee configure.ac: fix a typo in an error message
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2018-11-08 12:33:26 +01:00
Christian Franke
397b1dff48 configure: Check whether libyang has ENABLE_LYD_PRIV
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-01 13:52:26 +01:00
Donald Sharp
0100dfb9c1
Merge pull request #2705 from opensourcerouting/northbound-yang-v2
Northbound API
2018-10-31 18:50:45 -04:00
Lou Berger
62565dc96b configure.ac: add --with-yangmodelsdir=DIR and
--with-libyang-pluginsdir=DIR config options

Signed-off-by: Lou Berger <lberger@labn.net>
2018-10-30 17:48:04 -04:00
David Lamparter
e5563f8778 build: crop excessive net-snmp library list
This fixes the longstanding GPL vs. OpenSSL licensing issue in our SNMP
code (and cuts down on its other dependencies a wee bit.)

In a way, net-snmp is really buggy here in what it says that we should
link against, but I don't know their application scenarios well enough
to say it should be changed at their end.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-28 16:05:00 +01:00
Renato Westphal
a7ca2199b7 lib: add a new northbound plugin for Sysrepo
This plugin leverages the northbound API to integrate FRR with Sysrepo,
a YANG-based configuration and operational state data store.

The plugin is linked to the libsysrepo library and communicates with
the sysrepod daemon using GPB (Google Protocol Buffers) over AF_UNIX
sockets. The integration consists mostly of glue code that calls the
appropriate FRR northbound callbacks in response to events triggered
by the sysrepod daemon (e.g. request to change the configuration or to
fetch operational data).

To build the sysrepo plugin, provide the --enable-sysrepo option to the
configure script while building FRR (the libsysrepo library needs to be
installed in the system).

When installed, the sysrepo plugin will be available for all FRR daemons
and can be loaded using the -M (or --module) command line option.

Example: bgpd -M sysrepo.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-27 16:16:12 -02:00
Renato Westphal
5bce33b3c1 lib: add a new northbound plugin for ConfD
This plugin leverages the northbound API to integrate FRR with the ConfD
management agent.

The plugin is linked to the libconfd library and communicates with the
confd daemon using local TCP sockets. The integration consists mostly
of glue code that calls the appropriate FRR northbound callbacks in
response to events triggered by the confd daemon (e.g. request to change
the configuration or to fetch operational data).

By integrating FRR with the libconfd library, FRR can be managed using
all northbound interfaces provided by ConfD, including NETCONF, RESTCONF
and their Web API.

The ConfD CDB API is used to handle configuration changes and the ConfD
Data Provider API is used to provide operational data, process RPCs and
send notifications. Support for configuration management using the ConfD
Data Provider API is not available at this point.

The ConfD optional 'get_object()' and 'get_next_object()' callbacks were
implemented for optimal performance when fetching operational data.

This plugins requires ConfD 6.5 or later since it uses the new leaf-list
API introduced in ConfD 6.5.

To install the plugin, the --enable-confd option should be given to the
configure script, specifying the location where ConfD is installed.

Example: ./configure --enable-confd=/root/confd-6.6

When installed, the confd plugin will be available for all FRR daemons
and can be loaded using the -M (or --module) command line option.

Example: zebra -M confd.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-27 16:16:12 -02:00
Renato Westphal
1c2facd12d lib: introduce new northbound API
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-27 16:16:12 -02:00
David Lamparter
06871ed9fb build: carry --with-pkg-extra-version into tarballs
If we use "./configure --with-pkg-extra-version=... && make dist", we
probably want the dist tarball to remember the extra version it was
configured with.

Use --without-pkg-extra-version to kill the tag.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-24 15:11:50 +02:00
David Lamparter
64537bc4d0 build: rewrite readline/curses check
We don't need termcap/tinfo/curses, those are just for libreadline.  On
most modern systems, libreadline will pull in the appropriate libs it
needs on its own, so unconditionally adding them adds an extra unneeded
dependency for us.

Still need to try with curses/... for some systems, but only after bare
readline fails.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-19 13:14:10 +02:00
David Lamparter
105a818973 build: try to use -D option for ar and ranlib
The -D option zeroes out timestamps in .a files and has become the
default on recent distributions to enable reproducible builds.

This also shuts up the "u ignored because D is default" warning that is
showing up on some distributions.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-19 13:13:42 +02:00
David Lamparter
39d3cc4ec6 build: fix some escapes in configure.ac
Some test statements were missing "" around variables causing syntax
errors during configure runs.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-19 13:13:42 +02:00
David Lamparter
68b8a15f87 lib: add libunwind support for backtraces
libunwind provides an alternate to backtrace() for printing out the call
stack of a particular location.  It doesn't use the frame pointer, it
goes by the DWARF debug info.  In most cases the traces have exactly the
same information, but there are some situations where libunwind traces
are better.

(On some platforms, the libc backtrace() also uses the DWARF debug info
[e.g.: ARM backtraces are impossible without it] but this is not the
case everywhere, especially not on BSD libexecinfo.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-18 02:51:51 +02:00
Lou Berger
e239241534
Merge pull request #3116 from opensourcerouting/libfrr-exec
lib: print version information in libfrr.so
2018-10-02 07:03:08 -04:00
David Lamparter
42efb0d43b lib: print version information in libfrr.so
This makes libfrr.so executable to print its version info.  This is
useful if you need to check your libfrr.so matches your daemons.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-02 10:26:25 +02:00
David Lamparter
d6e7625706 build: add --enable-static-bin option
This option can be used to get statically linked binaries.

Note: libfrr.la is removed from modules' library dependency list.  This
is intentional and explained in a comment in lib/subdir.am.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-01 14:56:18 +02:00
David Lamparter
cffcc5f75d
Merge pull request #3034 from donaldsharp/LUA
Add initial thoughts on having lua act as a replacement for route-maps
2018-10-01 12:39:51 +02:00
Donald Sharp
634949aef8 lua: Initial Lua import
This code sets up the ability to use lua inside of FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-26 21:21:23 -04:00
David Lamparter
40da52d8c1 tools/frr: use path settings from ./configure
...so we properly locate config files and daemons whereever the user
decided to put them.

Signed-Off-By: David Lamparter <equinox@diac24.net>
2018-09-27 02:06:14 +02:00
F. Aragon
2b5773b248
build: add -Wshadow to the dev build
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-09-17 18:37:04 +02:00
Quentin Young
f20aafeec0 frr: improve README
Friendly READMEs are all the rage!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-10 15:30:22 +00:00
Quentin Young
d88f11441a frr: remove stale files, allow non-GNU Automake
* Add 'foreign' option to allow Automake to ignore missing GNU standard
  files
* Remove AUTHORS
* Remove NEWS
* Remove ChangeLog

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-10 15:30:22 +00:00
Donald Sharp
eac04cfd59
Merge pull request #2977 from opensourcerouting/doc-fix
build: fix not building docs w/o sphinx
2018-09-09 14:52:38 -04:00
David Lamparter
f4f2f2ccac build: fix not building docs w/o sphinx
Can't build manpages without sphinx-build, oops...

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-09 20:01:08 +02:00
David Lamparter
e9d938b82a lib: make pthread_set[_]name_np test OS agnostic
FreeBSD supports pthread_set_name_np() too.  Also, pthread_set_name_np()
returns void.  And NetBSD has pthread_setname_np() with an extra arg...

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-09 01:16:25 +02:00
David Lamparter
324be174d7 build: check {malloc,pthread}_np.h for *BSD
FreeBSD has malloc_usable_size() in malloc_np.h
OpenBSD has pthread_set_name_np() in pthread_np.h

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-09 01:16:25 +02:00
David Lamparter
0718b5624c build: use _POSIX_C_SOURCE
Need this to get CMSG_SPACE/CMSG_LEN on Solaris.

Also, AC_GNU_SOURCE is deprecated, AC_USE_SYSTEM_EXTENSIONS does that.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
David Lamparter
086aec2ad4 vtysh: make RPKI node non-conditional
Whether or not RPKI is enabled during build shouldn't really influence
vtysh; the user can always manually install bgpd_rpki.so later and it
should work.  This also means that the behaviour of "RPKI module not
loaded" is consistent regardless of whether it was a compile-time or
runtime decision.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
David Lamparter
dbac691da6 build: fix & clean up *SAN flags
ASAN/MSAN/TSAN flags need to be in CFLAGS and LDFLAGS; the latter links
the correct compiler-dependent library.  Also, the configure switch was
broken (--disable-... would enable the sanitizer.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
David Lamparter
2b2f275ee2 build: clean up protobuf build integration
We were linking all libs and binaries against libprotobuf-c if the
option was enabled... that makes no sense at all.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
David Lamparter
4007e3adf1 build: use -export-dynamic
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
David Lamparter
a1286a3245 build: non-recursive tests
May SUBDIRS rest in pieces... er, peace.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:26:54 +02:00
David Lamparter
8b7668ecce build: non-recursive vtysh
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:26:54 +02:00
David Lamparter
84d837b75d build: non-recursive bgpd & rfp
Note: no more --with-rfp-path on configure - badly messing with the
build system like this really isn't how to do a conditional external
dependency.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:25:59 +02:00
Donald Sharp
714e135429
Merge pull request #2875 from opensourcerouting/fabricd
OpenFabric support
2018-09-08 13:48:48 -04:00
Donald Sharp
8860ffdc09 vtysh: Add code to isolate append_history
The append_history function in lib readline appears to
not be universally available across all of the esoteric
platforms we may want to compile on.  As such
provide a way to gracefully do nothing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-08 12:00:17 -04:00
Donald Sharp
afc9534f67 lib: Detect if pthread_condattr_setclock is available
Auto-detect if pthread_condattr_setclock is available and if
it is not allow the code to compile around the issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-08 12:00:17 -04:00
Christian Franke
7c0cbd0e88 fabricd: add new daemon as build of isisd
fabricd is built using the sources of isisd. To allow differentiation
in the code, -DFABRICD=1 is added to its preprocessor flags.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:12 +02:00
Quentin Young
04f04f0fa5
Merge pull request #2913 from opensourcerouting/non-recursive-prep
pre-final non-recursive make
2018-08-31 11:43:59 -04:00
Martin Winter
17808c03d7 configure: Update version to 6.1-dev
We are now working on 6.1-dev for new work.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-08-30 09:11:10 -07:00
David Lamparter
50dc6dbd69 doc: html default off
... RPM builds break if we enable this unconditionally; should really
change this in CI instead.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
0fca9cee36 build: improve python search pattern
- try pythonN.N-config after pythonN-config
- use "python-config --ldflags" instead of --libs
- add Python 3.6 to explicitly searched versions
- if linking fails, try with "-lz" added

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
892d21b171 build: add warning when overwriting vars on "make"
doing things like `make CC="mmix-linux-musl-gcc"` breaks the hosttools/
cross-compilation setup pretty hard and just straight up should not be
done.  These vars belong on `configure`, not `make`.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
2a636b4350 build: cache a few more results in ./configure
Makes configure re-runs faster if the `-C` option is used.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
e386324530 build: non-recursive solaris
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
0d0812a4ad build: non-recursive debianpkg
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
9e53b31551 build: non-recursive doc + parallel sphinx
Sphinx actually does work with a parallel build, if the doctree creation
is a separate step (which the other builds will then just read
unmodified.)  This can be done with the "dummy" target.

This also adds "-j6" to sphinx-build and adds a "--disable-doc-html"
switch on ./configure to turn on/off building HTML docs separately.

Also, HTML docs are now installed by "make install" to
/usr/share/doc/frr/html.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-30 08:06:44 +02:00
David Lamparter
3535a785b8 lib: remove Linux 2.4 TCP-MD5 support
Linux 2.6.0 was released in December of 2003... I'm pretty sure we don't
need this Linux 2.4 support anymore.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-25 02:56:05 +02:00
Donald Sharp
807ed4e9c0 lib: Remove smux option for snmp
The smux.c code has not been able to compile for 2+ years
and no-one has noticed. Additionally net-snmp has marked
smux integration as deprecated for quite some time as well.

Since no-one has noticed and it's been broken and smux integration
is deprecated let's just remove this from the code base.

From looking at the code, it sure looks like SNMP could use
a decent cleanup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-23 08:36:07 -04:00
Jafar Al-Gharaibeh
410a249203 configure.ac: emit a config warning if sphinx-build is missing
If we don't have --disabled-doc and sphinx-build is not available
  warn the user that sphinx-build is needed to build documentation
  as shown in the last line of config summary example below

FRRouting configuration
------------------------------
FRR version             : 5.1-dev
host operating system   : linux-gnu
source code location    : .
compiler                : gcc -std=gnu11
compiler flags          :  -g -Os -fno-omit-frame-pointer -funwind-tables -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -pthread
make                    : make
linker flags            :  -rdynamic -ldl -lm -lcrypt   -ljson-c -lrt  -lreadline  -ltermcap -lm
state file directory    : /var/run
config file directory   : /usr/local/etc
example directory       : /usr/local/etc
module directory        : /usr/local/lib/frr/modules
user to run as          : frr
group to run as         : frr
group for vty sockets   :
config file mask        : 0600
log file mask           : 0600
zebra protobuf enabled  : no

The above user and group must have read/write access to the state file
directory and to the config files in the config file directory.
configure: WARNING: sphinx-build is missing but required to build documentation

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2018-08-16 16:25:34 -05:00
Donald Sharp
adf0e7c6d7 lib, ripngd, zebra: Remove pre-solaris 9 special cased code
The CMSG_FIRSTHDR was broken on solaris pre version 9.  Version 9
was released in May of 2002 and EOL'ed in 2014.  Version 8 EOL'ed
in 2012.  Remove special case code for a little used platform
that has not seen the light of day in a very long time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 15:06:53 -04:00
Quentin Young
94cb1f61a4
Merge pull request #2805 from opensourcerouting/malloc-size
lib: track total memory per MTYPE if possible
2018-08-14 11:43:39 -04:00
Donald Sharp
d6853655b5
Merge branch 'master' into bfd-final 2018-08-14 08:16:10 -04:00
Rafael Zalamena
7134904b1f bfdd: wire to the build process
Add BFD daemon to the build process and packaging instructions.

Currently the bfdd daemon does nothing, this is just to document how the
daemon insertion step occured.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:24:58 -03:00
Mark Stapp
5a6869b2d9 configure: fix help text
Correct help text in a couple of places; add configure switch
for new staticd daemon.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-08-08 15:00:28 -04:00
David Lamparter
fa896a1d80 build: rework mallinfo test & find malloc_size
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-08 20:17:55 +02:00
Donald Sharp
7e24fdf333 staticd: Start the addition of a staticd
This is the start of separating out the static
handling code from zebra -> staticd.  This will
help simplify the zebra code and isolate static
route handling to it's own code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:37:24 -04:00
Russ White
155d6d4415
Merge pull request #2696 from sworleys/Netlink-Fuzz
zebra: Add code for fuzzing netlink
2018-07-29 08:33:43 -04:00
Stephen Worley
acfa8927f9 Refactor code for new fuzzing netlink flag
Changed the configure flag used by netlink fuzzing
and refactored code accordingly.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2018-07-24 13:39:25 -04:00
Donald Sharp
c4aee4fe31
Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanup
Simplify deprecation check
2018-07-23 08:46:26 -04:00
Lou Berger
5e2dd3fa5d *: ignore deprecated code statments in release versions
by setting CONFDATE to 0

Signed-off-by: Lou Berger <lberger@labn.net>
2018-07-10 16:19:14 -04:00
Arthur Jones
8328420909 unit tests: support code coverage instrumentation and reports
Currently, make check runs the unit tests and reports pass/fail,
but we have no way to guage how much of the code is covered by
these tests.  gcov provides those statistics on a per source
file basis, but requires special CFLAGS and LDFLAGS.  Here, we
add the --enable-gcov configure option to setup those options
correctly.  We also add a make target called check-coverage,
which runs the unit tests, runs gcov and uploads the data to
the codecov.io cloud service for display.

Finally, we include a Dockerfile-coverage which creates a
container image in alpine linux to run the tests.  To create
the image:

$ docker build \
	--build-arg commit=`git rev-parse HEAD` \
	--build-arg token=<upload token from codecov.io> \
	-t frr-gcov:latest \
	-f docker/alpine/Dockerfile-coverage .

and to create and upload the report:

$ docker run -it --rm frr-gcov:latest

Testing done:

Created and uploaded a report from my fork using alpine linux 3.7.
Non-coverage alpine 3.7 build still works.

Issue: https://github.com/FRRouting/frr/issues/2442
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
2018-07-04 11:06:11 -07:00
Quentin Young
e9f272a49e *: disable all sanitizers for clippy build
* Move configure flag propagations out of user flags
* Use AC_SUBST to transfer flag values to Automake
* Set default AM_CFLAGS and AM_CPPFLAGS in common.am and change child
  Makefiles to modify these base variables
* Add flag override to turn off all sanitizers when building clippy
* Remove LSAN suppressions blacklist as it's no longer needed

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-08 17:22:13 +00:00
Renato Westphal
452c9b503b zebra: remove unnecessary preprocessor check
The IFLA_INFO_SLAVE_KIND constant is always defined now that we imported
our own copies of the Linux kernel headers. Remove the preprocessor
checks since they aren't necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-06-07 15:45:33 -03:00
Lou Berger
20cc046f72 *: convert tabs to spaces
Signed-off-by: Lou Berger <lberger@labn.net>
2018-05-14 17:08:39 -04:00
Lou Berger
c274a72fb3 *: fix compile with -enable-address-sanitizer configured
Signed-off-by: Lou Berger <lberger@labn.net>
2018-05-14 07:06:36 -04:00
Russ White
6b50b12ac7
Merge pull request #2162 from qlyoung/fix-vpath-build
doc: support VPATH builds
2018-05-12 06:23:03 -04:00
Quentin Young
524ada7f23 doc: support VPATH builds
Documentation was not fully using Automake / Autoconf and therefore needs
modifications to support black magic VPATH builds.

* Convert Makefile's to Autoconf-controlled Makefile.in's
* Tweak loading of pygments lexer to handle runtime paths
* Update .gitignore's as necessary

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-02 17:15:31 -04:00
Martin Winter
ef2a2c2e09 configure: Update version to 5.1-dev
We are now working on 5.1-dev for new work.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-05-02 07:28:39 -07:00
Donald Sharp
2222a71653 *: Move sharpd from developmental build to have to explicity enable it
sharpd has started to see some use from our field engineers as
well as people attempting to build/test their environments
as a way of easily injecting a large number of routes.

Modify configure.ac to move sharpd from a development build
option to having to explicity enable it via `--enable-sharpd=yes`
in order for it to be built.

This will allow those who want to build it, to build it without
having to use the development build option.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-04-27 15:18:41 -04:00
Donald Sharp
3cab181d71 *: Actually allow end users to not build pbrd
The building of pbrd from a configure compile option
was not properly setup.  This should do that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-04-27 15:04:40 -04:00
Donald Sharp
e5c83d9b31 pbrd: Add PBR to FRR
This is an implementation of PBR for FRR.

This implemenation uses a combination of rules and
tables to determine how packets will flow.

PBR introduces a new concept of 'nexthop-groups' to
specify a group of nexthops that will be used for
ecmp.  Nexthop-groups are specified on the cli via:

nexthop-group DONNA
  nexthop 192.168.208.1
  nexthop 192.168.209.1
  nexthop 192.168.210.1
!

PBR sees the nexthop-group and installs these as a default
route with these nexthops starting at table 10000
robot# show pbr nexthop-groups
Nexthop-Group: DONNA Table: 10001 Valid: 1 Installed: 1
	Valid: 1  nexthop 192.168.209.1
	Valid: 1  nexthop 192.168.210.1
	Valid: 1  nexthop 192.168.208.1

I have also introduced the ability to specify a table
in a 'show ip route table XXX' to see the specified tables.

robot# show ip route table 10001
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR,
       > - selected route, * - FIB route

F>* 0.0.0.0/0 [0/0] via 192.168.208.1, enp0s8, 00:14:25
  *                 via 192.168.209.1, enp0s9, 00:14:25
  *                 via 192.168.210.1, enp0s10, 00:14:25

PBR tracks PBR-MAPS via the pbr-map command:

!
pbr-map EVA seq 10
  match src-ip 4.3.4.0/24
  set nexthop-group DONNA
!
pbr-map EVA seq 20
  match dst-ip 4.3.5.0/24
  set nexthop-group DONNA
!

pbr-maps can have 'match src-ip <prefix>' and 'match dst-ip <prefix>'
to affect decisions about incoming packets.  Additionally if you
only have one nexthop to use for a pbr-map you do not need
to setup a nexthop-group and can specify 'set nexthop XXXX'.

To apply the pbr-map to an incoming interface you do this:

interface enp0s10
 pbr-policy EVA
!

When a pbr-map is applied to interfaces it can be installed
into the kernel as a rule:

[sharpd@robot frr1]$ ip rule show
0:	from all lookup local
309:	from 4.3.4.0/24 iif enp0s10 lookup 10001
319:	from all to 4.3.5.0/24 iif enp0s10 lookup 10001
1000:	from all lookup [l3mdev-table]
32766:	from all lookup main
32767:	from all lookup default

[sharpd@robot frr1]$ ip route show table 10001
default proto pbr metric 20
	nexthop via 192.168.208.1 dev enp0s8 weight 1
	nexthop via 192.168.209.1 dev enp0s9 weight 1
	nexthop via 192.168.210.1 dev enp0s10 weight 1

The linux kernel now will use the rules and tables to properly
apply these policies.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-04-06 13:22:43 -04:00
Quentin Young
cec722f6df
configure.ac: --enable-[thread,memory]-sanitizer
Add configure options to enable the other sanitizers.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-22 14:25:28 -04:00
Quentin Young
fac8a744c6
frr: --enable-address-sanitizer
Modify Autotools files to support an easy option for enabling ASAN.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-21 20:47:34 -04:00
Quentin Young
1f35b46a2f
Merge branch 'master' into docuser
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-13 12:08:38 -04:00
Arthur Jones
c737c7bab3 alpine: minimal alpine packaging
For building dev packages for alpine, we provide a minimal APKBUILD
file and add a configure option for only numeric versions in the
VERSION variable as alpine does not allow non-numeric characters
in the version string.

These changes allow alpine to be built, but don't yet provide a
mechanism to build.  Changes to do the build in docker are coming
soon...

Testing done:

Built alpine packages in local docker environment, packages
showed no "dev" in the package name.  Also built CentOS packages
with numeric version disabled and the "dev" is still in the package
name.

Issue: https://github.com/FRRouting/frr/issues/1859
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
2018-03-11 11:28:45 -07:00
Mladen Sablic
4d9ad5dcd0 pimd: Multicast traceroute client and router
This commit is the implementation of weak multicast traceroute.
It consists of IGMP module dealing with mtrace type IGMP messages
and client program mtrace/mtracebis for initiating mtrace queries.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-02-19 23:13:55 +01:00
Quentin Young
50cc7127cf
Merge branch 'master' into docuser 2018-02-07 15:48:37 -05:00
Donald Sharp
d631e8a3d1 configure: Update version to 4.1-dev
We are now working on 4.1-dev for new work.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-02-06 12:26:47 -05:00
Quentin Young
82b7ec1da7
*: update configure.ac, Makefiles for new manpages
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-02-01 11:41:37 -05:00
Renato Westphal
fb6f7c2c25
Merge pull request #1515 from donaldsharp/selected_to_front1
Store selected_fib as a pointer off of rib_dest_t
2017-12-19 14:09:03 -02:00
Jafar Al-Gharaibeh
75d1899398
Merge pull request #1533 from donaldsharp/REALMS
Add Linux Realms and some Pim Documentation
2017-12-19 09:32:11 -06:00
Kaloyan Kovachev
4e40b6d615 zebra: Add ability to support tags -> realms in linux
Linux has the ability to support a concept of 'realms'.
This concept allows you to mark routes with a realm id
value of 1-255.  If you have marked the realm
of a route then you can use the tc program to
apply policy to the routes.

This commit adds the ability of FRR to interpret
a tag from (1-255) as a realm when installing into
the kernel.  Please note that at this point in time
there is no way to set policy from within FRR.  This
must be done outside of it.

The normal methodology for setting tags is valid here
via a route-map.

Finally this is only applied if the --enable-realms configure
option is applied.

Signed-off-by: Kaloyan Kovachev <kkovachev@varna.net>
2017-12-14 09:44:44 -05:00
Lucian Cristian
c71b85570e configure: exclude some checks not needed on clippy host build
from David Lamparter

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2017-12-13 23:13:59 +02:00
Donald Sharp
d616d6397a configure, zebra: Kame is not responsible for on/off of v6 forwarding
The KAME flag should not be used to turn on/of v6 forwarding on
*bsd systems.  Create a configure #define to better describe
what we are doing and the why of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-05 17:26:32 -05:00
Donald Sharp
8a71d93d85 sharpd: Add Super Happy Advanced Routing Protocol
Add a daemon that will allow us to test the zapi
as well as test route install/removal times from
the kernel.

The current commands are:

install route <starting ip address> nexthop <nexthop> (1-1000000)

This command starts installing at <starting ip address>/32
(1-100000) routes that it auto-increments by 1
Installation start time is noted in the log and finish
time is noted as well.

remove routes <starting ip address> (1-1000000)

This command removes routes at <starting ip address>/32
and removes (1-100000) routes created by the install route
command.

This code can be considered experimental and *is not*
something that should be run in a production environment.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-27 09:16:30 -05:00
Renato Westphal
133d8c61ff
Merge pull request #1387 from donaldsharp/save_zserv_incoming
configure, zebra: Add some debug code to allow for fuzzing
2017-11-21 09:06:06 -02:00
Martin Winter
5eee7099c8 debianpkg: Support --with-pkg-extra-version and other modifier to build custom package version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-11-17 17:55:31 -08:00
Martin Winter
495feb8a41 debian->debianpkg: Move debian files from debian dir to debianpkg dir.
Debian build systems use debian subdir for building and having a debian
dir in the source package causes issues.
Moving it to debianpkg avoids the issue and allows us to ship debian
package files in the source distribution

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-11-17 17:55:30 -08:00
Silas McCroskey
ee9d7744f8 debian/backports: include in distfile, don't put files in ..
Testing-done: ran 'make dist', unpacked elsewhere, built from result

Adjusted target to build the .orig.tar.gz accordingly, since it must
exclude the debian/ subdirectory.  Allows for building any backport from
only a tarball.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-11-17 17:55:29 -08:00
Marcel Röthke
dabecd7c63 bgpd: Add RPKI/RTR support
This commit adds support for the RTR protocol to receive ROA
information from a RPKI cache server. That information can than be used
to validate the BGP origin AS of IP prefixes.
Both features are implemented using [rtrlib](http://rtrlib.realmv6.org/).

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2017-11-10 14:37:52 +01:00
Donald Sharp
411314ed4f configure, zebra: Add some debug code to allow for fuzzing
1) Write zserv api commands( one of each type ) to the side.  This will allow
us to use them as input for a fuzzer.

2) Add -c <file to pass to zapi read process> into zebra as a run-time
option of we've turned on fuzzing.

While in and of itself these are not terribly useful( you still need
an external fuzzer ), they provide an infrastructure to allow
tools like afl to test the zapi.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-09 13:16:45 -05:00
Donald Sharp
09329dbcf7 configure: Have --enable-dev-build turn on better debugging.
Turn on '-g3 and -O0' for compilation.  Additionally
document the --enable-dev-build flag in our documentation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-29 10:01:19 -04:00
Philippe Guibert
5c4dc90307 Merge pull request #1069 from donaldsharp/rfc_plist
PIM: allow overlapping group ranges for prefix-list and static RP's
2017-09-26 17:33:29 +02:00
David Lamparter
35a3c3c132 build: non-recursive pimd
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-09-07 16:20:42 +02:00
David Lamparter
bd354725a6 build: non-recursive watchfrr & tools
(also forgot to remove AC_SUBST(ISISD) earlier)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-09-07 16:18:50 +02:00