Commit Graph

613 Commits

Author SHA1 Message Date
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
Christian Franke
0fb07d51c0 tests: skip isis tlv fuzztest on SunOS 2017-09-02 01:57:32 +02:00
Donald Sharp
37b5aaf8fd configure: Modify compiler options with dev build
When building a dev build, modify the compiler options
to be "-g -O0" to allow for better debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-31 10:30:19 -04:00
Donald Sharp
32592ffb4f Merge pull request #1056 from opensourcerouting/oldbits-0
"pathspace" options, vtysh-suid-cleanups, "vty_frame()"
2017-08-29 17:48:36 -04:00
David Lamparter
5309b14eae doc: new frr-args(8) man page with general options
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-29 08:36:03 +02:00
Donald Sharp
c594d99ffb configure: Add -funwind-tables
Certain platforms( ARM comes to mind ) in order
to get a proper stack trace on crash you need
to compile with this value.  Since it only
slightly increases the size of the binary for
other platforms, I would consider it worthwhile
to include this directive.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-28 19:01:15 -04:00
David Lamparter
b6116506ec lib: ZeroMQ read handler, v2
This uses zmq_getsockopt(ZMQ_FD) to create a libfrr read event, which
then wraps zmq_poll and calls an user-specified ZeroMQ read handler.
It's wrapped in a separate library in order to make ZeroMQ support an
installation-time option instead of build-time.

Extended to support per-message and per-fragment callbacks as discussed
with Bingen in PR #566.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-28 18:00:13 +02:00
David Lamparter
53b997359f build: fix --disable-snmp
--disable-foo results in "no" as value in $enable_foo

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-21 14:55:22 +02:00
David Lamparter
8dc1f7fc88 zebra: irdp: convert into module
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:26:55 +02:00
Lou Berger
0953865f70 configure: restore support for --with-rfp-path= broken by PR784
- revised per equinox
2017-08-09 18:27:03 -04:00
David Lamparter
4e1fd26a5e Merge remote-tracking branch 'frr/master' into tcp-zebra 2017-08-09 20:42:27 +02:00
Donald Sharp
fc73dd4bdf Merge pull request #911 from opensourcerouting/non-recursive-2
more non-recursive build, fix cross-compile, & doc build mangling
2017-08-09 14:38:07 -04:00
Donald Sharp
f790234f2f Merge pull request #892 from opensourcerouting/watchfrr-simplify
simplify watchfrr, add --terminal, improve startup logging
2017-08-09 14:32:44 -04:00
David Lamparter
689f5a8c84 *: remove --enable-tcp-zebra, rework ZAPI path
This adds "@tcp" as new choice on the -z option present in zebra and the
protocol daemons.  The --enable-tcp-zebra option on configure is no
longer needed, both UNIX and TCP socket support is always available.

Note that @tcp should not be used by default (e.g. in an init script),
and --enable-tcp-zebra should never have been in any distro package
builds, because

**** TCP-ZEBRA IS A SECURITY PROBLEM ****

It allows arbitrary local users to mess with the routing table and
inject bogus data -- and also ZAPI is not designed to be robust against
attacks.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-08 11:14:05 +02:00
David Lamparter
b6f5781c33 build: non-recursive babeld & eigrpd
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 19:09:14 +02:00
David Lamparter
30237d294f build: non-recursive ldpd
This also fixes a build problem where using #include
"ldpd/ldp_vty_cmds_clippy.c" results in the Makefile dependency tracking
having both

ldp_vty_cmds.c: ldp_vty_cmds_clippy.c
ldp_vty_cmds.c: ../ldpd/ldp_vty_cmds_clippy.c

(because, if it's included as "ldpd/..", it uses the "-I.." include path
in gcc, so the gcc -MD dependency output is "../ldpd/...")

... all of which causes the build to try to build it twice (at the same
time) and fail rather stupidly.

With a non-recursive build, the two paths are identical and everything
just works.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 19:09:11 +02:00
David Lamparter
349829894f doc: stop using version.texi, fix URLs
Ditch version.texi, put PACKAGE_VERSION in defines.texi instead.
Also add a PACKAGE_URL variable and fix some leftover outdated URLs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 14:44:07 +02:00
David Lamparter
306ed6816a build: pre-generate built headers in configure
zebra.h includes route_types.h, which means almost all of our Makefile
targets have a dependency on route_types.h.  While BUILT_SOURCES ensures
that this dependency is fulfilled on a "make all", this doesn't work
when building specific targets (e.g. "make lib/libfrr.la").

There seems to be no good way to add a dependency on everything, so the
best fix for this is to just generate the file during ./configure.

(The Makefile rule is still there, so if route_types.txt is changed,
route_types.h will be rebuilt.)

This only affects "initial" builds from a clean directory and/or builds
with --disable-dependency-tracking;  other than that gcc will output
Makefile dependencies during compilation so that route_types.h will
become a dependency for all output files.

gitversion.h has the same problem on a smaller scope.

command_lex.h & command_parse.h *don't* have the problem because they're
only used in specific files, and these files have the dependency
explicitly listed in the Makefile.  Hence, they can also be removed from
BUILT_SOURCES.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 11:09:50 +02:00
David Lamparter
cde8cd9d65 build: non-recursive nhrpd
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 11:09:50 +02:00
David Lamparter
86e463cf9b build: non-recursive isisd
(Also fix a minor snafu in the autoconf logic)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 11:09:50 +02:00
David Lamparter
afca06902e build: non-recursive ospf*
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 11:09:50 +02:00
David Lamparter
7f26911732 build: non-recursive ripd & ripngd
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04 11:09:50 +02:00
Jafar Al-Gharaibeh
004174c77f config: Disable pimd on OpenBSD 6.1
OpenBSD dropped support for PIM in 6.1. Error out if the user does not
disable pimd explicitly.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-08-02 10:12:19 -05:00
Jafar Al-Gharaibeh
ea2fd55a65 config: On some platfroms json check fails if we don't link lm, no-op otherwise
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-08-02 10:02:44 -05:00
Jafar Al-Gharaibeh
f9e755241a config: If we don't have crypt but we have ssl crypto, use it
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-08-02 10:01:17 -05:00
David Lamparter
154b9e8f9f lib: vty_stdio signal handling
- SIGTSTP appropriately suspends the foreground terminal
- SIGINT causes the daemon to exit, regardless of -d
- SIGQUIT causes the daemon to daemonize, regardless of -d

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-02 02:59:51 +02:00
David Lamparter
53d93be147 build: non-recursive auxiliary directories
Flatten {m4,pkgsrc,python,redhat,snapcraft}/Makefile.am into the main
one.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-31 23:03:30 +02:00
David Lamparter
0f8b5fd5a0 build: non-recursive qpb & fpm
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-31 23:03:30 +02:00
David Lamparter
ddfeb48652 build: zebra: remove *_method Makefile hacks
replace with preprocessor checks in source files.  Much simpler...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-31 23:03:30 +02:00
David Lamparter
64d44794fe build: convert zebra/ to non-recursive build
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-31 23:03:30 +02:00
David Lamparter
4a121f99f7 build: convert lib/ to non-recursive build
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-31 23:03:27 +02:00
Jafar Al-Gharaibeh
1689cf7e44 config: switch a few references to say FRR
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-07-12 11:25:33 -05:00
Ryan Hagelstrom
22ea387f26 config: No need to test these if enabled. Plays havoc with make distribution.
Signed-off-by: Ryan Hagelstrom <rhagelstrom@gmail.com>
2017-07-07 13:43:01 -05:00
Quentin Young
4db0cff16a
lib: add statistics for hash tables
Adds a function that calculates various statistics on our implementation
of a hash table. These are useful for evaluating performance.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-01 19:18:06 -04:00
Donald Sharp
1e84e9a697 Merge pull request #714 from opensourcerouting/cli_magic_defpy
CLI magic: part 1 (DEFPY)
2017-06-28 09:48:33 -04:00
Renato Westphal
c740f7d367 ldpd: convert cli and get rid of the xml interface
The xml2cli.pl script was useful years ago when the vty code was very
rudimentary. This is not the case anymore, so convert all ldpd CLI
commands to use DEFUNs directly and get rid of the XML interface.

The benefits are:
* Consistency with the other daemons;
* One less build dependency (the LibXML perl module);
* Easier to add new commands.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-16 14:43:42 -03:00
David Lamparter
5578a14d94 python: clidef.py
Adds "DEFPY()" which invokes an additional layer of preprocessing, so
that we get pre-parsed and named function arguments for the CLI.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-14 19:29:26 +02:00
David Lamparter
29ad6f6882 lib: clippy the assistant
Wraps the command parsing code for Python, so we can use it to do fancy
preprocessing and replace extract.pl.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-14 19:29:23 +02:00
David Lamparter
92e5026146 build: fix some cross-compilation issues
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-14 15:46:36 +02:00
David Lamparter
645bb0b10e Merge branch 'stable/3.0'
Dropped:
	redhat/README.rpm_build.md
	redhat/daemons
	redhat/frr.init
	redhat/frr.logrotate
	redhat/frr.spec.in

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-13 17:37:58 +02:00
David Lamparter
97bd5c48de Merge remote-tracking branch 'frr/master' into pull-624 2017-06-13 09:18:14 +02:00
Renato Westphal
316d0ae57b ldpd: remove pledge calls
In OpenBSD pledge is a mitigation mechanism used to restrict the syscalls
a program can use, enforcing its correct behavior.

In this port of OpenBSD's ldpd(8), it's hard to run under the same
tight pledge promises because of libfrr and additional components we
introduced, like a zclient in lde. Since ldpd is already privsep'ed,
removing the pledge calls shouldn't be a big compromise security-wise.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-07 10:32:38 -03:00
Donald Sharp
697629e190 Merge remote-tracking branch 'origin/stable/2.0' 2017-06-05 08:19:11 -04:00
David Lamparter
509fac8d85 release: frr-3.0-rc0 2017-06-01 19:23:00 +02:00
Quentin Young
16764760f7 frr: remove --enable-poll
vestigial

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 17:40:38 +00:00
David Lamparter
ad9a082501 build: fix pcreposix check
pcreposix_regexec doesn't exist (anymore?), it's just regexec.  Also, if
the user specifies --enable-pcreposix, not finding it is a fatal error.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-31 16:24:04 +02:00
Donald Sharp
293067f086 Merge remote-tracking branch 'origin/master' into babel 2017-05-30 10:58:03 -04:00
Renato Westphal
e8e0cc1af4 zebra: build mpls sources the right way
zebra_mpls_null.c should contain only dummy replacements for
platform-specific functions that may not be available on some systems
(e.g. add/delete LSPs in the kernel).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-19 19:13:29 -03:00
Donald Sharp
ca10883edc *: Initial Import of Babeld into FRR
This is a direct copy of:
https://github.com/boutier/quagga-merge

From the branch babel-merge

I copied the babeld directory into FRR and then fixed up everything to
compile.

Babeld at this point in time when run will more than likely crash and burn
in it's interfactions with zebra.

I might have messed up the cli, which will need to be looked at

extract.pl.in and vtysh.c need to be fixed up.  Additionally we probably
need to work on DEFUN_NOSH conversion in babeld as well

