Donald Sharp [Thu, 13 Aug 2020 00:59:47 +0000 (20:59 -0400)]
tools: Remove zebra commands that have never existed
The support bundle feature(tm) asks for some data
from zebra in the form of a command that has
never existed in FRR. Looks like some
cruft snuck in remove.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Rafael Zalamena [Wed, 12 Aug 2020 11:26:45 +0000 (08:26 -0300)]
topotests: fix default BFD peer shutdown state
The commit `bfdd: simplify and remove duplicated code` fixed a problem
that was causing the protocol configuration to override the user
configuration.
In this test case: the peer was configured to be disabled (default is
`shutdown`) and the test was expecting it to get activated (`no shutdown`)
when the protocol converged. I changed the peer default state to
`no shutdown`, however another way to get the same effect is to
configure the protocol to use a profile or don't configure a peer at all
(and use the defaults).
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donald Sharp [Wed, 12 Aug 2020 13:49:20 +0000 (09:49 -0400)]
lib: Properly handle POLLERR from poll()
There are situations where POLLERR will be returned. But
since we were not handling it. Thread processing effectively
is turned into an infinite loop, which is bad.
Modify the code so that if we receive a POLLERR we turn it
into a read event to be handled as an error from the handler
function.
Sebastien Merle [Fri, 14 Feb 2020 14:49:25 +0000 (14:49 +0000)]
staticd: add support for SR Policies
Configuration example:
ip route 9.9.9.9/32 6.6.6.6 color 123
The SR Policy to be chosen is uniquely identified by the policy
endpoint (6.6.6.6) and the SR-TE color (123). Traffic will be
augmented with an MPLS label stack according to the active
candidate path of that particular policy.
Quentin Young [Tue, 11 Aug 2020 18:24:56 +0000 (14:24 -0400)]
vrrpd: log errmsg, stricter nb validation
* When failing a config transaction due to a VRID conflict, describe the
error in the provided space
* When validating, allow the NB userdata lookup for interface object to
soft fail; but when applying, assert if it does not exist
Rafael Zalamena [Thu, 6 Aug 2020 19:25:44 +0000 (16:25 -0300)]
bfdd: implement passive mode
The passive mode is briefly described in the RFC 5880 Bidirectional
Forwarding Detection (BFD), Section 6.1. Overview:
> A system may take either an Active role or a Passive role in session
> initialization. A system taking the Active role MUST send BFD
> Control packets for a particular session, regardless of whether it
> has received any BFD packets for that session. A system taking the
> Passive role MUST NOT begin sending BFD packets for a particular
> session until it has received a BFD packet for that session, and thus
> has learned the remote system's discriminator value. At least one
> system MUST take the Active role (possibly both). The role that a
> system takes is specific to the application of BFD, and is outside
> the scope of this specification.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Quentin Young [Thu, 30 Jul 2020 20:44:46 +0000 (16:44 -0400)]
vrrpd: fix improper NB query during validation
We were querying the NB for an interface and expecting it to exist, but
we were doing this during a validation run when the interface hasn't yet
been created, resulting in an abort. Adjust validation checks to handle
this scenario.
Quentin Young [Tue, 2 Jun 2020 19:33:05 +0000 (15:33 -0400)]
vrrpd: don't allow autocreated vr's in NB layer
Changing properties on an autoconfigured VRRP instance results in its
pointer being stored as a userdata in the NB tree, leading to UAF when
autoconfigure deletes the instance and then later NB operations take
place using the now-stale pointer.
Ticket: CM-29850 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Rafael Zalamena [Sun, 9 Aug 2020 21:04:30 +0000 (18:04 -0300)]
doc: initial documentation for gRPC
Give the FRR users some examples of gRPC usage in scripts to let them
start experimenting with the new configuration interface provided by
YANG/northbound.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donald Sharp [Mon, 10 Aug 2020 14:32:17 +0000 (10:32 -0400)]
pimd: Allow multiple secondary addresses to work
Suppose you have more than 2 addresses on a pim interface:
lo up default 10.255.0.1/32
10.255.0.101/32
10.255.0.254/32
A `show ip pim int lo` gives us this:
eva# show ip pim interface lo
Interface : lo
State : up
Address : 10.255.0.1 (primary)
10.255.0.101/32
When we go look at the code that pulls secondary addresses in
we are using a prefix_cmp to know if we know about a secondary already
but were expecting true values instead of -1/0/1 being returned.
Modify code so that pim sees all secondary addresses
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
GalaxyGorilla [Mon, 10 Aug 2020 10:25:16 +0000 (10:25 +0000)]
ospfd: fix processing of SR RI LSAs
Router Information are contained in opaque LSAs and when such a LSA
is received a new SR node for the advertising router is created.
However, the RI related data is currently not set when such a SR node
already exists. This can happen when e.g. link and prefix information
arrive before the RI and therefore an SR node is created.
This is now fixed by setting the data everytime the RI is received,
independent of the SR node already existing or not.
Chirag Shah [Thu, 6 Aug 2020 18:18:42 +0000 (11:18 -0700)]
zebra: fix crash in vrf-vni mapping
As part of PR 6758 vrf vni converted to transactional cli.
Handle a scenario where vrf is not created yet (inactive) and vni
is mapped to the inactive vrf.
Testing Done:
bharat(config-vrf)# do show vrf
vrf vrf1 id 11 table 1001
vrf vrf5 inactive (configured)
David Schweizer [Thu, 6 Aug 2020 14:58:45 +0000 (16:58 +0200)]
bgpd: fsm legacy thread reset cleanup
* Removed old timer thread resets, since this has been taken care of
after execution of the threads by the thread_fetch function in
lib/thread.c for quite some time now.
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
lib, zebra: Add SR-TE policy infrastructure to zebra
For the sake of Segment Routing (SR) and Traffic Engineering (TE)
Policies there's a need for additional infrastructure within zebra.
The infrastructure in this PR is supposed to manage such policies
in terms of installing binding SIDs and LSPs. Also it is capable of
managing MPLS labels using the label manager, keeping track of
nexthops (for resolving labels) and notifying interested parties about
changes of a policy/LSP state. Further it enables a route map mechanism
for BGP and SR-TE colors such that learned BGP routes can be mapped
onto SR-TE Policies.
This PR does not introduce any usable features by now, it is just
infrastructure for other upcoming PRs which will introduce 'pathd',
a new SR-TE daemon.
GalaxyGorilla [Thu, 27 Feb 2020 12:57:13 +0000 (12:57 +0000)]
zebra: Fix selection of label chunks in label manager
For allocating a new label range the label manager will loop
the existing label chunks and compare the start and end labels
with the label range in question. In case a label range should
be re-allocated to the existing label chunk, the end label
of the chunk is not honored correctly, e.g. the new label
range has to be a true subset of the existing label chunk.
This is very easy reproducable by re-allocating a single label.
e.g. a label range of size 1.
This problem is fixed by allowing the mentioned 'end' labels to
be equal.
Introduced a off by one error in the `no vni XXX` command:
@@ -2337,12 +2336,10 @@ DEFUN (no_vrf_vni_mapping,
"VNI-ID\n"
"prefix-routes-only\n")
{
- int ret = 0;
int filter = 0;
- char err[ERR_STR_SZ];
- vni_t vni = strtoul(argv[2]->arg, NULL, 10);
Vincent Bernat [Thu, 6 Aug 2020 15:23:06 +0000 (17:23 +0200)]
bgpd: implement bgpPeerTable accross VRFs
Currently, bgpPeerTable only looks the default BGP instance. Most
vendors return all the available peers in this table. This commit
exposes all BGP instances.
The other tables are unchanged as it doesn't make sense to expose
routes from random VRFs into a single table. Vendors are using SNMP
contexts for that but we don't have support for it. Therefore, do
nothing.
lynne [Wed, 5 Aug 2020 19:22:08 +0000 (15:22 -0400)]
ldpd: ldp-oc withdraw fix
When LDP is configured in Order Control mode and we receive a
label withdraw message, we should only resend label withdraws to
peers that are the NH for that fec being withdrawn.
topotests: initial set of tests for evpn multihoming
The base topology is a two level CLOS with two racks. There are
two PEs/TORs in each rack that provide active-active redundancy to
two dual-attached servers in the rack. And EVPN-PIM is used for
flooded traffic.
Reference: evpn-mh-topo-tests.pdf
Tests have been added for the following functionality -
1. ES management
2. EAD/Type-1 route handling
3. Type-2 route with non-zero ESI
4. MAC sync and remote MAC (with remote-ES destination) handling