while labeled_unicast routes should be fetched in the
unicast table, we cannot set the safi to SAFI_UNICAST
else the peer afc checks and subgroup retrieval will fail
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Donald Sharp [Fri, 22 Feb 2019 15:20:51 +0000 (10:20 -0500)]
isisd, ospf6d, ripngd: Do not allow v6 LL's to be `redist connected` in
The rib process of handling routes has been unified a bit more
and as a result v6 LL routes are now showing up as a result
of a `redistribute connected`. Doing anything with these
routes is a policy decision that should be enforced by the
individual routing daemons not by zebra. As such add a bit
of code to isisd, ripngd and opsf6d to handle them. The bgp daemon
already handles this situation.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 21 Feb 2019 21:10:56 +0000 (16:10 -0500)]
zebra: Re-evaluate the nexthop tracking if flags changed
Routing protocols are allowed ( and even encouraged ) to modify
the flags that influence the nexthop tracking. As such when
we modify the tracking of a nexthop to go from, say, connected force
or not we must re-evaluate the nexthop and send the results
up to the interested parties.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 12 Feb 2019 14:51:08 +0000 (09:51 -0500)]
zebra: If we copy re than the state has changed
After we have evaluated the rnh for an import-check type
and we copy the re then we know that the state has changed
and we should be notifying the end user about it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 8 Feb 2019 22:14:30 +0000 (17:14 -0500)]
zebra: Modify lsp processing to be invoked as needed
LSP processing was a zvrf flag based upon a connected route
coming or going. But this did not allow us to know
that we should do lsp processing other than after the meta-queue
processing was finished.
Eventually we moved meta-queue processing of do_nht_processing
to after the dataplane sent the main pthread some results.
This of course left us with a timing hole where if a connected
route came in and we received a data plane response *before*
the meta queue was processed we would not do the work as necessary.
Move the lsp processing to a flag off of the rib_dest_t. If it
is marked then we need to process lsps.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 8 Feb 2019 14:11:47 +0000 (09:11 -0500)]
zebra: Add detailed debugging command for NHT tracking
Add a detailed debugging command for NHT tracking and add
the detailed output to the log about why we make some decisions
that we are. I tried to model this like the rib processing
detailed debugs that we added a few months back.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 6 Feb 2019 15:23:58 +0000 (10:23 -0500)]
zebra: Modify NHT to occur when needed.
Currently nexthop tracking is performed for all nexthops that
are being tracked after a group of contexts are passed back
from the data plane for post install processing.
This is inefficient and leaves us sending nexthop tracking
changes at an accelerated pace, when we think we've changed
a route. Additionally every route change will cause us
to relook at all nexthops we are tracking irrelevant if
they are possibly related to the route change or not.
Let's modify the code base to track the rnh's off of the rib
table's rn, `rib_dest_t`. So after we process a node, install
it into the data plane, in rib_process_result we can
look at the `rib_dest_t` associated with the rn and see that
a nexthop depended on this route node. If so, refigure it.
Additionally we will store rnh's that are not resolved on the
0.0.0.0/0 nexthop tracking list. As such when a route node
changes we can quickly walk up the rib tree and notice that
it needs to be reprocessed as well.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 6 Feb 2019 19:44:44 +0000 (14:44 -0500)]
zebra: Add a base node for the zebra vrf tables
Add a default route_node for our routing tables. This will allow us
to know that we can hang data off the default route for processing.
We will be hanging the nexthop tracking data structures off the rib_dest_t
so that we can know which nexthops we need to handle. Effectively
nexthops that we are tracking that are unresolved will be stored on the
default route. When something changes in the rib tree we can
work up the rn->parent pointer checking for nexthops we need to re-evaluate.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 6 Feb 2019 16:16:07 +0000 (11:16 -0500)]
zebra: Set and track the resolved_route for the rnh as it changes.
The resolved_route is the prefix we are using in the routing table
to resolve this particular nexthop we are tracking. Add code
to better track it's change.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 8 Feb 2019 20:01:41 +0000 (15:01 -0500)]
zebra: Modify code so that dplane is responsible for indicating success/fail of install
We have several route types KERNEL and CONNECT that are handled via special
case in the code. This was causing a lot of work keeping the two different
classes of route types as special(SYSTEM OR NOT). Put the dplane
in charge of the code that sets the bits for signalling route install/failure.
This greatly simplifies the code calling path and makes all route types
be handled exactly the same. Additionaly code that we want to run
post data plane install can just work as per normal then, instead
of having to know we need to run it when we have a special type
of route.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
Donald Sharp [Sat, 9 Feb 2019 21:38:34 +0000 (16:38 -0500)]
zebra: When shutting down actually close the socket
When shutting down and we have a very large table to shutdown
and after we've intentionally closed all the client connections
close the zebra zserv client socket.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 9 Feb 2019 16:09:32 +0000 (11:09 -0500)]
topotests: Add a bit more useful debugging to ldp-vpls-topo1
When something goes wrong with this test, having these turned
on will help us debug zebra processing a bit better in the
future without having to modify anything else.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke [Tue, 26 Mar 2019 13:56:59 +0000 (14:56 +0100)]
alpine/APKBUILD.in: Add libyang-dev dependency, drop binutils-libs
We need libyang to build FRR, so add it to the make dependencies.
Alpine will automatically detect it as runtime dependency, so no
need to add it there.
The package binutils-libs doesn't exist anymore, so remove it from
the dependencies.
Donald Sharp [Tue, 26 Mar 2019 13:11:28 +0000 (09:11 -0400)]
bgpd: Split up warn message to allow finer grained understanding
We have the same warn message in 3 spots, which makes it extremely
hard to figure out which of the 3 has gone terribly wrong.
Add a bit of code to disambiguate the 3 situations.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke [Tue, 26 Mar 2019 09:28:09 +0000 (10:28 +0100)]
tools/frr.in: Only attempt to load daemons.conf if present
Apparently, the default changed to use `/etc/frr/daemons` instead of
`/etc/frr/daemons.conf`. Therefore, we should ignore absence of the
latter file, because its absence is not an actuall error but will
cause a confusing error message like this:
/etc/init.d/frr: line 507: /etc/frr/daemons.conf: No such file or directory
Stephen Worley [Tue, 26 Mar 2019 05:03:06 +0000 (01:03 -0400)]
zebra: Fix extended ack error message parsing
Fix the macros for reading NLA attribute info
from an extended error ack. We were processing the data
using route attributes (rtattr) which is identical in size
to nlattr but probably should not be used.
Further, we were incorrectly calculating the length of the
inner netlink message that cause the error. We have to read
passed that in order to access all the nlattr's.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Quentin Young [Mon, 25 Mar 2019 20:11:47 +0000 (20:11 +0000)]
doc: update build docs for Ubuntu 18.04
* Update build package list
* Update ./configure options
* Fix some RST syntax errors
* Use monolithic config examples
* Use compile include snippet
* Reorganize a bit
Tested on Ubuntu 18.04
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Mark Stapp [Mon, 25 Mar 2019 17:35:02 +0000 (13:35 -0400)]
zebra: use the INSTALLED flag consistently in route summary
The 'sho ip route summary' and 'sho ip route summary <prefix>'
paths used different definitions of a 'fib' route. Use
the route-entry 'INSTALLED' flag in both places.
Saravanan K [Mon, 25 Mar 2019 13:23:17 +0000 (06:23 -0700)]
ospfd: Remaining packet calculation while fragmenting lsu, ls-ack and ls-req
While fragmenting ospf ls packets, before appending the link state info,
wrong value is checked to see if current packet can fit in another ls info.
Because of this, when a lower mtu is configured, it couldn't fit in even 1
ls ack, which tries to send all the available ls ack in the list in loop.
This keeps allocating memory to send the packet and ends up putting the
packet buffer without ls-ack into deferred send que(ospf_ls_ack_send_delayed).
This infinite loop causes infinite memory being allocated in a loop causing
system to be unstable. This commit takes care of calculating the right value
to compare for checking oif this buffer can fit in more.
Signed-off-by: Saravanan K <saravanank@vmware.com>
Quentin Young [Fri, 22 Mar 2019 18:14:17 +0000 (18:14 +0000)]
doc: update instructions for building libyang
* Upstream libyang now works with FRR; use it
* Install libyang to system library directories to satisfy pkg-config
* Remove warnings about ABI version
* Remove outdated binary package links
* Cleanup formatting
Validated that these instructions work on:
- Fedora 24
- Fedora 28.
- Ubuntu 18.04
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Sun, 17 Mar 2019 01:25:59 +0000 (21:25 -0400)]
bfdd: Prevent uninited use of data
Running valgrind w/ bfdd and shut/no shuting interfaces
can result in this valgrind issue:
==20279== Conditional jump or move depends on uninitialised value(s)
==20279== at 0x115848: bfdd_sessions_enable_address (ptm_adapter.c:644)
==20279== by 0x115848: bfdd_interface_address_update (ptm_adapter.c:674)
==20279== by 0x48D8CAB: zclient_read (zclient.c:2698)
==20279== by 0x48CCEE3: thread_call (thread.c:1603)
==20279== by 0x48A84EF: frr_run (libfrr.c:1011)
==20279== by 0x10DAC3: main (bfdd.c:236)
==20279==
When creating the bso data structure set the bso_isaddress to false
as a default value.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>