David Lamparter [Thu, 25 Oct 2018 13:00:55 +0000 (15:00 +0200)]
debianpkg: ditch development-only files
It is currently impossible to build external stuff that links against
installed FRR headers or libraries. Such projects need to directly
reference an FRR source tree until we revamp the library installation
semantics.
In any case these files would then be in a frr-dev Debian package.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 24 Oct 2018 18:57:32 +0000 (20:57 +0200)]
debianpkg: raise debhelper compat level to 9
Compat level 7 has long been deprecated. 9 works fine for us, though it
does change the library installation directories to multi-arch. (Which
is not a problem.)
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 24 Oct 2018 15:20:29 +0000 (17:20 +0200)]
debianpkg: make frr-pythontools a "Recommends:"
From the Debian policy:
Recommends:
This declares a strong, but not absolute, dependency.
The Recommends field should list packages that would be found
together with this one in all but unusual installations.
I'd say, yes, we do want the python-based reload functionality in all
but unusual installations.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 3 Oct 2018 17:14:27 +0000 (19:14 +0200)]
debianpkg: create frr-snmp and frr-rpki-rtrlib
This splits off SNMP and RPKI support so that users can install these
packages (with the appropriate dependencies) independently of main FRR.
It also obsoletes out the weird multi-variant package distribution we've
been doing for RPKI support.
The snmpd dependency is also changed to Recommends: on frr-snmp since
the frr-snmp package is essentially useless without snmpd.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Tue, 23 Oct 2018 11:54:07 +0000 (13:54 +0200)]
debianpkg: use better dependency for pythontools
As described in https://wiki.debian.org/binNMU, arch-indep packages
should have an "almost identical" dependency so "+..." changes can be
made to arch-dep packages without breaking the arch-indep pkgs.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 24 Oct 2018 15:01:11 +0000 (17:01 +0200)]
tools: add new tarsource.sh helper
It cleans your house and cooks dinner. Or maybe it creates a clean dist
tarball for you, plus a Debian .dsc if you have dpkg installed - and
GPG-signs the result appropriately if requested.
In any case the resulting tarball should be distributed for our
releases.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Mon, 22 Oct 2018 11:37:53 +0000 (13:37 +0200)]
debianpkg: kill backports
The debianpkg/backports system is rather complicated and actually slows
down Debian package building quite a lot since the backports/rules file
is evaluated a zillion times during a normal build.
This just folds up everything into a single Debian package build that
works on all OSes. The only real difference that the backports stuff
was used for is switching between systemd and init.d, the latter for
Ubuntu 12.04 and 14.04.
With this, that switch is controlled by the pkg.frr.nosystemd
Build-Profile instead. Package builds for Ubuntu 14.04 need to supply
the -Ppkg.frr.nosystemd option to dpkg-buildpackage. (12.04 isn't
supported anymore anyway.)
Note that the update-rc.d step that was previously coded into
postinst/postrm is now handled by the dh_installinit magic.
Other than this, there were some minor build dependency differences, all
of which are now just handled as | in the central deps.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Mon, 18 Feb 2019 20:34:06 +0000 (21:34 +0100)]
isisd: skip over deleted fragments
Since LSP fragments are also on our lspdb dict, lsp_tick() needs to skip
over them after calling lsp_destroy(). Otherwise it ends up accessing
free'd memory.
Fixes: #3533 Signed-off-by: David Lamparter <equinox@diac24.net>
Renato Westphal [Mon, 18 Feb 2019 16:14:33 +0000 (13:14 -0300)]
build: fix linking to libconfd
Commit fdbd8086b1e1 removed the explicit -lconfd flag from
lib_confd_la_LIBADD in favor of using the CONFD_LIBS variable. The
problem, however, is that ConfD doesn't use pkg-config nor anything
similar, so CONFD_LIBS is not created automatically by autotools.
Fix this problem by manually assigning -lconfd to the CONFD_LIBS
variable in the configure script.
Quentin Young [Fri, 15 Feb 2019 17:32:09 +0000 (17:32 +0000)]
bgpd: fix automake fart under MSAN
"When building without VNC, automake sees that the `bgpd_bgpd_CFLAGS`
variable exists, although it is only set in the VNC-enabled case... but
since the variable exists, it unconditionally drops `AM_CFLAGS` for the
two bgp targets and uses `bgpd_bgpd_CFLAGS` instead, which will
contain... _nothing_."
This was breaking builds of bgpd binaries with MSAN enabled.
Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Philippe Guibert [Thu, 14 Feb 2019 13:04:45 +0000 (14:04 +0100)]
ospf6d: upon interface deletion, the area if list may be updated
there are some events where the list of interfaces per area should be
reviewed due to an interface is being removed. This fix avoids having
some memory leak.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Rafael Zalamena [Mon, 4 Feb 2019 15:44:52 +0000 (13:44 -0200)]
bfdd: apply new timers on on-going connections
Apply new timers when only one side is negotiating new settings: when
sending the final bit we must apply the remote settings, otherwise
we'll keep the previous transmission rate.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Rafael Zalamena [Sat, 2 Feb 2019 11:57:08 +0000 (09:57 -0200)]
bfdd: implement session interface observer
Allow `bfdd` to configure inexisting interfaces / VRF and only activate
them once the interface/VRF start existing. This implementation doesn't
handle dynamic VRFs yet.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Rafael Zalamena [Thu, 31 Jan 2019 20:21:18 +0000 (18:21 -0200)]
bfdd: don't try to start echo on protocol restart
`echo-mode` should and will automatically start after session goes up
and it is allowed by the remote peer. See `bs_echo_timer_handler` for
more information.
This avoids having echo controling code spread.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Rafael Zalamena [Tue, 15 Jan 2019 22:23:06 +0000 (20:23 -0200)]
bfdd: refactor state change handler
Expand state change handling into smaller functions with more
explanatory commentaries. This also handles some corner cases that
were not being handled.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donald Sharp [Thu, 14 Feb 2019 04:24:05 +0000 (23:24 -0500)]
bfdd: Add `show debugging [bfd]` command
This will prevent vtysh from displaying `command imcomplete`
for a `show debugging` issued and we are running this
bfd daemon. A quick look showed me that there was not
really the ability to turn on/off debugging like other
daemons. I imagine future work can be focused here.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 12 Feb 2019 19:55:15 +0000 (14:55 -0500)]
pbrd: Do not delete pmi until completion of rule delete.
When we have a pbr-policy applied to an interface and the
rule is installed and then deleted, we would not properly
clean up the bit field for the pmi as well as not note
the rule as properly deleted.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Consider the following topo VTEP1->SPINE1->VTEP2. ebgp is being used
for evpn route exchange with SPINE just acting as a pass through.
1. VTEP1 was building the type-3 IMET route with the correct PMSI
tunnel type (ingress-replication) and label (VNI)
2. Spine1 was however only parsing the tunnel-type in the attr (was
skipping parsing of the label field altogether) -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@MSP1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]
BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
Advertised to non peer-group peers:
TORC11(downlink-1) TORC12(downlink-2) TORC21(downlink-3) TORC22(downlink-4) TORS1(downlink-5) TORS2(downlink-6)
Route [3]:[0]:[32]:[27.0.0.15]
5550
27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
Origin IGP, valid, external, bestpath-from-AS 5550, best
Extended Community: RT:5550:1003 ET:8
AddPath ID: RX 0, TX 227
Last update: Thu Feb 7 15:44:22 2019
PMSI Tunnel Type: Ingress Replication, label: 16777213 >>>>>>>
Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@MSP1:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
3. So VTEP2 didn't rx the correct label.
In an all FRR setup this doesn't have any functional consequence but some
vendors are validating the content of the label field as well and ignoring
the IMET route from FRR (say VTEP1 is FRR and VTEP2 is 3rd-party). The
functional consequence of this VTEP2 ignores VTEP1's IMET route and doesn't
add VTEP1 to the corresponding l2-vni flood list.
This commit fixes up the PMSI attr parsing on spine-1 -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@MSP1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]
BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
Advertised to non peer-group peers:
TORC11(downlink-1) TORC12(downlink-2) TORC21(downlink-3) TORC22(downlink-4) TORS1(downlink-5) TORS2(downlink-6)
Route [3]:[0]:[32]:[27.0.0.15]
5550
27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
Origin IGP, valid, external, bestpath-from-AS 5550, best
Extended Community: RT:5550:1003 ET:8
AddPath ID: RX 0, TX 278
Last update: Thu Feb 7 00:17:40 2019
PMSI Tunnel Type: Ingress Replication, label: 1003 >>>>>>>>>>>
Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@MSP1:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Renato Westphal [Mon, 11 Feb 2019 18:10:40 +0000 (16:10 -0200)]
lib: a few more trivial changes for C++ compatibility
* command_graph.h: stop using "new" as a parameter name as that's a
reserved C++ keyword.
* module.h: avoid using C99 designated initializers since C++ doesn't
support them. This change hurts code readability quite considerably,
so we should try to find a better solution later.
* pw.h: remove unneeded empty structure to silence a C++ warning.
Renato Westphal [Mon, 11 Feb 2019 18:04:26 +0000 (16:04 -0200)]
lib: add macro that performs explicit static casts when using a C++ compiler
C++ doesn't support implicit casts from void pointers like C
does. And the libfrr headers have some bits of code that rely on
implicit casts in order to work. To solve this problem, add a new
"static_cast" macro that performs explicit static casts when a C++
compiler is being used, or do nothing otherwise.
NOTE: since macros are only evaluated when they are used, there
might be other macros from libfrr that will need to use "static_cast"
as well. If a header is successfully compiled using a C++ compiler,
there's no guarantee that its macros are compatible with C++. We'll
only know about such macros when they are used by C++ code, then
we'll need to adapt them one by one in the future.
Renato Westphal [Mon, 11 Feb 2019 18:01:32 +0000 (16:01 -0200)]
lib: rename enum to avoid conflict
Two different definitions of "enum filter_type" exist in libfrr:
one in lib/filter.h and other in lib/command_match.h. Rename one
of them to resolve a conflict that happens when both headers are
included by the same file.
Donald Sharp [Mon, 11 Feb 2019 17:54:31 +0000 (12:54 -0500)]
topotests: Add code to ensure routes are as expected
This code just ensures that v4 and v6 routes are as expected
in the rib. While this test addition is not that complicated it would
have caught some issues while I was attempting to handle the
switchover to a different style of rib processing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>