This code comes from:
Matthieu Boutier <boutier@irif.fr>
Juliusz Chroboczek <jch@irif.fr>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-13 14:59:41 -04:00
Donald Sharp
08c369bda9 *: Allow configure to control VTYSH_PAGER used
Signed-off-by: Donald Sharp
2017-05-10 11:16:26 -04:00
Donald Sharp
62ff928b37 *: Allow agentx to be displayed as part of vtysh
Modify code so that that vtysh can now accept the
agentx command for snmp support

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-09 10:16:06 -04:00
Donald Sharp
6281320446 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-08 16:51:21 -04:00
Donald Sharp
dbb12b8da9 Merge remote-tracking branch 'origin/master' into datacenter 2017-05-08 14:44:25 -04:00
Russ White
ba2d7123d5 Merge pull request #409 from donaldsharp/EIGRP
Eigrp
2017-05-07 19:48:33 -04:00
Donald Sharp
6c85c08193 eigrpd: Basic Documentation
Add some basic documentation for the EIGRP protocol.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-06 14:12:54 -04:00
Donald Sharp
56bdfe7d2a *: Remove cumulus Directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-04 12:20:29 -04:00
Donald Sharp
df970aa6ef *: Add --enable-datacenter to turn on datacenter defaults
Compile in DataCenter Defaults if --enable-datacenter
is configured instead of --enable-cumulus

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-04 11:52:45 -04:00
Donald Sharp
704ef00bb5 lib: Rename HAVE_POLL to prevent conflicting #defines
Rename HAVE_POLL to HAVE_POLL_CALL, when compiling with
snmp and poll enabled this was causing issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-04 10:32:41 -04:00
Donald Sharp
a03d3c8040 lib: Rename HAVE_POLL to prevent conflicting #defines
Rename HAVE_POLL to HAVE_POLL_CALL, when compiling with
snmp and poll enabled this was causing issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-04 10:24:25 -04:00
Donald Sharp
05ba625af7 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-02 15:52:09 -04:00
Donald Sharp
b46be72b4a Merge branch 'master' into EIGRP 2017-05-02 11:38:06 -04:00
Donald Sharp
fcc65b0ff4 bgpd: Allow old vpnv4 commands to compile
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-28 10:55:45 -04:00
Donald Sharp
ba0cb3fe96 lib: Fix compilation of some be32* code
The be32dec and be32enc functions are available on some
platforms and not others.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-26 21:46:10 -04:00
Donald Sharp
6aa210418e Merge remote-tracking branch 'origin/master' into EIGRP 2017-04-26 08:03:54 -04:00
Donald Sharp
c05f73e0f4 Merge remote-tracking branch 'origin/master' into mpls2 2017-04-26 07:50:02 -04:00
Donald Sharp
95f40dbe21 zebra: Get mpls building across multiple platforms.
The build system for mpls is a bit convoluted.  We need
a way to handle builds across multiple platforms.  This,
I believe addresses this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-06 14:40:19 -04:00
Donald Sharp
4952d0f0b0 *: Switchover to 3.1-dev
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-05 23:25:03 -04:00
Donald Sharp
fa35a883c1 *: Switchover to 3.0
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-05 23:20:26 -04:00
Donald Sharp
97133f7915 Merge remote-tracking branch 'origin/master' into EIGRP 2017-04-05 20:52:32 -04:00
Donald Sharp
6492ed5369 Merge pull request #310 from opensourcerouting/thread-prep
MT preparations
2017-04-05 12:39:25 -04:00
David Lamparter
422f8d0ca9 Merge branch 'master' 2017-04-04 20:04:07 +02:00
David Lamparter
3e7c8d040c Merge branch 'stable/2.0'
Fixed minor conflicts from "defaults" change on stable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-04-04 19:01:47 +02:00
Martin Winter
3e71b5d907 Release: FRR-2.0
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-04-01 22:22:47 -07:00
David Lamparter
b31fd74907 build: find & use threading library
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-31 17:59:48 +02:00
David Lamparter
899a4fd2a1 build: try to find some kind of atomic ops
Either one of:
- ISO C11
- gcc __atomic_*
- gcc/clang __sync_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-31 17:59:45 +02:00
David Lamparter
8aa42b826c build: bump to C11
Funnily enough, "gnu11" is gcc's default in 5.x if you don't specify
anything, yet there is no "AC_PROG_CC_C11" in autoconf.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-31 16:22:33 +02:00
David Lamparter
fbd0bae6d6 build: disable autoconf "-g -O2" default CFLAGS
We have AC_C_FLAG and try -Os before -O2.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-31 16:22:33 +02:00
Lou Berger
d6180888fc Rename: freerangerouting --> frrouting
Signed-off-by: Lou Berger <lberger@labn.net>
2017-03-30 14:24:05 -04:00
Lou Berger
447a8fe92e Rename: FreeRangeRouting FRRouting
Signed-off-by: Lou Berger <lberger@labn.net>
2017-03-30 14:22:35 -04:00
David Lamparter
8efe88eacf *: track version & "defaults" in configs
[CF]: Move default name to autoconf and update tests

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-03-28 19:18:42 +02:00
David Lamparter
4f8ea50c0d zebra: fpm: convert into module
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-25 08:52:36 +01:00
David Lamparter
5986b66b82 *: snmp: convert into modules
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-25 08:52:36 +01:00
David Lamparter
46081234b4 build: split off libfrrsnmp
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-25 08:52:36 +01:00
David Lamparter
b249c083d5 lib: add "show modules" CLI command
(for simplicity, this is stuffed in with memory_vty.c)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-24 13:02:33 +01:00