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>
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>
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>
Mark Stapp [Wed, 30 Jan 2019 09:54:25 +0000 (04:54 -0500)]
libs, rip, isis: change northbound operation enum to DESTROY
Change the northbound lib operation from DELETE to DESTROY;
make the required changes in the users of the northbound, in
the cli, rip, ripng, and isis.
Mark Stapp [Tue, 15 Jan 2019 18:34:23 +0000 (13:34 -0500)]
libs, daemons: changes to permit c++ compilation
Some misc changes to resolve some c++ compilation errors.
The goal is only to permit an external module - a plugin,
for example - to see frr headers, not to support or encourage
contributions in c++. The changes include: avoiding use
of keywords like 'new', 'delete'; cleaning up implicit
type-casting from 'void *' in several places.
Philippe Guibert [Mon, 11 Feb 2019 13:04:52 +0000 (14:04 +0100)]
bgpd: if vrf is unknown, bgp deletion not complete
there are some cases where the bgp deletion will not be complete, while
the vrf identifier of the bgp instance is not completely identified. The
vrf search based on the bgp name is the better protection, since the bgp
vrf instance is created, even if the vrf identifier is not yet known.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Donald Sharp [Mon, 11 Feb 2019 02:19:48 +0000 (21:19 -0500)]
eigrpd: Do not redelete the eigrp interface data structure
On interface down do not delete the eigrp interface data
structure. Ensure that the address that we have setup the
eigrp data structure ontop of is what we are deleting.
Additionally add a test to show that this is no-longer
crashing eigrp. Future commits will further modify
this test to actually ensure that the eigrp topo is
updated correctly and the rib has the correct data.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 11 Feb 2019 12:16:35 +0000 (07:16 -0500)]
eigrp: Make the eigrp_interface have a prefix instead of a *prefix
The prefix data structure was being freed yet still needed in the
future and it's a fundamental part of the eigrp_interface data
structure let's keep it there instead of having it be deleted
and then not.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Sarita Patra [Fri, 8 Feb 2019 07:50:12 +0000 (23:50 -0800)]
pimd: Don't refersh the oif_creation timer if S,G already present
Issue: Shut the RP interface in the router RP. LHR will get to know
RP becomes not-reachable, so it send a prune towards the RP. On
receiving the prune, RP clear the (*, G) entry, but (S, G) should
not get removed if present.
Now no-shut the RP interface in the router RP. LHR will send a (*, G)
join towards the RP. On receiving join FRR create the (*, G) entry.
Along with this, it also add the interface(join received) in the OIL
of (S, G) and also refresh the (S, G) timer.
Fix: Dont refresh the timer for S, G or (*, G), if the flag for the
channel OIL is PIM_OIF_FLAG_PROTO_ANY.
Donald Sharp [Thu, 7 Feb 2019 14:07:32 +0000 (09:07 -0500)]
sharpd: Add 'sharp data route" dump command
When you are using the install/remove routes command, the
output goes to a log file. This command allows for ease
of dump of timing information from the vty or vtysh.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 7 Feb 2019 13:21:24 +0000 (08:21 -0500)]
sharpd: Add start of global data structures
We have a bit of a mess with globals in the sharp daemon.
Let's start formalizing it a bit. Future commits will
take advantage of this, as that we need to have the ability
to start dumping stats about commands we have issued.
These changes will be useful for debugging and understanding
what is going on.
Signed-off-by: Donald sharp <sharpd@cumulusnetworks.com>
Chirag Shah [Tue, 5 Feb 2019 16:38:35 +0000 (08:38 -0800)]
zebra: advertise svi ip as macip route changes
In Asymmetric and symetric routing scenario in EVPN
where each VTEP pair having different set of addresses
for the SVIs.
This knob allows reachability (ping connectivity) of
SVI IPs and resolve ARP resoultion VTEPs across racks.
This knob should not be used when same SVI IPs configured
on VTEPs across racks or when advertise default gateway
is configured.
Ticket:CM-23782
Testing Done:
Bring up EVPN symmetric routing topology with different
SVI IPs on different VTEPs. Enable advertise svi ip
at each VTEP, remote VTEPs installs arp entry for
SVI IPs via EVPN type-2 route exchange.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Note that sysinit.target does not depend on any network* service or
target.
In other words, unless there is a service that requires
network-online.service, even if FRR is enabled it will not be started.
Therefore network-online.target is the wrong unit to have in WantedBy=,
as it is not always started.
This patch updates our service file so that it is properly started by
the system when enabled, delayed until networking is up, and if possible
delayed until after NetworkManager, systemd-networkd or any other
networking configuration manager has finished performing its tasks -
i.e. after network-online.target.
After these changes our new dependency graph looks like this: