David Lamparter [Thu, 27 Sep 2018 02:18:48 +0000 (04:18 +0200)]
watchfrr, lib: cleanup & delay detaching
This cleans up watchfrr to be more "normal" like the other daemons in
terms of what it does in main(), i.e. using the full frr_*() call set.
Also, this changes the startup behaviour on watchfrr to stay attached on
the daemon's parent process until startup is really complete. This
should allow removing the "watchfrr.started" hack at some point.
Signed-off-by: David Lamparter <equinox@diac24.net>
Rafael Zalamena [Sat, 3 Nov 2018 22:08:33 +0000 (19:08 -0300)]
bfdd: fix BGP unnumbered peer setup
The session key uses the scope id to figure out which interface we are
using with that link-local address, so if we don't set it when
registering a session we'll end up with multiple IPv6 sessions.
This bug was spotted by Sandro Bolliger.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
David Lamparter [Sat, 27 Oct 2018 17:06:22 +0000 (19:06 +0200)]
build: crop excessive net-snmp library list
This fixes the longstanding GPL vs. OpenSSL licensing issue in our SNMP
code (and cuts down on its other dependencies a wee bit.)
In a way, net-snmp is really buggy here in what it says that we should
link against, but I don't know their application scenarios well enough
to say it should be changed at their end.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 24 Oct 2018 15:31:31 +0000 (17:31 +0200)]
build: add "redistclean" target
This puts a source tree back in the state it was in after unpacking a
dist tarball. Different from distclean in that it doesn't remove files
that are included in the tarball.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Mon, 15 Oct 2018 04:51:30 +0000 (06:51 +0200)]
build: work around automake wtf
For some reason, automake was "randomizing" the order of these few lines
in the generated output Makefile.in.
I have absolutely no clue what's going on, but it's the only thing
preventing me from building reproducible source tarballs (i.e.
bit-exactly identical), so... just slightly "rephrase" this.
Should behave exactly the same as before.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Tue, 23 Oct 2018 12:06:25 +0000 (14:06 +0200)]
build: carry --with-pkg-extra-version into tarballs
If we use "./configure --with-pkg-extra-version=... && make dist", we
probably want the dist tarball to remember the extra version it was
configured with.
Use --without-pkg-extra-version to kill the tag.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Sat, 6 Oct 2018 21:28:19 +0000 (23:28 +0200)]
build: rewrite readline/curses check
We don't need termcap/tinfo/curses, those are just for libreadline. On
most modern systems, libreadline will pull in the appropriate libs it
needs on its own, so unconditionally adding them adds an extra unneeded
dependency for us.
Still need to try with curses/... for some systems, but only after bare
readline fails.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Mon, 15 Oct 2018 05:02:47 +0000 (07:02 +0200)]
debianpkg: clean up dependencies
- accept either python2 or python3 packages for everything
- drop texlive-latex-base, texlive-generic-recommended (only needed for
PDF docs)
- python-ipaddr is not a build time requirement, only runtime
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Mon, 15 Oct 2018 05:00:42 +0000 (07:00 +0200)]
debianpkg: strip ancient/unused cruft
The SNMP MIB directory is unneeded, --enable-poll has been long gone,
the "build" target is straight up wrong (causing FRR to be built in the
install step) and we haven't needed /proc for configure in ages either.
Signed-off-by: David Lamparter <equinox@diac24.net>
Daniil Baturin [Mon, 1 Oct 2018 18:38:44 +0000 (20:38 +0200)]
tools: add a script for building a Debian package in one step.
The script simplifies the relatively lengthy procedure.
It should be invoked from the top level source directory, for example:
./tools/build-debian-package.sh
Christian Franke [Fri, 28 Sep 2018 17:32:38 +0000 (19:32 +0200)]
doc: Use `mv -f` in Makefile
Sphinx always runs, even in the `make install` stage. When `make install`
is run as root and then another `make` is run by a nonprivileged user,
some versions of `mv` prompt like this:
David Lamparter [Sun, 2 Sep 2018 18:36:20 +0000 (20:36 +0200)]
build: fix & clean up *SAN flags
ASAN/MSAN/TSAN flags need to be in CFLAGS and LDFLAGS; the latter links
the correct compiler-dependent library. Also, the configure switch was
broken (--disable-... would enable the sanitizer.)
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Sat, 18 Aug 2018 16:03:16 +0000 (18:03 +0200)]
vtysh: make RPKI node non-conditional
Whether or not RPKI is enabled during build shouldn't really influence
vtysh; the user can always manually install bgpd_rpki.so later and it
should work. This also means that the behaviour of "RPKI module not
loaded" is consistent regardless of whether it was a compile-time or
runtime decision.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 29 Aug 2018 03:28:06 +0000 (05:28 +0200)]
doc: drop colspan/rowspan elements
The sphinx 'text' writer apparently doesn't support these, and the
'dummy' writer is only available on recent versions, and all of this
makes the build a bit annoying...
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 22 Aug 2018 04:04:32 +0000 (06:04 +0200)]
build: improve python search pattern
- try pythonN.N-config after pythonN-config
- use "python-config --ldflags" instead of --libs
- add Python 3.6 to explicitly searched versions
- if linking fails, try with "-lz" added
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Tue, 21 Aug 2018 18:33:13 +0000 (20:33 +0200)]
build: add warning when overwriting vars on "make"
doing things like `make CC="mmix-linux-musl-gcc"` breaks the hosttools/
cross-compilation setup pretty hard and just straight up should not be
done. These vars belong on `configure`, not `make`.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 15 Aug 2018 20:59:31 +0000 (22:59 +0200)]
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>
Martin Winter [Mon, 8 Oct 2018 12:32:57 +0000 (05:32 -0700)]
FRRouting Release 6.0
Major Changes since 5.0:
- Staticd: New daemon responsible for management of static routes
- ISISd: Implement dst-src routing as per draft-ietf-isis-ipv6-dst-src-routing
- BFDd: new daemon for BFD (Bidrectional Forwarding Detection). Responsiblei
for notifying link changes to make routing protocols converge faster.
- various bug fixes
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Donald Sharp [Wed, 3 Oct 2018 16:27:57 +0000 (12:27 -0400)]
lib: Include compiler.h as early as is possible in the build
The compiler.h header provides us with some useful macro's
that we are using in the system. We do not know exactly
where the CPP_NOTICE and CPP_WARN macros are used but
they can move around. Place this header early in the
build then.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 17 Sep 2018 13:18:40 +0000 (09:18 -0400)]
zebra: Send correct default vrf tableid for MROUTE stats
So the linux kernel uses the RT_TABLE_MAIN for the table
id used for ip routing. The multicast routing tables use
RT_TABLE_DEFAULT. We changed the internal code of zebra_vrf
a few months back to use RT_TABLE_MAIN as the tableid to
use. This caused the pim sg stats to stop working because
of the kernel bug where it uses a different table
for ip routing and ip multicast.
Put a bit of a special case in to do the right thing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 17 Sep 2018 17:58:59 +0000 (13:58 -0400)]
pimd: Actually create vif's in non-integrated config
The startup of a non-integrated config was not properly
allowing for startup to create the vif when we have
not learned about the interface we are trying to configure
at this point in time. Actually notice when we are
trying to create a pimreg device or not to properly
notice when to attempt to create the vif or not.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 10 Sep 2018 14:19:03 +0000 (10:19 -0400)]
bgpd: Honor origin change in bgp aggregates
When the origin changed we must honor and update the aggregate
to the peer. This code adds a bit of code to the bgp_aggregate_info_same
code to see if the origin has changed and to indicate that it has.
Fixes: #2993 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 29 Aug 2018 02:45:06 +0000 (22:45 -0400)]
staticd: Fix mixup in vrf translations
When we store the nexthop for ref-counting, keep
track of the nexthop vrf_id as well. This will allow
us to track the nexthop per vrf!
Additionally when we get the callback from zebra about
a nexthop update, iterate over all static routes to
see if the nexthop we are getting a callback is
one we are concerned about.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 28 Aug 2018 12:50:16 +0000 (08:50 -0400)]
pimd: Add some more useful data to debug output
End user was seeing this debug but we are not giving
the user enough information to debug this on his own.
Add a tiny bit of extra information that could point
the user to solving the problem for themselves.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke [Sat, 25 Aug 2018 15:50:03 +0000 (17:50 +0200)]
watchfrr: fix global restart
watchfrr needs to handle a SIGCHLD also when it calls a global restart
command. Before this patch, it would lead to the following behavior:
15:44:28: zebra state -> down : unexpected read error: Connection reset by peer
15:44:33: Forked background command [pid 6392]: /usr/sbin/frr.init watchrestart all
15:44:53: Warning: restart all child process 6392 still running after 20 seconds, sending signal 15
15:44:53: waitpid returned status for an unknown child process 6392
15:44:53: background (unknown) process 6392 terminated due to signal 15
15:45:13: Warning: restart all child process 6392 still running after 40 seconds, sending signal 9
15:45:33: Warning: restart all child process 6392 still running after 60 seconds, sending signal 9
15:45:53: Warning: restart all child process 6392 still running after 80 seconds, sending signal 9
15:46:13: Warning: restart all child process 6392 still running after 100 seconds, sending signal 9
15:46:33: Warning: restart all child process 6392 still running after 120 seconds, sending signal 9
15:46:53: Warning: restart all child process 6392 still running after 140 seconds, sending signal 9
This is obviously incorrect and can be fixed by comparing the pid to
the global restart object as well.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Donald Sharp [Sat, 25 Aug 2018 00:42:45 +0000 (20:42 -0400)]
staticd: refcount the nht add/removal
When we add / remove a nexthop that we need to track,
keep track of the number of times we have done this
for each nexthop. Consequently keep track of the
number of available nexthops, so that we can
just install new routes when we get one
that uses a pre-existing nexthop. Deletion of
nexthops is done on refcount going to 0.
Removal of routes is handled elsewhere for removal.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 23 Aug 2018 20:05:02 +0000 (16:05 -0400)]
zebra: When registering a nexthop, we do not always need to re-eval
The code prior to this change, was allowing clients to register
for nexthop tracking. Then zebra would look up the rnh and
send to that particular client any known data. Additionally
zebra was blindly re-evaluating the rnh for every registration.
This leads to interesting behavior in that all people registered
for that nexthop will get callbacks even if nothing changes.
Modify the code to know if we have evaluated the rnh or not
and if so limit the re-evaluation to when absolutely necessary
This is of particular importance to do because of nht callbacks
for protocols cause those protocols to do not insignificant
work and as more protocols are registering for nht callbacks
we will cause more work than is necessary.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>