Commit Graph

796 Commits

Author SHA1 Message Date
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
David Lamparter
30771d65b2 lib: dynamic module loading
This adds a "-M" option to each daemon, to load dynamic modules at
startup.  Modules are by default located in /usr/lib/frr/modules (lib64
if appropriate).  Unloading or loading at runtime is not supported at
this point to keep things simple.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-24 13:02:05 +01:00
Donald Sharp
7f57883ee6 eigrp: Initial Commit
Please Note, I will be redoing this commit message with
more information.

Additionally I will rework the lib/* changes into their
own commits.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-08 23:07:46 -05:00
David Lamparter
eb05883f3e *: add frr_config_fork()
Centralise read_config/daemonize/dryrun/pidfile/vty_serv into libfrr.

This also makes multi-instance pid/config handling available as part of
the library.  It's only wired up in ospfd, but the code is in lib/.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-08 00:15:36 +01:00
David Lamparter
42350cfc6e build: only default-enable nhrpd on Linux
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-07 16:56:57 +01:00
Timo Teräs
caba609302 doc: add initial nhrpd documentation
[DL: resolved renaming & conflicts]
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-07 16:21:01 +01:00
Timo Teräs
2fb975da77 nhrpd: implement next hop resolution protocol
This provides DMVPN support and integrates to strongSwan. Please read
README.nhrpd and README.kernel for more details.

[DL: cherry-picked from dafa05e65fe4b3b3ed5525443f554215ba14f42c]
[DL: merge partially resolved, this commit will not build.]
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-07 16:20:29 +01:00
Quentin Young
855ddb28b5 *: remove QUAGGA_NO_DEPRECATED_INTERFACES
This define is used only to guard macros in lib/linklist.h which
themselves are not used anywhere in the codebase and have been marked
deprecated since anno domini 2005

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-02-27 01:14:40 +00:00
Martin Winter
5753eb9197 release: FRR 2.0-rc2
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-02-23 19:47:59 +07:00
Quentin Young
70abec3d71 *: remove QUAGGA_NO_DEPRECATED_INTERFACES
This define is used only to guard macros in lib/linklist.h which
themselves are not used anywhere in the codebase and have been marked
deprecated since anno domini 2005

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-02-17 18:19:27 +00:00
Christian Franke
5a1218aa53 tests: remove dejagnu
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-02-13 16:53:00 +01:00
Christian Franke
0b4191c147 tests: remove dejagnu
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-02-08 19:08:25 +01:00
Donald Sharp
7df2e1c379 Merge remote-tracking branch 'origin/stable/2.0' 2017-02-07 13:20:12 -05:00
Donald Sharp
55c7280315 *: Convert libzebra -> libfrr
The library libzebra that is installed with FRR will
conflict with Quagga.  So let's rename it to libfrr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-03 08:29:13 -05:00
Donald Sharp
1a35e2e565 Merge remote-tracking branch 'origin/stable/2.0' 2017-02-02 10:42:51 -05:00
Lou Berger
89ea231e43 master: point to https://github.com/freerangerouting/frr/issues 2017-01-27 16:24:03 -05:00
Lou Berger
1049b98d01 master: bump rev to 2.1-dev 2017-01-27 16:21:57 -05:00
Martin Winter
3ab11ecc7b snapcraft: Add snapcraft build and definition files
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-01-26 04:23:43 +07:00
David Lamparter
05dbb7df2f build: support bison < 3.0 for parse.error=verbose
*sigh*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-01-23 23:26:23 +01:00
Donald Sharp
ec5e6fcc59 Merge pull request #88 from pguibert6WIND/mergedown_vpn_old_format
Mergedown vpn old format
2017-01-20 10:52:17 -05:00
David Lamparter
16e32678b1 release: FRR 2.0-rc1 2017-01-19 17:45:51 +01:00
David Lamparter
00c03bc94b build: include copy of pkg.m4, fix invocation
pkg.m4 will be missing on systems that don't have pkg-config installed;
this renders the point of the configure check moot which is to find
pkg-config...

Also, PKG_PROG_PKG_CONFIG should be invoked unconditionally as described
in https://autotools.io/pkgconfig/pkg_check_modules.html

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-01-18 18:01:53 +01:00
Philippe Guibert
28436d6d26 configure: add enable_old_vpn_commands configuration param
This configure applies for BGP and keeps old for vpnv4/vpnv6
configuration and exploitation commands.
If not used, this old style vty commands will not be included.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2017-01-18 12:39:43 +01:00
David Lamparter
7758fe9f60 build: fix several ldpd XML-CLI build issues
- the location of ldp_vty_cmds.c can be either in srcdir or builddir,
  depending on whether a premade file from a dist tarball is used
- perl libxml support is only needed if that file is absent
- the actual perl script wasn't even included in the dist tarball
- the include location doesn't work when srcdir != builddir

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-01-17 19:00:10 +01:00
Donald Sharp
9aa7f43f7e Merge branch 'master' into cleanup 2017-01-13 14:48:16 -05:00
Donald Sharp
6f26de536b frr: Remove HAVE_LIBM from the system
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-13 08:05:53 -05:00
Donald Sharp
56c1f7d852 frr: Remove HAVE_IPV6 from code base
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-13 08:05:50 -05:00
Renato Westphal
95f5922d27 build: check if the LibXML perl module is available
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-01-09 12:38:26 -02:00
Donald Sharp
b89e46b2e2 Merge remote-tracking branch 'origin/stable/2.0' 2017-01-06 12:48:32 -05:00
Martin Winter
8b0cdbb8aa configure.ac: rename red hat spec from quagga.spec to frr.spec
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-01-07 00:12:16 +07:00
Donald Sharp
3b14d86eed Merge remote-tracking branch 'origin/stable/2.0' 2017-01-06 09:58:21 -05:00
Donald Sharp
438f5286d4 doc: Fixup quagga -> frr
Modify the documentation so that it talks about FRR instead of Quagga.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-04 07:53:30 -05:00
Donald Sharp
9473e34052 watchfrr: Rename watchquagga -> watchfrr
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-03 20:13:02 -05:00
David Lamparter
8e4da10b0a build: more renaming in configure.ac 2016-12-20 17:58:25 +01:00
David Lamparter
b2f361571b build: rename (1 of ?): configure.ac + preproc
This replaces Quagga -> FRR in most configure.ac settings as well as
a handful of preprocessor macros in the source code.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-20 17:57:47 +01:00
David Lamparter
a07169b1f6 doc: use config values from configure in manpages
This makes the actual change to the manpages to get ./configure effects
applied into them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-20 17:56:25 +01:00
David Lamparter
461c7bee69 doc: rename manpages to ".in" for autoconf
The manpages contain references to installation paths and thus should be
preprocessed by ./configure to get the actual paths.

This commit is an exact-rename so the changes for the preprocessing are
easier to review (diffs in renames are hard to read...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-20 17:54:22 +01:00
David Lamparter
a6cf5da4fd build: automake 1.12 to deal with flex & bison
bison conditionally writes its output to different files based on the
filenames specified in the source code.  This could be disabled,
however...  flex changes its output filenames when "prefix" is
specified.  And ylwrap from <1.11 doesn't understand how to handle the
header file...

...so this requires automake 1.12 which can deal with this properly.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-16 20:42:01 +01:00
David Lamparter
4a06690fca build: check flex >= 2.5.20 is available
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-16 20:42:01 +01:00
David Lamparter
0d37f9f325 build: fix bison < 3.0 compatibility
bison-2.7.x really wants "foo" for api.prefix while bison-3.0.x really
wants {foo} ... great.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-16 20:42:01 +01:00
Donald Sharp
6ba069f3ba quagga: Convert ldpd to be built by default
(cherry picked from commit a67ce7192143de7de0741af3d0b4f72ee57c7ffd)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-12-14 18:25:00 -02:00
David Lamparter
236dbdac06 Merge branch 'stable/2.0' 2016-11-28 19:26:28 +01:00
David Lamparter
955026c8f0 build: ditch outdated documents, including HACKING
To be re-added with a clean slate.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 19:03:10 +01:00
David Lamparter
a9c60ec13b build: bump version to 2.0-rc0
This isn't quite a release candidate yet, but to get things going let's
set this to "2.0-rc0".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 18:58:52 +01:00
David Lamparter
867f76c0b8 build: bump version to 2.0.999 for development
2.0 will be the release just forked off, so this can be 2.0.999 to flag
it as in-progress tree.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 18:55:31 +01:00
David Lamparter
82992fed8c Merge branch 'vtysh-grammar'
Conflicts:
	isisd/isisd.c
	lib/Makefile.am
	lib/thread.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 17:56:29 +01:00
David Lamparter
5ee1bde73d build: use ac_configure_args for CONFIG_ARGS
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:23:20 +09:00
David Lamparter
24f5e2fc62 build: massively remove needless checks
Since we have autoconf results from a wide swath of target platforms, we
can go remove checks that have the same result on all systems.

This also removes several "fallback" implementations of functions that,
at some point in the history, weren't available on all target platforms.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:23:17 +09:00
David Lamparter
a89b1641fd build: chop down complicated CFLAGS logic
Other packages don't have --with-cflags; we don't need it either.  The
user can specify CFLAGS= in the environment or on ./configure and that
would work perfectly fine.  If only it weren't for autoconf being an
idiot and adding its own "-g -O2" ... so we work around that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:07:27 +09:00
David Lamparter
2e83e8e94c build: unconditionally try -rdynamic
-rdynamic is needed for useful backtraces and future plugin loading
support.  Try and enable it unconditionally.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 10:52:09 +09:00
David Lamparter
428cd73fdc build: fix some minor autoconf & automake breakage
- use AS_HELP_STRING in configure.ac
- don't define HAVE_SETNS twice
- remove unused AM_LDFLAGS
- AC_PROG_RANLIB is automatically called by LT_INIT

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 10:28:15 +09:00
David Lamparter
095f8fae64 isisd: remove topology generator
Licensing is unclear and the tool is a testbed-only half-broken pile of
goo.  Remove.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-14 11:28:04 +09:00
Quentin Young
07321a065d Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	lib/command.c
	lib/vty.c
2016-11-12 05:17:37 +00:00
David Lamparter
4a96e94474 vtysh: add watchquagga to target list
Also tag some commands as VTYSH_REALLYALL; these are absolutely
neccessary for correct vtysh operation and will cause "interesting"
breakage if not present on all daemons.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-09 14:29:45 +01:00
David Lamparter
95c4aff294 watchquagga: add "write integrated"
This new command - available for internal use by vtysh and explicit
usage by users - calls "vtysh -w" from watchquagga.  This ensures vtysh
is run with privileges to actually write the integrated-config file.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-09 14:29:39 +01:00
Quentin Young
476e95e3f3 Merge branch 'cmaster-next' into vtysh-grammar 2016-11-03 20:43:41 +00:00
Donald Sharp
73ea75daa5 Modify build version.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-10-28 20:44:12 -04:00
Martin Winter
1769aff8fd build: configure.ac - use AC_PROG_CC_C99 instead of cflags to force c99 mode 2016-10-26 09:36:09 -04:00
Quentin Young
e9e190f245 Merge branch 'cmaster-next' into vtysh-grammar
Conflicts:
	vtysh/vtysh.c
	zebra/zebra_vty.c
2016-10-25 19:38:04 +00:00
Donald Sharp
87ab4aec50 vtysh: Allow vtysh to not know about enabled daemons/features
With the way that vtysh works, it compiles in cli even
if there is no support in the protocols.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-10-25 08:26:09 -04:00
Quentin Young
0a538fc98f Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	isisd/isis_routemap.c
	zebra/rt_netlink.c
2016-10-20 16:31:49 +00:00
Quentin Young
e52702f29d Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	bgpd/bgp_route.c
	bgpd/bgp_routemap.c
	bgpd/bgp_vty.c
	isisd/isis_redist.c
	isisd/isis_routemap.c
	isisd/isis_vty.c
	isisd/isisd.c
	lib/command.c
	lib/distribute.c
	lib/if.c
	lib/keychain.c
	lib/routemap.c
	lib/routemap.h
	ospf6d/ospf6_asbr.c
	ospf6d/ospf6_interface.c
	ospf6d/ospf6_neighbor.c
	ospf6d/ospf6_top.c
	ospf6d/ospf6_zebra.c
	ospf6d/ospf6d.c
	ospfd/ospf_routemap.c
	ospfd/ospf_vty.c
	ripd/rip_routemap.c
	ripngd/ripng_routemap.c
	vtysh/extract.pl.in
	vtysh/vtysh.c
	zebra/interface.c
	zebra/irdp_interface.c
	zebra/rt_netlink.c
	zebra/rtadv.c
	zebra/test_main.c
	zebra/zebra_routemap.c
	zebra/zebra_vty.c
2016-10-17 23:36:21 +00:00
vivek
1fdc9eae2d zebra: Refactor netlink interactions
Separate core netlink functions and library functions from route-related
interactions and interface-related interactions.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>

Ticket: CM-13199
Reviewed By: CCR-5254
Testing Done: bgp-min, ospf-min
2016-10-17 12:39:55 -07:00
Lou Berger
f95f2ad915 vnc: default to enabled 2016-10-03 08:17:19 -04:00
Lou Berger
65efcfce42 bgpd: add L3/L2VPN Virtual Network Control feature
This feature adds an L3 & L2 VPN application that makes use of the VPN
and Encap SAFIs.  This code is currently used to support IETF NVO3 style
operation.  In NVO3 terminology it provides the Network Virtualization
Authority (NVA) and the ability to import/export IP prefixes and MAC
addresses from Network Virtualization Edges (NVEs).  The code supports
per-NVE tables.

The NVE-NVA protocol used to communicate routing and Ethernet / Layer 2
(L2) forwarding information between NVAs and NVEs is referred to as the
Remote Forwarder Protocol (RFP). OpenFlow is an example RFP.  For
general background on NVO3 and RFP concepts see [1].  For information on
Openflow see [2].

RFPs are integrated with BGP via the RF API contained in the new "rfapi"
BGP sub-directory.  Currently, only a simple example RFP is included in
Quagga. Developers may use this example as a starting point to integrate
Quagga with an RFP of their choosing, e.g., OpenFlow.  The RFAPI code
also supports the ability import/export of routing information between
VNC and customer edge routers (CEs) operating within a virtual
network. Import/export may take place between BGP views or to the
default zebera VRF.

BGP, with IP VPNs and Tunnel Encapsulation, is used to distribute VPN
information between NVAs. BGP based IP VPN support is defined in
RFC4364, BGP/MPLS IP Virtual Private Networks (VPNs), and RFC4659,
BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN . Use
of both the Encapsulation Subsequent Address Family Identifier (SAFI)
and the Tunnel Encapsulation Attribute, RFC5512, The BGP Encapsulation
Subsequent Address Family Identifier (SAFI) and the BGP Tunnel
Encapsulation Attribute, are supported. MAC address distribution does
not follow any standard BGB encoding, although it was inspired by the
early IETF EVPN concepts.

The feature is conditionally compiled and disabled by default.
Use the --enable-bgp-vnc configure option to enable.

The majority of this code was authored by G. Paul Ziemba
<paulz@labn.net>.

[1] http://tools.ietf.org/html/draft-ietf-nvo3-nve-nva-cp-req
[2] https://www.opennetworking.org/sdn-resources/technical-library

Now includes changes needed to merge with cmaster-next.
2016-10-03 08:17:02 -04:00
Donald Sharp
69b5e938fe Merge remote-tracking branch 'origin/cmaster' into cmaster-next 2016-09-29 20:24:49 -04:00
Renato Westphal
f134bf2b52 zebra: add missing files to EXTRA_DIST
This fixes RPM package generation on CentOS 7.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-26 11:41:50 -04:00
Avneesh Sachdev
3b8282a8e8 build: support for "development build"
* configure.ac

    Add the --enable-dev-build flag. It controls the DEV_BUILD
    define for autoconf and automake, which can be used to
    conditionally build in code that is only intended for development..

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
2016-09-23 12:12:17 -04:00
Avneesh Sachdev
93c7bed1c9 fpm: Add protobuf support for FPM.
Code that allows a client to convey routes to a Forwarding Plane
Manager component using protobuf instead of netlink..

  * fpm/fpm.proto

    Protobuf definitions pertaining to the Forwarding Plane Manager.
    In particular, this file defines the AddRoute and DeleteRoute
    messages.

  * fpm/fpm.h

    Tweak FPM message header definition to also allow messages to be
    encoded in protobuf format.

  * fpm/{fpm_pb.h,.gitignore,.Makefile.am}

    Add the fpm_pb library, which contains code for interfacing with
    the FPM using protobuf.

  * configure.ac

    Generate fpm/Makefile.

  * Makefile.am

    Add fpm subdirectory to build.

  * common.am

    Add flags to be used by clients of the fpm_pb library.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
2016-09-23 12:12:16 -04:00
Avneesh Sachdev
f77cba1bf5 build: turn off automake portability warnings
Modify configure.ac to disable portability warnings for automake --
our automake code (in particular common.am) uses some constructs
specific to gmake.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
2016-09-23 12:12:16 -04:00
Avneesh Sachdev
dad253b46d qpb: Add support for protobuf.
Infrastructure that allows protocol buffers to be used in Quagga. The
changes below comprise of:

  - Build hooks

  - Protobuf definitions for common types.

  - Library routines for working with protobuf, including functions
    that help translate between common quagga types and their protobuf
    equivalents.

Changes:

  * qpb/{Makefile.am,README.txt,qpb.h,.gitignore}

    Add the qpb library, which provides shared code and definitions
    for using protocol buffers in quagga code.

  * qpb/qpb.proto

    Protobuf definitions that can be shared by all of quagga.

  * qpb/linear_allocator.h

    An allocator that allocates memory by walking down towards the end
    of a buffer. This is used to cheaply allocate/deallocate memory on
    the stack for protobuf operations.

  * qpb/qpb_allocator.[ch]

    Thin layer that allows a linear allocator to be used with the
    protobuf-c library.

  * common.am

    This is an automake fragment that is intended to be shared by
    Makefile.am files in the tree. It currently includes definitions
    related to protobuf.

  * configure.ac

    - Add logic to optionally build protobuf code.

      By default, protobuf support is enabled if the protobuf C
      compiler (protoc-c) is available, and the associated header
      files/library can be found.

      The user can choose to override this behavior via the new
      --disable-protobuf/--enable-protobuf flags.

    - Include the quagga protobuf library (qpb) in the build.

  * .gitignore

    Ignore source code generated by protobuf compiler.

  * Makefile.am

    Add 'qpb' to the list of subdirectories.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>

Edited: Paul Jakma <paul.jakma@hpe.com>: Change the sense of the
        configure enable option to require explicit specifying, as
        an experimental feature.
2016-09-23 12:12:16 -04:00
Renato Westphal
fe6c7157bf zebra: check at startup if the kernel supports MPLS
Replace all HAVE_MPLS #ifdef's by a run-time check if MPLS is supported
by the kernel or not. This way we don't need to create multiple packages
for each OS distribution.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23 09:31:25 -04:00
Renato Westphal
d3e2c74ada mpls: add support to the OpenBSD kernel
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23 09:31:15 -04:00
Renato Westphal
be0dba358f mpls: add null driver
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23 09:31:13 -04:00
Renato Westphal
eac6e3f027 ldpd: adapt the code for Quagga
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23 09:31:09 -04:00
Donald Sharp
460a768914 Merge remote-tracking branch 'origin/cmaster-next' into vtysh-grammar 2016-09-20 21:17:34 -04:00
Quentin Young
844ec28cee Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	lib/.gitignore
	lib/command.c
	lib/command.h
2016-09-21 22:11:53 +00:00
Donald Sharp
4d41dd8ba2 bgpd: Revert --enable-bgp-standalone
Reverts the --enable-bgp-standalone and makes it so that you
need to use --enable-cumulus to get the cumulus behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-20 07:57:41 -04:00
David Lamparter
802e2cdd3a build: goodbye, gawk
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-19 16:31:08 -04:00
Donald Sharp
e544fa8509 debian: Update release information
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-09 14:42:59 -04:00
Feng Lu
13460c44a2 lib, vtysh: support multiple VRFs by using linux netns
We realize VRFs with linux netns by default. The main job is
to associate a VRF with a netns. Currently this is done by
the configuration:

  [no] vrf N netns <netns-name>

This command is also available in vtysh and goes to only
zebra, because presently only zebra supports multiple VRF.

A file descriptor is added to "struct vrf". This is for the
associated netns file. Once the command "vrf N netns NAME"
is executed, the specified file is opened and the file
descriptor is stored in the VRF N. In this way the
association is formed.

In vrf_socket(), we first switch to the specified VRF by
using the stored file descriptor, and then can allocate
a socket which is working in the associated netns.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
(cherry picked from commit 55cfa2f190620f7c711944637659bc208970324d)
2016-09-09 12:15:14 -04:00
Donald Sharp
b5826a12a2 bgpd: Allow bgp to work standalone
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-08 18:48:02 -04:00
Pawel Wieczorkiewicz
50cfc0d2d7 build: detect and create AM_SILENT_RULES macro if needed
Older libs have problem with that:
configure.ac:17: warning: macro `AM_SILENT_RULES'
  not found in library
...
configure.ac:24: error: possibly undefined macro:
   AM_SILENT_RULES
Tested-by: NetDEF CI System <cisystem@netdef.org>
2016-09-03 11:05:51 -04:00
Jafar Al-Gharaibeh
0b02a1b49b config: Give the option of disabling run as user/group
Leave "user/group" unset when explicitly configuring with
"--disable-user" / "--enable-user=no" and
"--disable-group" / "--enable-group=no"
This allows quagga to skip unsupported system calls such
as setuid() on certain platfroms.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
2016-09-03 07:32:57 -04:00
Thomas Petazzoni
4c2f8e95a1 configure: fix static linking with readline
When static linking is used, the order of the libraries is important,
and the libraries using a symbol from another library should be listed
*before* the library providing that symbol (see
http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking)
for details.

When vtysh is linked statically, the command line contains "-lcurses
-lreadline", which causes a build failure due to unresolved
symbols. This is because readline is using symbols from the curses
library: the order should be the opposite.

This patch fixes that problem by putting the -lreadline at the
beginning of the LIBREADLINE variable calcualted by the configure
script.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2016-09-02 12:54:13 -04:00
Donald Sharp
628426cd9d ospfd: Remove HAVE_OSPF_TE
Remove from ospf the HAVE_OSPF_TE define and just always have
ospf traffic engineering.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
(cherry picked from commit 693da6096a28eef5eadeea699771265987b3ec0c)
2016-08-16 12:46:31 -04:00
Donald Sharp
cd66cd4ce1 ospfd: Remove HAVE_OPAQUE_LSA
HAVE_OPAQUE_LSA is used by default and you have to actively turn it off
except that OPAQUE_LSA is an industry standard and used pretty much
everywhere.  There is no need to have special #defines for this anymore.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 36fef5708d074a3ef41f34d324c309c45bae119b)
2016-08-16 12:43:05 -04:00
Renato Westphal
b3f2bf7cbe pimd: add a workaround for *BSD
VIFF_USE_IFINDEX is not available on BSDs and other UNIX systems. In
order to build pimd on these platforms, use 'vifc_lcl_addr' instead of
'vifc_lcl_ifindex' to specify the interfaces we want to enable forwarding
of multicast traffic. In the case of unnumbered interfaces, print an
error and return.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-08-07 21:05:26 -04:00
Renato Westphal
60060acc54 bgpd: use utsname.domainname only when available
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-08-07 21:05:26 -04:00
Donald Sharp
cbca9a189c Merge remote-tracking branch 'origin/cmaster' into cmaster-next 2016-08-07 20:56:35 -04:00
Donald Sharp
473b996bfc quagga: Set version strings appropriately
Set the version strings to be correct for the upcoming
3.1 release of Quagga.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-08-02 04:54:45 -04:00
Donald Sharp
10b8ab2691 configure: Auto pick-up the correct json env
Fix the code to allow Quagga to automatically
compile with the correct json library.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

Conflicts:
	configure.ac
2016-08-01 14:13:36 -04:00
Donald Sharp
275382273b Merge remote-tracking branch 'origin/cmaster' into cmaster-next 2016-07-12 20:24:00 -04:00
Quentin Young
bbf5ffa08d lib: Update build config for new parser
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-12 15:05:05 +00:00
Donald Sharp
6776485dee quagga: Allow compile time determination of v6 RR semantics
The patches to allow kernel v6 Route Replacement semantics
to work correctly are on a very recent kernel.  If you are
compiling on a linux kernel where it's broken, just
compile with --disable-rr-semantics.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 76981cd383)
2016-06-20 09:06:07 -04:00
Donald Sharp
76981cd383 quagga: Allow compile time determination of v6 RR semantics
The patches to allow kernel v6 Route Replacement semantics
to work correctly are on a very recent kernel.  If you are
compiling on a linux kernel where it's broken, just
compile with --disable-rr-semantics.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-20 08:21:00 -04:00
Donald Sharp
530d701611 configure.ac: Add back HAVE_SYSTEMD
When the change was made to add some additional
code to make sure systemd was actually installed
on the system, the HAVE_SYSTEMD #define was
accidently removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-16 19:35:48 -04:00
Donald Sharp
9d92810cf1 quagga: Modify code to build properly in tools and cumulus
The tools and cumulus directories were not properly
being included for the 'make dist' step to allow
for proper distribution of code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

Conflicts:
	Makefile.am
2016-06-15 07:36:41 -04:00
Donald Sharp
c2f4c19cdc configure: Auto pick-up the correct json env
Fix the code to allow Quagga to automatically
compile with the correct json library.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

Conflicts:
	configure.ac
2016-06-15 07:36:41 -04:00
Donald Sharp
97da92655c configure: Ensure systemd development is present
If a users specifies that they should use systemd
then ensure that the systemd can be compiled against it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

Conflicts:
	configure.ac
2016-06-15 07:36:41 -04:00
Donald Sharp
1018422a57 quagga: Modify code to build properly in tools and cumulus
The tools and cumulus directories were not properly
being included for the 'make dist' step to allow
for proper distribution of code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-14 08:15:48 -04:00
Donald Sharp
63e308646a configure.ac: Add back HAVE_SYSTEMD
When the change was made to add some additional
code to make sure systemd was actually installed
on the system, the HAVE_SYSTEMD #define was
accidently removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-10 15:07:21 -04:00
Donald Sharp
112072ac87 configure: Auto pick-up the correct json env
Fix the code to allow Quagga to automatically
compile with the correct json library.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-10 09:17:37 -04:00
Donald Sharp
3721995872 configure: Ensure systemd development is present
If a users specifies that they should use systemd
then ensure that the systemd can be compiled against it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-10 09:17:21 -04:00
David Lamparter
988225dde1 build: determine CFLAGS more intelligently
Instead of hardcoding some compiler detection, this just checks which
CFLAGS actually work with the compiler specified by the user.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3a7e83c2387885075c9ecf1912dd6c9399c6947a)
2016-06-08 14:02:49 -04:00
David Lamparter
7f720f5410 vtysh: drop unused variables & RETSIGTYPE
Drop unused return values in vtysh.  Also gets rid of the rather funny
prototyping of signal setup in vtysh - which as a side effect makes it
not need AC_TYPE_SIGNAL in configure.ac anymore.  It wasn't used
sensibly to begin with...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 6769f43de9d595b935f2ebf1cae1428e1d1a3a5f)
2016-06-08 13:55:07 -04:00
David Lamparter
c3a9461e03 build: enable isisd by default
Most distributors enable it anyway, and it's not THAT broken anymore to
mandate disabling it by default.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 15:54:20 -04:00
David Lamparter
80db5ac178 build: track config args
Record the ./configure arguments used and make them user-visible.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 15:53:42 -04:00
David Lamparter
80ec006d01 build: remove --disable-ipv6
Building with IPv6 disabled tends to break rather often and sprinkles
ugly #ifdefs around the code.  All that only to support systems where
the C library doesn't have IPv6 capability.

The year now being 2015, if this is a problem the thing to fix is the C
library.

The implication of this patch is that future patches need not care about
HAVE_IPV6 = 0 and may remove ifdefs gratuitously.  This patch doesn't
remove these ifdefs to not create unneccessary churn.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 15:51:36 -04:00
David Lamparter
9e8da292d1 build: get rid of INCLUDES, use AM_CPPFLAGS
INCLUDES in configure.ac was not used at all, and INCLUDES in
Makefile.am is supposed to be AM_CPPFLAGS these days.

Reduces warnings spewed during bootstrap/autoreconf.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit 237aac56960575f6ad2451ba2796d94bd5ae4b33)
2016-06-03 15:46:59 -04:00
David Lamparter
2392578406 build: harmonize configure help strings
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit b6fa76098d127f5641a7dda0dee21f06ca167edb)
2016-06-03 15:02:12 -04:00
David Lamparter
a77d2023d7 build: remove --enable-solaris parameter
This switch controlled descending into the solaris/ subdirectory, which
contains package descriptions and init scripts.  If they're not
appropriate, they'd better be removed outright.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 14:54:14 -04:00
David Lamparter
865730ab9f zebra: remove rt_ioctl kernel interface
None of the BSDs uses ioctls to set routes anymore.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 14:51:51 -04:00
David Lamparter
42bb3dfdfa build: remove ancient Linux/BSD IPv6 cruft
IPv6 functions in a separate library... yeah, right.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 14:46:56 -04:00
David Lamparter
1cbb5dfc29 build: remove INRIA, NRL and MUSICA IPv6 quirks
Valar dohaeris.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 14:40:03 -04:00
David Lamparter
a4247f4b69 build: remove AIX, NEC EWS and IRIX
Valar morghulis.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
2016-06-03 14:29:00 -04:00
David Lamparter
35c4bf71e5 build: remove Linux non-netlink config
This path is deprecated, completely untested, likely broken and will not
be maintained.  Kill it with fire.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit 2e5ca49758543cde69d98f4a6a7b39486e88311d)

Conflicts:
	configure.ac
	zebra/if_proc.c
	zebra/rtread_proc.c
2016-06-03 14:20:42 -04:00
Paul Jakma
9bc6875ad6 configure: Fix warnings on CentOS and bump the minimum autoconf version
* configure.ac: Bump the minimum version to 2.60 as needed by
  AC_USE_SYSTEM_EXTENSIONS.  AC 2.60 is nearly 10 years old, note.  Add
  AC_PROG_RANLIB, for when --disable-shared is used.

  There are other warnings on, e.g., CentOS 6.7 with 2.63, but they
  don't go away if the suggestion to add AC_SYSTEM_EXTENSIONS is
  followed. This warning doesn't occur on Fedora with AC 2.69.

  Note: autoconf (and other auto*) should only be needed on developer
  machines building direct from git.  Other systems should be using the
  'make dist' tarballs, with a ready-made build system, that does not
  need auto* intalled.

(cherry picked from commit f9f4731245eb9f83d0795acac24183c6cf709288)
2016-05-26 15:33:34 +00:00
Paul Jakma
63a1386455 build/lib: Check for and include stdbool.h by default
* stdbool.h should be widely supported by now, and the 'bool' type makes
  more semantic sense than an integer type for boolean values.

(cherry picked from commit e8441a81f6c9f73bc8a25669003abffb40066703)
2016-05-26 15:33:31 +00:00
Brian Bennett
373ba5cd5d build: Extend ip_mreq hack to DragonFlyBSD and SunOS
This extends the ip_mreq hack to DragonFlyBSD and SunOS. This has been
in pkgsrc for some time. I've cleaned up the pkgsrc patch a little and
am submitting it upstream. Credit is due to pkgsrc maintainers.

Tested on SmartOS (illumos).

Fixes: #819
Signed-off-by: Greg Troxel <gdt@ir.bbn.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b8a893c38e97377b2a2582b1621b988e55811412)
2016-05-26 15:25:13 +00:00
David Lamparter
e54583ead1 build: enable AM_SILENT_RULES
This shuts up make by default (can be reversed with "make V=1" or
--disable-silent-rules).  This is useful since warnings and error
messages become more visible with less noise.

Tested on Linux with GNU make and FreeBSD with system's BSD make.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit cc81308148271aeed2277e16885ddca7e2d5bb9b)
2016-05-26 15:25:13 +00:00
David Lamparter
3a0d83b689 build: remove bogus/deprecated inet_* tests
These actually break configure on FreeBSD very subtly, because inet_aton
and __inet_aton are both detected, and then later other tests get
warnings about HAVE_INET_ATON being defined twice.

That said, they're incorrect to begin with since they detect alternative
functions but there is nothing in place to actually use these
alternates.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit 79f74962d20fa2c90df5a57335fc3b5e19bfeccf)
2016-05-26 15:24:51 +00:00
Joakim Tjernlund
bccbd141d2 [lib] Add support for backtrace on more platforms
* lib/sigevent.c: (program_counter) extend to support more platforms. Joint
  effort with Paul Jakma.

(cherry picked from commit b166ea2dda9f04a8b75e0bf5adb7064580695f22)
2016-05-26 01:09:43 +00:00
Donald Sharp
5fd1f74742 quagga: Fix bug in handling of --enable-shell-access
The macro to expand and handle --enable-shell-access was
broken.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:35 -04:00
Paul Jakma
95bb83054b build: Remove the old PIC/PIE patch, let libtool sort it out
* Remove the old change from '08 to add in PIE arguments at automake level.
  Versions of libtool since then know how to deal with -fpie and do the right
  thing according to whether its building shared or executable objects.
  So just pass '-fpie' as CFLAG and let libtool do its thing.
2016-05-25 20:38:35 -04:00
Donald Sharp
f0646db01d build: Enable vtysh and pimd as part of default build
The default build needs vtysh and pimd as a default build so
that when a change is made we can catch build issues before they
become a problem.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:33 -04:00
Donald Sharp
a724477d97 pim_mroute.h has a different version of code than linux/mroute.h provides
linux/mroutes.h and pim_mroute.h both have copies of the same structures.
This is causing failures in setsockopt(..., MRT_ADD_MFC,...) because
of data structure incompatibilities between the kernel and what
pim_mroute.h was providing.  Modify the code to check for mroute.h
and include it if necessary.  I did not modify the non linux/mroute.h
path because I do not have other systems to test on easily.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:32 -04:00
David Lamparter
12e41d03bd pimd: merge pimd as of 2015-01-19
Welcome pimd to the Quagga daemon zoo!

This is a merge of commit 77ae369 ("pimd: Log ifindex found for an
interface when zebra lib reports a new connected address."), with
the intermediate "reconnect" changes removed (c9adf00...d274381).
d274381 is replaced with b162ab7, which includes some changes.  In
addition, 4 reconnect-related changes and 1 cosmetic one have been
bumped out.

The rebase command used to produce the branch that is merged here is:
  git rebase --onto b162ab7 c9adf00 77ae369

Note that 3 patches had their author rewritten from
    "Anonymous SR#108542 <>" (which is not a valid git author ID)
to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address
                               listed in the associated Savannah ticket)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-05-25 20:38:32 -04:00
Donald Sharp
040064c8ab quagga: Remove WEAK_ALIAS pragma usage
The code was using pragma's to override function calls
while there was code for platforms that don't support pragma's
Just remove the pragma usage from the program in it's entirety

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-05-19 10:41:25 -04:00
Donald Sharp
dc1810914c debian: Fix changelog
Fixup Changelog

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-10 15:06:14 -04:00
Donald Sharp
0d9e445ef4 quagga: Fix version string
Modify cl3.0 -> cl3u1

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-05-03 07:26:44 -04:00
Donald Sharp
75f1349106 quagga: Check for existence of IFLA_INFO_SLAVE_KIND
IFLA_INFO_SLAVE_KIND is a new type of netlink message
If the kernel makes it available compile in support
else we'll just silently do the right thing.

Additionally reduce the test cases for netlink by 1
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2016-04-15 15:07:59 -04:00
David Lamparter
4a9ea50e1b lib: add getgrouplist() for Solaris
Of course Solaris doesn't have getgrouplist()...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-04-08 20:33:15 -04:00
Donald Sharp
d8717ee0b6 quagga: Setup the proper version number in quagga
Fix configure.ac to have the proper cumulus version #.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-03-22 08:37:12 -04:00
Donald Sharp
0a95a0d0b6 lib: Add ability to use poll() instead of select
This patch originated w/ Hannes Hofer <hhofer@barracuda.com>.
I've taken the patch fixed some bugs and reworked the code
to allow both poll and select to be choosen at compile time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-04 12:33:57 -05:00
Donald Sharp
000cf1fb35 debian, config, zebra: Ensure Cumulus Extensions are not auto turned on
There exist cases where Cumulus Code( in this case code surrounding
when we want to send Router Advertisements ) should only be
turned on for Cumulus Switches.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-02-23 07:46:54 -05:00
Daniel Walton
41d9cc6a65 quagga: remove babel
Ticket: CM-9274
Reviewed By: sharpd@cumulusnetworks.com
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
2016-02-11 08:55:24 -08:00
Daniel Walton
f87adf0a5f Build was broken if systemd was not installed
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2016-02-10 20:47:05 +00:00
Donald Sharp
ddd82ff66c lib: Add library code to interact with systemd
Modify the lib/ code to include the ability to interact
with systemd.  Provide the ability to interact with
systemd's watchdog timer as well.

There is no code here that actually uses this change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-02-10 15:06:59 -05:00
Donald Sharp
ebe2d9cac8 config: Remove unused library check
configure.ac is looking for the setproctitle library,
which while it might be useful, we never call setproctitle
or any other function that the library might expose.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-02-02 18:18:07 -08:00
Donald Sharp
90fb3e1389 debian: Use 256 multipaths
Turn on the ability for Quagga to use 256 multipaths

Ticket: CM-8098
Reviewed-by: Daniel Walton and Don Slice
Testing: Hand tested
2016-01-27 08:28:14 -08:00
Donald Sharp
7a6da5bad3 build: Make MULTIPATH_NUM a config.h value
MULTIPATH_NUM is setup inside of the Makefile.am DEFS to pass
in on the command line.  This fix moves the MULTIPATH_NUM
from there into config.h.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2015-12-08 10:02:39 -08:00
Donald Sharp
7c5d2b76c6 Quagga: Set MULTIPATH_NUM to 64 when user specifies 0 from cli
The code has tests to see if the MULTIPATH_NUM == 0 and to
treat it like the user has entered 'Maximum PATHS'.
This 0 is treated as 64 internally.  Remove this dependency
and setup MULTIPATH_NUM to 64 when --enable-multipath=0 from
the configure cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2015-11-17 08:13:23 -08:00
Donald Sharp
576b6b5d18 Quagga: Restrict Shell Access
Ticket: CM-6926
Reviewed By: CCR-3328
Tested: See bug

Restrict Shell access to those people who intentionally turn it on.
As that it can be used as a exploit to elevate permissions
2015-08-12 16:11:07 -07:00
Donald Sharp
aa9584c1cf Add --enable-werror to configure 2015-07-25 16:05:56 -07:00
Donald Sharp
d8dc52578c bgpd-ttl-fix.patch
BGP: Fix MINTTL and IPV6_MINHOPCOUNT

The #defines for IP_MINTTL and IPV6_MINHOPCOUNT need to be handled
correctly as part of the configure.ac code. Instead of hard coding
the values directly in the code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2015-05-19 18:46:10 -07:00
Donald Sharp
b05a1c8b75 Add json output support for a few BGP show commands 2015-05-19 18:03:48 -07:00
Donald Sharp
3f9c7369f7 BGP: Add dynamic update group support
This patch implements the 'update-groups' functionality in BGP. This is a
function that can significantly improve BGP performance for Update generation
and resultant network convergence. BGP Updates are formed for "groups" of
peers and then replicated and sent out to each peer rather than being formed
for each peer. Thus major BGP operations related to outbound policy
application, adj-out maintenance and actual Update packet formation
are optimized.

BGP update-groups dynamically groups peers together based on configuration
as well as run-time criteria. Thus, it is more flexible than update-formation
based on peer-groups, which relies on operator configuration.

[Note that peer-group based update formation has been introduced into BGP by
Cumulus but is currently intended only for specific releases.]

From 11098af65b2b8f9535484703e7f40330a71cbae4 Mon Sep 17 00:00:00 2001
Subject: [PATCH] updgrp commits
2015-05-19 18:03:47 -07:00
Timo Teräs
3ef0b877f0 build: do not assume glibc on linux
The whole IPv6 stack detection could need refactoring. But this
fixes the linux check to not assume glibc. Fixes build against
musl c-library.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2014-08-18 01:50:26 +02:00
Timo Teräs
16ffb26fbb *: fix detection and usage of sys/cdefs.h
This header is non-standard (though present on many systems) and
there is no standard for what it should or should not define.

Remove it where it is not really needed. But add also a configure
check, so it can be used if available but otherwise fallback to
defining the needed macroes.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2014-08-18 01:50:19 +02:00
David Lamparter
a4b5665f76 release: 0.99.23 2014-06-24 07:14:20 +02:00
David Lamparter
fdb913aedb build: Quagga 0.99.23-rc1
this is not a full release version, so neither release notes nor
documentation are updated yet.  Also, signing the tag with my private
GPG key instead of the Quagga one.
2014-06-03 18:43:07 +02:00
David Lamparter
98a59492d9 build: remove now-useless --{en, dis}able-tests
commit d771020 "don't build tests unless make check is run" has made the
 --{en,dis}able-tests switch completely useless.  The differentiation is
now made by running "make check" or not doing so.  The only effect of
the switch is an "empty" excursion of make into the tests/ directory.

(well, and it turns "make check" useless from the main directory if
 --disable-tests is given, which I don't think makes sense either)

Acked-by: Greg Troxel <gdt@ir.bbn.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2014-04-01 17:23:21 +02:00
David Lamparter
8c99b4c11e build: improve backtrace support/detection
libexecinfo is used to provide backtrace() on *BSD.  The API is
compatible with glibc's, so this is a "free" improvement.

To improve configure behaviour, the following configure options are
modified/introduced:

* --enable-gcc-rdynamic now defaults to "on" if the compiler is gcc.
  (I sadly wasn't able to find any documentation on the availability of
  this option for llvm, even though at least the version I have
  installed does support it)

* --enable-backtrace has been added.  This behaves as off/auto/on
  switch, i.e. giving either {dis,en}able will result in the requested
  behaviour (or an error if support wasn't found)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2014-04-01 17:20:44 +02:00
David Lamparter
c69905b673 tests: DejaGNU libzebra
Wrap the few libzebra test programs we have up for DejaGNU.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-04-14 16:01:19 +02:00
David Lamparter
5bb7e4d12b tests: DejaGNU bgpd
this just wraps the existing test programs in expect wrappers that make
their results usable to DejaGNU.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-04-14 16:01:11 +02:00
David Lamparter
f281ab9752 tests: add DejaGNU framework
DejaGNU seems to be the 'standard' GNU test framework (which by itself
doesn't say much), but it seems relatively usable and the "remote
system" capabilities might come in handy for virtualisation-based tests
for kernel interactions or something.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-04-14 16:01:05 +02:00
David Lamparter
66b63aa036 release: 0.99.22 2013-02-10 03:09:32 +01:00
David Lamparter
955be06f8a build: Quagga 0.99.22-rc1
this is not a full release version, so neither release notes nor
documentation are updated yet.  Also, signing the tag with my private
GPG key instead of the Quagga one.
2013-01-16 01:50:52 +01:00
David Lamparter
ca3ccd8748 zebra: fix sockaddr_dl length assumptions (BZ#737)
Quagga makes bad assumptions about sockaddr_dl (on NetBSD, but possibly
on other systems as well).  Particularly, sizeof(struct sockaddr_dl)
returns a size that does not include the full sdl_data field, leading to
not enough data being copied.  This breaks IPv6 RAs in particular, as
a broken mac address from sockaddr_dl will be included in the packets.

From: Matthias-Christian Ott <ott@mirix.org>
Tested-by: Uwe Toenjes <6bone@6bone.informatik.uni-leipzig.de>
[further simplified + more comments]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-01-16 01:45:57 +01:00
Hasso Tepper
ea05767770 build: Fix build on MacOSX 10.8 (Mountain Lion)
Newer MacOSX versions have support for both IPv6 advanced socket API
RFCs (2292 and 3542) switchable in compile time, but neither of these
is default for some strange reason. RFC3542 will be default in future,
but for now we have to declare that we want to use the RFC3542 API
before including <netinet/in.h>.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-01-15 17:57:03 +01:00
Hasso Tepper
303bb00588 build: Remove deprecated AM_CONFIG_HEADER
AM_CONFIG_HEADER has been deprecated for many years and is removed
completely from automake 1.13.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-01-15 17:56:57 +01:00
Stephen Hemminger
47f6aef02b configure: allow building without getrusage
Measuring the resource usage of threads is moderately expensive
since it requires doing an additional system call everytime a
thread context switches. Make it possible to disable this with
a configuration option.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-01-15 17:49:46 +01:00
Hasso Tepper
675769b1b1 build: MacOSX needs BSD struct ip_mreq hack too
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-01-11 21:50:06 +01:00
Doug VanLeuven
327c4cdf75 testzebra: pragma weak: detect systems with weak alias and provide alternative
LLVM clang does not support #pragma weak (bug 3679) on OS X. There are
other systems where the #pragma weak has varying syntax.

Added m4 file from the autoconf archives:
http://www.gnu.org/software/autoconf-archive/ax_sys_weak_alias.html

Fix up zebra/*_null.c files to use #pragma weak alias or stub functions
if not available. It's incomplete in that the different format #pragma
enable easier fixes on need.

Tested on 64bit OS X 10.7, FreeBSD 9.0 amd64 & i386 (32bit) using
gcc & clang. Tested on linux 64bit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-01-11 21:50:06 +01:00
David Lamparter
a16dcf7c11 build: check for .git in configure.ac
Don't error out when someone tries using --with-pkg-git-version on
something that isn't actually a git checkout (like a dist tarball).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-13 11:20:50 +01:00
David Lamparter
fd76f41ac0 build: update ICC warning CFLAGS
Intel's icc doesn't accept "-wd <number>" anymore, it's "-wd<number>"
these days.  But, anyhow, the warnings disabled in Quagga's configure.ac
don't seem to appear anywhere at all, so let's just remove the option
completely.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-13 10:41:18 +01:00
David Lamparter
0be793e674 build: include git info
If enabled with --with-pkg-gitversion on ./configure, this will append
git version strings and branch information at the following places:
 - overall version number: 0.99.21-g0123456
 - login motd and show version: tag information + git id + branches

Sample output:
  Hello, this is Quagga (version 0.99.21-g14b49ad-dirty).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.

  This is a git build of quagga_0_99_21_release-106-g14b49ad-dirty
  Associated branch(es):
	local:master

[v2]: fix build without gitinfo (add "else" branch)
[v2]: fix for repos without any tags (different git describe output)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12 15:34:37 +01:00
Avneesh Sachdev
5adc2528d3 zebra: add module to communicate routes to FPM
Enhance zebra to send routes to the (optional) Forwarding Path Manager
component using the interface defined by fpm/fpm.h.

  * configure.ac

    - Add --enable-fpm flag.

      The FPM-related code in zebra is activated only if the build is
      configured with '--enable-fpm'.

    - Add HAVE_NETLINK automake conditional.

      This allows us to conditionally build netlink-dependent C code.

  * zebra/{rib.h,zebra_rib.c}

    - Add the 'fpm_q_entries' field to the rib_dest_t structure. This
      allows dests to be placed on the fpm queue.

    - Define a couple new rib_dest_t flags that hold FPM-related
      state.

    - Invoke the zfpm_trigger_update() function for a route_node
      whenever the information to be sent to the FPM changes.

    - rib_can_delete_dest(): Return FALSE if we have to update the FPM
      about the given dest. This ensures that the dest is not deleted
      even if there are no ribs hanging off of it.

  * zebra/zebra_fpm.c

    This file holds most of the code for interacting with the FPM.

    - If quagga was configured with '--enable-fpm', periodically try
      to connect to the FPM.

    - When the connection comes up, enqueue all relevent dests to the
      FPM queue.

    - When the FPM socket is readable, dequeue the next rib_dest_t
      from the FPM queue, encode it in to a message and send the
      message to the FPM.

    - When the connection to the FPM goes down, remove all dests from
      the FPM queue, and then start trying to connect to the FPM
      again.

    - Expose the following new operational commands:

      show zebra fpm stats
      clear zebra fpm stats

  * zebra/zebra_fpm_netlink.c

    - zfpm_netlink_encode_route(): Function to encode information
      about a rib_dest_t in netlink format.

  * zebra/zebra_fpm_private.h

    Private header file for the zebra FPM module.

  * zebra/zebra_fpm.h

    Header file exported by zebra FPM module to the rest of zebra.

  * zebra/debug.c

    Add the 'debug zebra fpm' command.

  * zebra/main.c

    Initialize the zebra-FPM code on startup.

  * zebra/misc_null.c

    Add stub for zfpm_trigger_update().

  * zebra/Makefile.am

    - Include new file zebra_fpm.c in build.

    - Include zebra_fpm_netlink.c in build if HAVE_NETLINK is defined.

  * vtysh/Makefile.am

    Include zebra_fpm.c in list of files that define cli commands.

Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-11-30 21:41:17 +01:00
Doug VanLeuven
9234b38273 build: check actually-used BSD link state fields
ifi_link_state missing in OS X. There could be other *BSD's that haven't
implemented it and possibly affects older implementations.

The existing HAVE_BSD_LINK_DETECT configure.ac check is only confirming
the link state detection using ifmediareq.ifm_status found in
<net/if_media.h>. This is the link state detection used in
zebra/ioctl.c. Later, *BSD redefined struct if_data in <net/if.h> and
included link state detection. This is the method used in
zebra/kernel_socket.c

Additional test defined in config.ac to test for member struct
if_data.ifi_link_state defined in <net/if.h> separate from test for
<net/if_media.h> ifmediareq.ifm_status

Fixed #ifdef's in zebra/kernel_socket.c to use the new #define
No impact on older function calls in zebra/ioctl.c

Tested on 64bit OS X 10.7, FreeBSD 9.0 amd64 & i386 (32bit)
using gcc & clang. Tested on linux 64bit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-11-05 11:22:24 -05:00
David Lamparter
e2b1580cbc build: compile tests/ by default
Broke the tests again... let's just build them by default so it's easier
to notice.  If anyone doesn't want to build tests, there's
--disable-tests.

NB: tests will be neither run nor installed.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-11-03 09:51:21 -07:00
Brad Smith
1b54f798d3 build: fix autoconf multicast check on OpenBSD
Fix the "BSD struct ip_mreq hack" autoconf test to work with OpenBSD.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-09-25 05:56:04 +02:00
David Lamparter
ee1ac2d52a build: fix isisd topology out of tree build
isisd got the include directory wrong on building with a separate build
directory.

  * configure.ac: adjust ISIS_TOPOLOGY_INCLUDES

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-07-19 13:00:29 +02:00
Joachim Nilsson
1080c13f5d configure: Add --with-pkg-extra-version=VER for packagers/distributions.
This change adds a --with-pkg-extra-version option to ./configure to allow
packagers and distributions to fine tune the version displayed to the end
user to assist in support. It is also very useful when reporting bugs on
the official Quagga mailing lists.

There are two ways of utilsing this functionality:

      a) ./configure --with-pkg-extra-version=-wmo1
      b) EXTRAVERSION=-wmo1 ./configure

The latter is a common way for many distributions to add extra version
strings to signify their own patch level to a given package.

Also, minor whitespace fix in configure summary.

Signed-off-by: Joachim Nilsson <joachim.nilsson@westermo.se>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-07-13 18:53:53 +02:00
Vincent Bernat
d6be5fb9bc agentx: add AgentX support to Quagga.
--enable-snmp will enable AgentX support in Quagga. SMUX is still here
and can be enabled with --enable-snmp=smux. AgentX support can be
enabled with "agentx" in configuration file. As for SMUX, this command
is not understood by vtysh. It can be disabled with "no agentx",
though there is no real use of this since this command cannot be used
with vtysh.

If "agentx" and "no agentx" command were added to vtysh, it would not
be possible to disable agentx support after enabling it because
NetSNMP does not expose the appropriate methods for this.

The internals of AgentX are hidden by NetSNMP. Therefore, we don't
have a file descriptor to add to the threading system. We do not have
the timers to set either. Therefore, the event loop is modified to
make use of snmp_select_info() from NetSNMP.

Traps are not supported yet.
2012-06-25 19:03:23 +02:00
Vincent Bernat
08d7f6533e build: use net-snmp-config to configure NetSNMP
The correct method to link to NetSNMP is to use net-snmp-config (which
is like pkg-config). Explicit link to libcrypto is also dropped
(NetSNMP libs are linked to libcrypto, no need to link Quagga to
it). Moreover, @SNMP_INCLUDES@ is dropped because useless. Due to a
bug in configure.ac, it was properly populated.
2012-06-25 19:03:23 +02:00
Vincent Bernat
6b1e37f853 build: only define HAVE_SNMP
NetSNMP is the only SNMP implementation for Quagga. We don't need two
different symbols.
2012-06-25 19:03:23 +02:00
David Lamparter
828f235df4 release: 0.99.21 2012-05-01 21:43:53 +02:00
David Ward
f027d331fc doc: only package man pages for daemons that are built
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David Lamparter <equinox@diac24.net>
2012-05-01 17:51:26 +02:00
Paul Jakma
5734509c05 babeld: Initial import, for Babel routing protocol.
* Initial import of the Babel routing protocol, ported to Quagga.
* LICENCE: Update the original LICENCE file to include all known potentially
  applicable copyright claims.  Ask that any future contributors to babeld/
  grant MIT/X11 licence to their work.
* *.{c,h}: Add GPL headers, in according with the SFLC guidance on
  dealing with potentially mixed GPL/other licensed work, at:

  https://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html
2012-03-25 17:06:51 +01:00
Paul Jakma
fa482834ea HACKING.tex: Change to a LaTeX version of HACKING
* configure.ac: Check for latexmk and pdflatex
* Makefile.am: Add a conditional target to build HACKING.pdf, as a convenience
* HACKING.tex: A slightly more structured HACKING, is readable on its own.
* HACKING: removed
2012-03-08 16:14:13 +00:00
David Lamparter
ca9f342c2c build: fixup autoconf for cross-compiling (to OpenWRT)
MALLOC/REALLOC aren't used properly (no rpl_malloc), remove them

while at it, infer some sane ipforwarding method from the OS value.
(v2 on that, "==" is not a proper operator for standard "test")
2011-12-13 19:12:42 +04:00
Denis Ovsienko
48f99b0c2b release: 0.99.20 2011-09-29 16:55:23 +04:00
Dmitrij Tejblum
eda3529e9c configure: test for glibc backtrace even without glibc.
Other platform may have compatible facilities.
2011-09-27 21:45:37 +04:00
Dmitrij Tejblum
10d04cdb41 lib: use "protocol-independed API" from RFC3678, if that is available
(This commit is based on the patch from BZ#420, and should fix that bug.)

* configure.ac: detect availability of that API
* sockopt.c (setsockopt_ipv4_multicast): use it for join/leave IPv4
  multicast groups
2011-09-27 21:39:12 +04:00
Denis Ovsienko
b82cdeb18f delete CVS keywords 2011-09-27 21:34:26 +04:00
Denis Ovsienko
6159928d28 configure: fix OpenPAM detection 2011-09-27 21:33:16 +04:00
Denis Ovsienko
2b43bf231c configure: fix FreeBSD header detection (BZ#408)
This change is based on Xavier Beaudouin's patch (which fixes detection
of 3 config.h macros on FreeBSD without any impact to Linux build of
Quagga) and FreeBSD port patch (which fixes 5 config.h macros, but
breaks the Linux build), it fixes 5 macros and works for both FreeBSD 8
and Linux.
2011-09-27 20:59:46 +04:00
Stephen Hemminger
b69442d456 configure: dismiss libutil.h
Recent versions of libc on Linux (Debian Testing) create lots of
compile warnings about direct usage of libutil.h
2011-09-27 20:47:18 +04:00
Denis Ovsienko
0998342b5f release: 0.99.19 2011-09-26 18:50:06 +04:00
Greg Troxel
0d51c7ef83 build: treat opaque-lsa default correctly for ospfapi
In deciding whether to default ospfapi to on or off, use the same rule
for opaque-lsa as earlier: != no rather than = yes, so that not having
set it implies yes.
2011-03-24 10:19:43 -04:00
Paul Jakma
36de261b57 build: change sense of opaque-{lsa,te} enable args to enable by default
* configure.ac: (AC_ARG_ENABLE({ospf-te,opaque-lsa})) reverse the sense to
  --disable
  (enable_{opaque_lsa,ospf_te}) treat as enabled unless explicitly disabled.
2011-03-22 12:09:11 +00:00
Paul Jakma
d8509631b4 release: 0.99.18
* configure.ac: Bump to 0.99.18
2011-03-21 14:56:00 +00:00
Denis Ovsienko
a6be12128c release: 0.99.17
* configure.ac: bump up version number
2010-08-19 13:36:43 +04:00
David Lamparter
745bf05f58 isisd: change ISIS_METHOD to use C preprocessor
this fixes warnings from vtysh extract.pl by making sure the isis method
files always 'work'. (previously, extract.pl would grab unselected isis
method sources and then complain about missing headers)
2010-04-28 20:15:44 -04:00
Denis Ovsienko
438589e31f release: 0.99.16
* configure.ac: bump up version number
2010-03-09 13:53:20 +03:00
David Ward
cdb9950482 configure: fix spelling 2009-12-03 20:22:47 +03:00
Dmitry Tejblum
9964fcfc22 configure: fix HAVE_CLOCK_MONOTONIC spelling 2009-11-05 16:50:36 +03:00
Paul Jakma
3849ce4e25 release: 0.99.15
* configure.ac: Bump to 0.99.15
2009-08-28 19:16:31 +01:00
Paul Jakma
998274cd7c [build] Bump release to 0.99.14 2009-07-21 15:21:20 +01:00
Paul Jakma
62c9f504bd [build] fix default CFLAGS and squish warning
* configure.ac: Move down the AC_SYS_LARGEFILE test - it was setting CFLAGS
  and so disabling the default CFLAGS setting section.
  Squish warning by adding AC_CONFIG_MACRO_DIR on the reccommendation of
  autoreconf.
2009-07-19 17:33:21 +01:00
Joakim Tjernlund
cbcd9bfc50 [doc] Add "--disable-doc" to configure
Configure option "--disable-doc" will prevent building
the documents under doc. Saves build time and the need to
have document building tools installed. Useful when your build
machine is different from your development machine.
2009-06-25 14:01:19 +01:00
Tomasz Pala
80abd9fe37 [configure] Allow for large-file support, e.g. for log files >2GB 2009-06-24 22:11:34 +01:00
Paul Jakma
5bc52c76c2 [doc] remove -dither arg to imagemagick, in building PDFs
* doc/Makefile.am: arguments for the 'convert' programme seem to have
  changed incompatibly at some stage - just remove the problematic -dither.
2009-06-22 16:11:06 +01:00
Jeremy Jackson
7ec573661f [configure] fix check for GNU awk/gawk to abort ./configure if missing
It also prints what were comments explaining why gawk is necessary, and
not-in-PATH to help user figure out why it's not found.

Build was mysteriously failing with the old version of this check when gawk
wasn't installed.
2009-06-19 15:03:31 +01:00
Jeremy Jackson
e84999d93a [configure] remove unused/broken autoconf cache variable ac_statedir
It wasn't used, and the code wasn't printing progress or the result in some
cases.  the test uses minimal resources, so it's probably better to not
cache so as to avoid inconsistencies if --with-prefix or directory variables
are changed between ./configure runs.
2009-06-19 15:03:31 +01:00
Jeremy Jackson
5589ffa7dd [configure/cleanup] fix broken autoconf cache variables
Fix zebra_rtread and zebra_ipforward_path.

It looks like someone tried to make this cached, but it was being ignored at
least on autoconf 2.6.1.  2.6.2 now gives a warning about the situation,
hence this fix.

Although they are just warnings, it's dangerous to leave them as-is, because
someone not diligent in reading the autoconf manual might just stick _cv_ in
the name, with the effect that running a ./configure --config-cache would
fail horribly, since variables are being set inside the AC_CACHE_CHECK()
block that would not be seen when the variable's value was read from cache.

Also added m4 quotes [] to macro arguments as autoconf manual
suggests.
2009-06-19 15:03:31 +01:00
Jeremy Jackson
7f177ee8df [configure] remote support for AIX, it conflicts on newer autoconf
AC_AIX and AC_GNU_SOURCE conflict > autoconf 2.53 or so,
but the replacement AC_USE_SYSTEM_EXTENSIONS isn't available
until later versions.  So either we narrow the supported
autconf version range, or disable AIX (if it has any effect),
or determin that AC_AIX doesn't do anything useful anyhow.
2009-06-19 15:03:31 +01:00
Jeremy Jackson
25f45887ab [configure] add configure support for PCRE Posix library
Debian tried unsuccessfully to build with libpcreposix.  This adds proper
support to autoconf/configure.ac for it.

Based on the patch by C.J.  Adams-Collier in bug #483.

bgpd/bgp_{regex,routemap}.h: Pull in PCRE POSIX header if available.
2009-06-19 15:01:16 +01:00
Paul Jakma
6511cab267 [configure] Refine CLOCK_MONOTONIC test
* configure.ac: Check for the actual CLOCK_MONOTONIC symbol, as clock_gettime
  need not imply that clock type is supported
* lib/zebra.h: use the method given in autoconf docs for sys/time.h
  inclusion
2009-06-18 20:18:31 +01:00
Stephen Hemminger
c4376c9d28 [configure] Detect support for monotonic clock
Quagga has code to support monotonic clock to avoid issues where
time of day changes. The support was incomplete since it was not being
detected by autoconf.
2009-06-18 20:18:31 +01:00
Paul Jakma
3453a7122c [bgpd] Add support for the old Linux 2.4, TCP_MD5_AUTH RFC2385 patch
* configure.ac: Add a --enable-linux24-tcp-md5 argument, to compile in
  support for the old TCP-MD5 patch for Linux 2.4 systems.  This overrides
  auto-detection of TCP-MD5 supported by the target system.
* lib/sockopt.c: (sockopt_tcp_signature) add in a variant for the old
  Linux 2.4, TCP_MD5_AUTH variant of TCP-MD5 support, conditional
  on the previous configure arg.
2009-06-12 14:21:02 +01:00
Paul Jakma
5012bc3d21 [release] Bump version to 0.99.12 2009-05-08 23:20:19 +01:00
Denis Ovsienko
c540835eaf Dmitry Tejblum <tejblum@yandex-team.ru>
Don't enable HAVE_BSD_STRUCT_IP_MREQ_HACK for FreeBSD 7.0 and upper,
because OS behaviour has changed.
2009-04-13 20:11:44 +04:00
Paul Jakma
5635b778af [release] Bump version to 0.99.11 2008-10-02 09:34:34 +01:00
Paul P Komkoff Jr
0e9de56d5e [build] Fix --enable-pie so it can actually be disabled
Signed-off-by: Paul Jakma <paul@quagga.net>
2008-09-24 16:42:35 +01:00
Joakim Tjernlund
fb62a3cef5 Make --enable-snmp cross compile and make libcrypto optional with --without-crypto
Autoconfig work by me, the rest was done by
"Kirill K. Smirnov" <lich@math.spbu.ru>
2008-08-25 09:48:30 +02:00
Stephen Hemminger
cadfb2cd81 [build] Linux netlink doesn't need IF_PROC
2008-08-16 Stephen Hemminger <stephen.hemminger@vyatta.com>

	* configure.ac: If netlink is available, then that is how the
	initial routes and interfaces should be read, rather than through
	/proc, so don't set IF_PROC.

Signed-off-by: Paul Jakma <paul@quagga.net>
2008-08-22 19:56:25 +01:00