Donald Sharp [Mon, 9 Apr 2018 18:16:00 +0000 (14:16 -0400)]
zebra: Only send down pertinent information on RTM_DELROUTE
Background:
v6 does not have route replace semantics. If you want to add a nexthop
to an existing route, you just send RTM_NEWROUTE and the new nexthop.
If you want to delete a nexthop you should just send RTM_DELROUTE
with the removed nexthop.
This leads to situations where if zebra is processing a route
and has lost track of intermediate nexthops( yes this sucks )
then v6 routes will get out of sync when we try to implement
route replace semantics.
So notice when we are doing a route delete and the route is
not being updated, just send the prefix and tell it too delete.
Ticket: CM-20391 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Apr 2018 18:09:35 +0000 (14:09 -0400)]
zebra: Cleanup debugs and add a bit more info
This commit does 2 things:
1) When receiving a route from the kernel, display the incoming
table as part of the debug, to facilatate knowing what we are
talking about as part of the debug.
2) When displaying nexthop information for routes we were sending
to the kernel, no need to display the route information every time
Display the route then the individual nexthops for what we are doing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Apr 2018 12:04:39 +0000 (08:04 -0400)]
zebra: Notice when our neighbor entry is removed and fight back
Notice when someone deletes a neighbor entry we've put in for
rfc-5549 gets deleted by some evil evil person. When this happens
notice and push it back in, immediately.
Ticket: CM-18612 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 31 Mar 2018 21:08:21 +0000 (17:08 -0400)]
zebra: Notice when our route is deleted and re-install.
The code to reinstall self originated routes was not behaving
correctly. For some reason we were looking for self originated
routes from the kernel to be of type KERNEL. This was probably
missed when we started installing the route types. We should
depend on the self originated flag that we determine from
the callback from the kernel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
Chirag Shah [Mon, 2 Apr 2018 21:37:10 +0000 (14:37 -0700)]
ospf6d: ECMP for Intra Area Prefix routes
Handle ECMP for Intra Area Prefix LSAs routes.
Ticket:CM-16139
Testing Done:
Configure ospf6 passive interface R2 and R3 with
same prefix address.
Check Intra Area Prefix LSA update at R1 and R3
which would have ECMP paths with effective two
paths and two nexthops (from R2 and R4).
stop frr at R3 and R1 and R4 route changes back to
one nexthop and one paht.
R1 ---- R2
| |
R3 ---- R4
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Quentin Young [Wed, 4 Apr 2018 18:20:25 +0000 (14:20 -0400)]
zebra: display holdem statics correctly
Holdem statics display the dest (and mask, if present) string that the
user entered instead of converting to CIDR notation and applying the
mask. They need to do the latter.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Arthur Jones [Wed, 4 Apr 2018 02:15:11 +0000 (19:15 -0700)]
alpine packaging: build packages and base image directly from git
Currently, we tar up the git repo before building alpine packages.
This ensures that the packages we're building are exactly what is
checked in. But, in practice, this restriction causes us to not
be able to build off of git contexts, which is a convenient feature
especially when using docker-compose.
So, here, we build the alpine packages directly from the contents
of the current directory and we install the packages into a base
image to ease downstream consumption. There is still work to be
done in that area, as we need to package up the daemons, frr user
and all the rest, but that's for later...
Testing-done:
Built directly from the git repo, built from a reference to the
git repo and built using docker-compose, all seemed to work. Also,
tested by @leleobhz and seems to build fine.
Thanks to Leonardo Amaral (@leleobhz) for reporting the issue and for
the original idea for a fix.
Issue: https://github.com/FRRouting/frr/issues/2024 Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
G. Paul Ziemba [Fri, 23 Mar 2018 23:57:03 +0000 (16:57 -0700)]
bgpd: nexthop tracking with labels for vrf-vpn leaking
Routes that have labels must be sent via a nexthop that also has labels.
This change notes whether any path in a nexthop update from zebra contains
labels. If so, then the nexthop is valid for routes that have labels.
If a nexthop update has no labeled paths, then any labeled routes
referencing the nexthop are marked not valid.
Add a route flag BGP_INFO_ANNC_NH_SELF that means "advertise myself
as nexthop when announcing" so that we can track our notion of the
nexthop without revealing it to peers.
Quentin Young [Mon, 2 Apr 2018 18:41:38 +0000 (14:41 -0400)]
doc: add more CLI documentation
* Document modes & nodes
* Document walkup behavior
* Document struct cmd_node
* Add graph of node relationships
* Reorder sections to make more logical sense
* Rewrap sections to 80 lines
* Fix code block indent
* Specify language for code blocks in order to get syntax highlighting
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 30 Mar 2018 02:13:57 +0000 (22:13 -0400)]
lib, vtysh: vrf walkup bugfix
Static route commands are now installed inside the VRF nodes. This has
quietly broken top-level static routes in certain scenarios due to
walkup logic resolving a static route configuration command inside
VRF_NODE first if the command is issued while in a CLI node lower than
VRF_NODE. To fix this VRF_NODE needs a special exit command, as has been
done for many other nodes with the same issue, to explicitly change the
vrf context to the default VRF so that when walkup resolves against the
VRF node it will configure against the default VRF as desired.
Of course this is a hack on top of a hack and the CLI walkup
implementation needs to be rewritten.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Philippe Guibert [Wed, 14 Mar 2018 09:33:40 +0000 (10:33 +0100)]
bgpd: mp_unreach_nlri fs sent with no nexthop
FS UNREACH message with 0 NLRI inside is sent after each peer
establishment. FS can send NLRI messages with no nexthop.
The commit fixes a message that is triggered by mistake
if FS was about to be sent, then that message is not output.
Also it fixes a typo.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Thu, 15 Mar 2018 12:32:04 +0000 (13:32 +0100)]
bgpd: enhance show bgp ipv4 flowspec <IP>
This command gives detail about a FS entry which contains an IP that
matches one of the rules of the FS entry. The output is the same output
as when one does show bgp ipv4 flowspec detail
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Tue, 20 Feb 2018 09:58:42 +0000 (10:58 +0100)]
bgpd: introduce [no] debug bgp flowspec
It is possible to enhance debug bgp flowspec feature by using vty
command. This command, if enabled, will dump the match/set couple of
information received on NLRI.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Mon, 19 Feb 2018 16:17:41 +0000 (17:17 +0100)]
bgpd: support for show bgp ipv4 flowspec
The show bgp ipv4 flowspec routine is made available, displays the
flowspec rules contained in the BGP FIB database, as well as the actions
to be done on those rules. Two routines are available:
show bgp ipv4 flowspec
show bgp ipv4 flowspec detail
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: use bgp flowspec API to validate and receive NLRI
The changes introduce validation of NLRI FS entries at incoming, before
being pushed in FIB. Note that the so called validation only checks for
validity of the incoming flowspec nlri format, and not the validation as
per RFC5575.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Wed, 14 Feb 2018 10:13:50 +0000 (11:13 +0100)]
bgpd: add flowspec utilities to decode, convert fs nlri
The FS nlri is depicted so as to be able to be in readable format,
either by human, or by some other ( remote daemon ?).
This work is a derived work from [0]. Initially done for validation
only, this work is extended.
The FS NLRI is able to decode addresses, numbers ( protocols, ports,
tcp values) combined ( or not) with operators. This makes possible
to have a NLRI entry for a set of ports, and/or for an other set of
value of port.
This implementation mainly brings the API visible. The API should be
consistent across the various usages.
Flowspec entries do not need aggregation feature.
Actually, all flowspec entries are unique.
So, some check is done against aggregate functionalities in the code.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
jaydom [Mon, 23 Jan 2017 02:45:30 +0000 (10:45 +0800)]
bgpd: add flowspec feature
This work is derived from a work done by China-Telecom.
That initial work can be found in [0].
As the gap between frr and quagga is important, a reworks has been
done in the meantime.
The initial work consists of bringing the following:
- Bringing the client side of flowspec.
- the enhancement of address-family ipv4/ipv6 flowspec
- partial data path handling at reception has been prepared
- the support for ipv4 flowspec or ipv6 flowspec in BGP open messages,
and the internals of BGP has been done.
- the memory contexts necessary for flowspec has been provisioned
In addition to this work, the following has been done:
- the complement of adaptation for FS safi in bgp code
- the code checkstyle has been reworked so as to match frr checkstyle
- the processing of IPv6 FS NLRI is prevented
- the processing of FS NLRI is stopped ( temporary)
Philippe Guibert [Wed, 10 Jan 2018 18:13:27 +0000 (19:13 +0100)]
lib: prefix support for flowspec
prefix structure is used to handle flowspec prefixes. A new AFI is
introduced: AF_FLOWSPEC. A sub structure named flowspec_prefix is
used in prefix to host the flowspec entry.
Reason to introduce that new kind is that prefixlen from prefix
structure is too short to all the flowspec needs, since NLRI can go over
0xff bytes.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
vivek [Fri, 30 Mar 2018 00:24:00 +0000 (00:24 +0000)]
bgpd: Fix use of ROUTE_IMPORTED for EVPN
Ensure that only EVPN routes are flagged as such when installing into or
withdrawing from zebra, the earlier check broke L3VPN or VRF route-leaked
routes. Also, fix an incorrect check related to imported routes in path
selection.
Updates: bgpd: Use BGP_ROUTE_IMPORTED for EVPN [vivek] Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Chirag Shah [Tue, 27 Mar 2018 22:28:14 +0000 (15:28 -0700)]
ospf6d: fix loop in ABRs
When two routers from same area connected to backbone,
intra route advertised from area x should take precedence
within area x. The same route would be injected as summary
lsa to area 0/y. The same LSA via second abr injected back to
area x and since area 0 is lower than area x its route take
precedence.
Move the area check below path type and cost as both are crucial
to determine best route.
Ticket:CM-19627
Testing Done:
Initial route generated via area 1 as Intra-Prefix LSA (2009).
R1 and R2 both re advertised Inter Area Prefix LSA
(Summary LSA 2003) to area 1.
With the change area 1 Intra route precedence is preserved.
The address of H1 from Right is reachable via ping.
area 1 | area 0
R1
/ \
/ \
/ \
H1 --Left Right
\ /
\ /
\ /
R2
area 1 | area 0
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>