]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
6 years agozebra: Add detailed debugging command for NHT tracking
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>
6 years agozebra: Modify NHT to occur when needed.
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>
6 years agozebra: Add a base node for the zebra vrf tables
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>
6 years agozebra: Abstract the rib_dest_t creation
Donald Sharp [Wed, 6 Feb 2019 19:21:36 +0000 (14:21 -0500)]
zebra: Abstract the rib_dest_t creation

Abstract the creation of the rib_dest_t so that we can call it
from multiple places.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Set and track the resolved_route for the rnh as it changes.
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>
6 years agozebra: Add the afi_t to the rnh
Donald Sharp [Wed, 6 Feb 2019 15:53:48 +0000 (10:53 -0500)]
zebra: Add the afi_t to the rnh

Store the associated afi with the rnh, it will be useful in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add the type we are working on to the rnh data structure
Donald Sharp [Wed, 6 Feb 2019 15:23:07 +0000 (10:23 -0500)]
zebra: Add the type we are working on to the rnh data structure

Store the type we are working on w/ the rnh data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: The prn value may be NULL do not allow deref
Donald Sharp [Wed, 6 Feb 2019 14:46:15 +0000 (09:46 -0500)]
zebra: The prn value may be NULL do not allow deref

The prn value as passed in may be NULL as such do not
allow it to be derefed (even though it works now).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Make the import_check look like nexthop_check
Donald Sharp [Wed, 6 Feb 2019 02:27:02 +0000 (21:27 -0500)]
zebra: Make the import_check look like nexthop_check

Make the functions take the same parameters.

Future commits will use this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Modify code so that dplane is responsible for indicating success/fail of install
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.
6 years agozebra: On route install/update failure correctly indicate in rib
Donald Sharp [Sat, 9 Feb 2019 15:51:33 +0000 (10:51 -0500)]
zebra: On route install/update failure correctly indicate in rib

When we get a route install failure from the kernel, actually
indicate in the rib the status of the routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Unset old_re as queued.
Donald Sharp [Sat, 9 Feb 2019 15:45:42 +0000 (10:45 -0500)]
zebra: Unset old_re as queued.

When switching routes from one route type to another actually
unset the old route as enqueued.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: zebra_router.c does not own the data plane shutdown of tables
Donald Sharp [Sun, 10 Feb 2019 15:14:26 +0000 (10:14 -0500)]
zebra: zebra_router.c does not own the data plane shutdown of tables

When shutting down, the individual vrf's own the shutdown of the table
and subsuquent removal from the routes from the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: When shutting down actually close the socket
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>
6 years agotopotests: Add a bit more useful debugging to ldp-vpls-topo1
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>
6 years agoMerge pull request #4004 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Wed, 27 Mar 2019 15:25:15 +0000 (08:25 -0700)]
Merge pull request #4004 from chiragshah6/evpn_dev2

zebra: evpn mac ip dup detect (DAD) timers cleanup

6 years agoMerge pull request #4023 from qlyoung/doc-exclude-bfd-options-manpages
Rafael Zalamena [Wed, 27 Mar 2019 14:23:29 +0000 (11:23 -0300)]
Merge pull request #4023 from qlyoung/doc-exclude-bfd-options-manpages

doc: exclude bfd-options.rst from toctree

6 years agoMerge pull request #4017 from mjstapp/fix_summary_installed_flag
Donald Sharp [Wed, 27 Mar 2019 12:40:12 +0000 (08:40 -0400)]
Merge pull request #4017 from mjstapp/fix_summary_installed_flag

zebra: use the INSTALLED flag consistently in route summary

6 years agoMerge pull request #4019 from sworleys/Fix-Extended-Ack-Err
Mark Stapp [Wed, 27 Mar 2019 12:35:02 +0000 (08:35 -0400)]
Merge pull request #4019 from sworleys/Fix-Extended-Ack-Err

zebra: Fix extended ack error message parsing

6 years agodoc: exclude bfd-options.rst from toctree 4023/head
Quentin Young [Tue, 26 Mar 2019 20:53:58 +0000 (20:53 +0000)]
doc: exclude bfd-options.rst from toctree

This is an include file, needs to be explicitly excluded to suppress
Sphinx warnings.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #3983 from opensourcerouting/pim-tests
Lou Berger [Tue, 26 Mar 2019 16:05:13 +0000 (17:05 +0100)]
Merge pull request #3983 from opensourcerouting/pim-tests

topotests: pim-basic: add topology to test PIM

6 years agoMerge pull request #3998 from pguibert6WIND/workflow_bug_fixes_older
David Lamparter [Tue, 26 Mar 2019 15:45:48 +0000 (16:45 +0100)]
Merge pull request #3998 from pguibert6WIND/workflow_bug_fixes_older

doc: permit maintenance on more than the 2 last maintenance releases

6 years agoMerge pull request #3946 from AnuradhaKaruppiah/evpn-prefix-length
David Lamparter [Tue, 26 Mar 2019 15:38:28 +0000 (16:38 +0100)]
Merge pull request #3946 from AnuradhaKaruppiah/evpn-prefix-length

bgp: fix misc evpn problems caused by using incorrect prefixlen

6 years agoMerge pull request #4008 from donaldsharp/zclient_log_improvement
David Lamparter [Tue, 26 Mar 2019 15:36:55 +0000 (16:36 +0100)]
Merge pull request #4008 from donaldsharp/zclient_log_improvement

Zclient log improvement

6 years agoMerge pull request #4013 from manuhalo/zebra_c++_guards
David Lamparter [Tue, 26 Mar 2019 15:35:52 +0000 (16:35 +0100)]
Merge pull request #4013 from manuhalo/zebra_c++_guards

zebra: add extern C guards to headers

6 years agoMerge pull request #4020 from cfra/feature/improve-init-script
Quentin Young [Tue, 26 Mar 2019 15:23:43 +0000 (11:23 -0400)]
Merge pull request #4020 from cfra/feature/improve-init-script

tools/frr.in: Only attempt to load daemons.conf if present

6 years agoMerge pull request #4021 from donaldsharp/bgp_warnings
Lou Berger [Tue, 26 Mar 2019 15:18:18 +0000 (16:18 +0100)]
Merge pull request #4021 from donaldsharp/bgp_warnings

bgpd: Split up warn message to allow finer grained understanding

6 years agobgpd: Split up warn message to allow finer grained understanding 4021/head
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>
6 years agotools/frr.in: Only attempt to load daemons.conf if present 4020/head
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

6 years agozebra: Fix extended ack error message parsing 4019/head
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>
6 years agozebra: use the INSTALLED flag consistently in route summary 4017/head
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.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoMerge pull request #4010 from sarav511/3988
Quentin Young [Mon, 25 Mar 2019 17:31:23 +0000 (13:31 -0400)]
Merge pull request #4010 from sarav511/3988

ospfd: Remaining packet calculation while fragmenting lsu, ls-ack and…

6 years agoMerge pull request #4011 from pguibert6WIND/duplicate_json_metric
Donald Sharp [Mon, 25 Mar 2019 15:27:55 +0000 (11:27 -0400)]
Merge pull request #4011 from pguibert6WIND/duplicate_json_metric

zebra: remove duplicated json information

6 years agoadd cplusplus guards to all zebra headers 4013/head
Emanuele Di Pascale [Mon, 25 Mar 2019 14:11:55 +0000 (15:11 +0100)]
add cplusplus guards to all zebra headers

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
6 years agozebra: remove duplicated json information 4011/head
Philippe Guibert [Mon, 25 Mar 2019 14:01:56 +0000 (15:01 +0100)]
zebra: remove duplicated json information

the metric information is already present for connected routes. so
remove that line.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoospfd: Remaining packet calculation while fragmenting lsu, ls-ack and ls-req 4010/head
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>
6 years agolib: Improve debugs in zclient.c 4008/head
Donald Sharp [Mon, 25 Mar 2019 13:09:35 +0000 (09:09 -0400)]
lib: Improve debugs in zclient.c

Fixup a couple of places to improve debugging of what is
going on in zclient.c.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Fixup missing log entries
Donald Sharp [Mon, 25 Mar 2019 13:04:28 +0000 (09:04 -0400)]
lib: Fixup missing log entries

Add a few missing log entries to the macro to allow us to print
out the zapi message type, since they were missing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3772 from pguibert6WIND/vrf_backend_unknown
Donald Sharp [Mon, 25 Mar 2019 12:13:16 +0000 (08:13 -0400)]
Merge pull request #3772 from pguibert6WIND/vrf_backend_unknown

Vrf backend unknown

6 years agoMerge pull request #3989 from opensourcerouting/redhat-new-init
Donald Sharp [Mon, 25 Mar 2019 11:45:04 +0000 (07:45 -0400)]
Merge pull request #3989 from opensourcerouting/redhat-new-init

redhat: switch to new init script

6 years agotools/frrcommon.sh: ignore 'declare' failures 3989/head
David Lamparter [Sun, 24 Mar 2019 14:52:02 +0000 (15:52 +0100)]
tools/frrcommon.sh: ignore 'declare' failures

The "declare -p watchfrr_options" call is just to support backwards
compatibility.  If it fails, silently ignore that.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge branch 'frr/pull/4005'
David Lamparter [Sun, 24 Mar 2019 14:28:23 +0000 (15:28 +0100)]
Merge branch 'frr/pull/4005'

6 years agobgpd: add command to lookup prefixes in the rpki table
Marcel Röthke [Sat, 23 Mar 2019 10:57:09 +0000 (11:57 +0100)]
bgpd: add command to lookup prefixes in the rpki table

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agoMerge pull request #4001 from qlyoung/doc-update-libyang-building
David Lamparter [Sat, 23 Mar 2019 13:24:27 +0000 (14:24 +0100)]
Merge pull request #4001 from qlyoung/doc-update-libyang-building

doc: update instructions for building libyang

6 years agoMerge pull request #3996 from qlyoung/doc-move-rpm-to-devdocs
David Lamparter [Sat, 23 Mar 2019 13:22:49 +0000 (14:22 +0100)]
Merge pull request #3996 from qlyoung/doc-move-rpm-to-devdocs

move rpm build doc to devdocs

6 years agoMerge pull request #3985 from rubenk/doc-fix-a-few-typos
David Lamparter [Sat, 23 Mar 2019 12:49:20 +0000 (13:49 +0100)]
Merge pull request #3985 from rubenk/doc-fix-a-few-typos

doc: fix a couple of typos

6 years agozebra: add mac ip dad timers cleanup 4004/head
Chirag Shah [Sat, 16 Mar 2019 02:09:25 +0000 (19:09 -0700)]
zebra: add mac ip dad timers cleanup

When MAC or IP deleted ensure to cleanup DAD timers.

Signed-off-by: Chirag Shah <chirag@cumulusnetwork.com>
6 years agodoc: update instructions for building libyang 4001/head
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>
6 years agoMerge pull request #3978 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Fri, 22 Mar 2019 16:49:00 +0000 (09:49 -0700)]
Merge pull request #3978 from chiragshah6/evpn_dev2

bgpd: l3vni add-del handle non-defualt rd

6 years agodoc: move rpm build doc to dev docs 3996/head
Quentin Young [Thu, 21 Mar 2019 21:08:52 +0000 (21:08 +0000)]
doc: move rpm build doc to dev docs

------------{ <(O.O)> }------------

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #3927 from donaldsharp/rnh_cleanup
David Lamparter [Fri, 22 Mar 2019 15:56:12 +0000 (16:56 +0100)]
Merge pull request #3927 from donaldsharp/rnh_cleanup

zebra: Cleanup rnh table information before deleting underlying tables

6 years agodoc: permit maintenance on more than the 2 last maintenance releases 3998/head
Philippe Guibert [Fri, 22 Mar 2019 14:56:11 +0000 (15:56 +0100)]
doc: permit maintenance on more than the 2 last maintenance releases

it is possible to do some ponctual backporting of bug fixes, on older
than the 2 last maintenance releases.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #3935 from FRRouting/doc-add-fabricd-seealso
Mark Stapp [Fri, 22 Mar 2019 11:34:44 +0000 (07:34 -0400)]
Merge pull request #3935 from FRRouting/doc-add-fabricd-seealso

doc: include fabricd in see-also programs

6 years agoMerge pull request #3839 from srimohans/support_bundle
Donald Sharp [Fri, 22 Mar 2019 08:03:45 +0000 (04:03 -0400)]
Merge pull request #3839 from srimohans/support_bundle

FRR: Python script to generate support bundle for FRR

6 years agoMerge pull request #3776 from opensourcerouting/pbrd-interface-nexthops
Donald Sharp [Fri, 22 Mar 2019 07:45:48 +0000 (03:45 -0400)]
Merge pull request #3776 from opensourcerouting/pbrd-interface-nexthops

pbrd: add support for interface nexthops

6 years agoMerge pull request #3972 from mjstapp/fix_privs_race
Donald Sharp [Fri, 22 Mar 2019 06:32:17 +0000 (02:32 -0400)]
Merge pull request #3972 from mjstapp/fix_privs_race

libs: fix race in privs changes

6 years agoMerge pull request #3980 from rubensfig/doc_bgp_rr
Donald Sharp [Fri, 22 Mar 2019 06:23:52 +0000 (02:23 -0400)]
Merge pull request #3980 from rubensfig/doc_bgp_rr

doc: route reflector documentation

6 years agodoc: fix underline level
Quentin Young [Thu, 21 Mar 2019 18:50:25 +0000 (18:50 +0000)]
doc: fix underline level

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #3992 from rubenk/tools-fix-typos
Quentin Young [Thu, 21 Mar 2019 17:11:55 +0000 (13:11 -0400)]
Merge pull request #3992 from rubenk/tools-fix-typos

tools: fix two typos in daemons file

6 years agotools: fix two typos in daemons file 3992/head
Ruben Kerkhof [Thu, 21 Mar 2019 13:50:53 +0000 (14:50 +0100)]
tools: fix two typos in daemons file

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
6 years agoredhat: switch to new init script
David Lamparter [Mon, 18 Feb 2019 23:44:01 +0000 (00:44 +0100)]
redhat: switch to new init script

Drop the special versions of frr.init/frr.service/daemons from redhat/
and use the generic versions instead.

Tested-by: Liam McBirnie <liam.mcbirnie@boeing.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agodoc: route reflector documentation 3980/head
Rubens Figueiredo [Wed, 20 Mar 2019 13:24:25 +0000 (14:24 +0100)]
doc: route reflector documentation

Signed-off-by: Rubens Figueiredo <rubens@bisdn.de>
6 years agoMerge pull request #3967 from chiragshah6/evpn_dev
Sri Mohana Singamsetty [Thu, 21 Mar 2019 03:42:48 +0000 (20:42 -0700)]
Merge pull request #3967 from chiragshah6/evpn_dev

bgpd: evpn l3vni add router mac self check skip route installation

6 years agoMerge pull request #3863 from patrasar/RP_addition_deletion_changes
Donald Sharp [Wed, 20 Mar 2019 22:31:01 +0000 (18:31 -0400)]
Merge pull request #3863 from patrasar/RP_addition_deletion_changes

Rp addition deletion changes

6 years agoRevert "Merge pull request #3982 from pacovn/Coverity_1479148_copy_paste"
Quentin Young [Wed, 20 Mar 2019 21:25:04 +0000 (21:25 +0000)]
Revert "Merge pull request #3982 from pacovn/Coverity_1479148_copy_paste"

This reverts commit 3a3704fe365a25b9644a938f674effb3e6084c56, reversing
changes made to 5a3c6e736dca3639a1b49cdf305b909736f721de.

6 years agoMerge pull request #3982 from pacovn/Coverity_1479148_copy_paste
Quentin Young [Wed, 20 Mar 2019 21:09:49 +0000 (17:09 -0400)]
Merge pull request #3982 from pacovn/Coverity_1479148_copy_paste

zebra: copy-paste error (Coverity 1479148)

6 years agodoc: address review comment 3985/head
Ruben Kerkhof [Wed, 20 Mar 2019 20:20:31 +0000 (21:20 +0100)]
doc: address review comment

'cannot' feels more natural

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
6 years agodoc: fix a couple of typos
Ruben Kerkhof [Wed, 20 Mar 2019 19:08:33 +0000 (20:08 +0100)]
doc: fix a couple of typos

Found with https://github.com/codespell-project/codespell

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
6 years agotopotests: pim-basic: fix some rough edges 3983/head
Rafael Zalamena [Wed, 20 Mar 2019 17:03:57 +0000 (14:03 -0300)]
topotests: pim-basic: fix some rough edges

Move daemon configuration to appropriated files and use `json_cmp` to
assert the values we expect.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoAdd code to test some very basic pim functionality
Donald Sharp [Tue, 18 Sep 2018 13:43:46 +0000 (09:43 -0400)]
Add code to test some very basic pim functionality

Add code to send a S,G stream and make sure the RP see's it.
Add code to send a *,G report and make sure the RP see's it.

This is just some *very* basic functionality testing to
ensure that we don't break anything basic.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3968 from donaldsharp/bfd_valuable_valgrind
Rafael Zalamena [Wed, 20 Mar 2019 16:01:43 +0000 (13:01 -0300)]
Merge pull request #3968 from donaldsharp/bfd_valuable_valgrind

bfdd: Prevent uninited use of data

6 years agozebra: copy-paste error (Coverity 1479148) 3982/head
F. Aragon [Wed, 20 Mar 2019 15:45:32 +0000 (16:45 +0100)]
zebra: copy-paste error (Coverity 1479148)

Signed-off-by: F. Aragon <paco@voltanet.io>
6 years agobfdd: Prevent uninited use of data 3968/head
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>
6 years agoMerge pull request #3977 from opensourcerouting/bfd-small-fixes
Quentin Young [Wed, 20 Mar 2019 05:01:08 +0000 (01:01 -0400)]
Merge pull request #3977 from opensourcerouting/bfd-small-fixes

bfdd: two small fixes

6 years agobgpd: l3vni add-del handle non-defualt rd 3978/head
Chirag Shah [Wed, 20 Mar 2019 00:06:10 +0000 (17:06 -0700)]
bgpd: l3vni add-del handle non-defualt rd

During L3VNI add, non-default RD value is not replayed
correctly. Instead of picking non-default value it picks
up auto RD value which is derived based on router-id.

Indentation issue: Remove additional space from
L3VNI running config output.

Ticket:CM-24320
Reviewed By:CCR-8437
Testing Done:

Bring up evpn configuration with L3vni up with non-default
RD value, perform peerlink flap, l3vni flap which removes
all VNIS and readds with RD and RT values.
The configured RD and RTs are replayed.

Post L3VNI flap
router bgp 5546 vrf vrf2
 !
 address-family l2vpn evpn
  rd 45.0.66.2:6
  route-target import 20001:1
  route-target export 20001:1
 exit-address-family

TORC11# show bgp l2vpn evpn vni 4002
VNI: 4002 (known to the kernel)
  Type: L3
  Tenant VRF: vrf2
  RD: 45.0.66.2:6
  Originator IP: 36.0.0.11
  Advertise-gw-macip : n/a
  Import Route Target:
    20001:1
  Export Route Target:
    20001:1

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #3976 from qlyoung/test-update-docker-repo
Rafael Zalamena [Tue, 19 Mar 2019 21:28:42 +0000 (18:28 -0300)]
Merge pull request #3976 from qlyoung/test-update-docker-repo

tests: point topotests docker img to new location

6 years agobgpd: router mac same as self skip route install 3967/head
Chirag Shah [Wed, 13 Mar 2019 01:41:01 +0000 (18:41 -0700)]
bgpd: router mac same as self skip route install

When a bgp-peer comes up prior to l3vnis are up in bgpd.
The EVPN routes (type-2/type-5) are learnt via peer.
The routes can have one of interface's MAC in rmac attribute.
The self rmac check would bypass as l3vni is not present.

Once l3vni has come up in bgpd, while installing evpn
routes in vrf table, perform rmac attribute check against self mac.
The routes with rmac of ours will be removed via re-scan
of routes during bgp_mac_rescan_all_evpn_tables when
interface mac is added to bgp.

Ticket:CM-24224
Reviewed By:CCR-8423
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulunetworks.com>
6 years agobfdd: fix echo loopback function 3977/head
Rafael Zalamena [Tue, 19 Mar 2019 20:25:00 +0000 (17:25 -0300)]
bfdd: fix echo loopback function

Add the address family to the sockaddr structure otherwise `sendmsg`
will fail with `EAFNOSUPPORT`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: fix JSON API local-address translation
Rafael Zalamena [Tue, 19 Mar 2019 20:22:58 +0000 (17:22 -0300)]
bfdd: fix JSON API local-address translation

Get the local-address from the right key struct member.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agotests: point topotests docker img to new location 3976/head
Quentin Young [Tue, 19 Mar 2019 20:18:49 +0000 (20:18 +0000)]
tests: point topotests docker img to new location

The topotests docker image has moved from frrouting/frr to
frrouting/topotests. Update accordingly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #3975 from mjstapp/fix_ospf_empty_debug
Quentin Young [Tue, 19 Mar 2019 16:42:29 +0000 (12:42 -0400)]
Merge pull request #3975 from mjstapp/fix_ospf_empty_debug

ospfd: remove empty debug

6 years agoMerge pull request #3960 from donaldsharp/connected
Mark Stapp [Tue, 19 Mar 2019 15:33:55 +0000 (11:33 -0400)]
Merge pull request #3960 from donaldsharp/connected

zebra: System routes sometimes can not be properly selected

6 years agoospfd: remove empty debug 3975/head
Mark Stapp [Tue, 19 Mar 2019 14:47:00 +0000 (10:47 -0400)]
ospfd: remove empty debug

Remove empty debug line - empty format string generates a
compile warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoMerge pull request #3950 from donaldsharp/zlookup_or_down
Jafar Al-Gharaibeh [Tue, 19 Mar 2019 05:10:10 +0000 (00:10 -0500)]
Merge pull request #3950 from donaldsharp/zlookup_or_down

pimd: Free up zlookup structure late

6 years agopimd: Addressing the review comments 3863/head
Sarita Patra [Tue, 19 Mar 2019 03:22:04 +0000 (20:22 -0700)]
pimd: Addressing the review comments

Signed-off-by: Sarita Patra <saritap@vmware.com>
6 years agoMerge pull request #3947 from dslicenc/bgpd-redist-connected-vrf
Lou Berger [Sun, 17 Mar 2019 18:26:44 +0000 (14:26 -0400)]
Merge pull request #3947 from dslicenc/bgpd-redist-connected-vrf

Bgpd redist connected vrf

6 years agoMerge pull request #3963 from AnuradhaKaruppiah/dad-fixes
Sri Mohana Singamsetty [Sun, 17 Mar 2019 17:41:20 +0000 (10:41 -0700)]
Merge pull request #3963 from AnuradhaKaruppiah/dad-fixes

zebra: EVPN DAD trigger was causing zebra to crash

6 years agolibs: fix race in privs changes 3972/head
Mark Stapp [Sun, 17 Mar 2019 17:25:16 +0000 (13:25 -0400)]
libs: fix race in privs changes

Use the privs struct mutex more strictly, to ensure that the
privs are at the level the caller expects when the apis
return.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoMerge pull request #3949 from qlyoung/remove-zlog-newlines
Sri Mohana Singamsetty [Fri, 15 Mar 2019 17:27:54 +0000 (10:27 -0700)]
Merge pull request #3949 from qlyoung/remove-zlog-newlines

*: remove trailing newlines from zlog messages

6 years agoMerge pull request #3892 from vivek-cumulus/evpn_vrf_route_leak
Sri Mohana Singamsetty [Fri, 15 Mar 2019 17:27:13 +0000 (10:27 -0700)]
Merge pull request #3892 from vivek-cumulus/evpn_vrf_route_leak

Leaking of EVPN-based IPv4 and IPv6 routes between VRFs

6 years agoMerge pull request #3962 from donaldsharp/pim_display
Mark Stapp [Fri, 15 Mar 2019 17:10:54 +0000 (13:10 -0400)]
Merge pull request #3962 from donaldsharp/pim_display

pimd: Display drpriority as a unsigned int

6 years agozebra: EVPN DAD trigger was causing zebra to crash 3963/head
Anuradha Karuppiah [Fri, 15 Mar 2019 16:13:42 +0000 (09:13 -0700)]
zebra: EVPN DAD trigger was causing zebra to crash

Duplicate address detection and recovery was relying on the l2-vni backptr
in the neighbor entry which was simply not initialized resulting in
a NULL pointer access in a setup with dup-addressed VMs -
VM1:{IP1,M1} and VM2:{IP1,M2}

Call stack:
(gdb) bt 6
    at lib/sigevent.c:249
    nbr=nbr@entry=0x559347f901d0, vtep_ip=..., vtep_ip@entry=..., do_dad=do_dad@entry=true,
    is_dup_detect=is_dup_detect@entry=0x7ffc7f6be59f, is_local=is_local@entry=true)
    at ./lib/ipaddr.h:86
    ip=0x7ffc7f6be6f0, ifp=0x559347f901d0, zvni=0x559347f86800) at zebra/zebra_vxlan.c:3152
(More stack frames follow...)
(gdb) p nbr->zvni
$8 = (zebra_vni_t *) 0x0 <<<<<<<<<<<<<<<<<<<<
(gdb)

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agopimd: Display drpriority as a unsigned int 3962/head
Donald Sharp [Fri, 15 Mar 2019 15:32:41 +0000 (11:32 -0400)]
pimd: Display drpriority as a unsigned int

There existed output code that used %d for a uint32_t
switch to a %u.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: System routes sometimes can not be properly selected 3960/head
Donald Sharp [Mon, 11 Mar 2019 13:39:19 +0000 (09:39 -0400)]
zebra: System routes sometimes can not be properly selected

System Routes if received over the netlink bus in a
specific pattern that causes an update operation for that
route in zebra can leave the dest->selected_fib pointer NULL,
while having the ZEBRA_FLAG_SELECTED flag set. Specifically
one way to achieve this is to do this:

`ip addr del 4.5.6.7/32 dev swp1 ; ip addr add 4.5.6.7/32 dev swp1 metric 9`

Why is this a big deal?
Because nexthop tracking is looking at ZEBRA_FLAG_SELECTED to
know if we can use a route, while nexthop active checking uses
dest->selected_fib.

So imagine we have bgp registering a nexthop. nexthop tracking in
the above case will be able to choose the 4.5.6.7/32 route
if that is what the nexthop is, due to the ZEBRA_FLAG_SELECTED being
properly set. BGP then allows the peers connection to come up and we
install routes with a 4.5.6.7 nexthop. The rib processing for route
installation will then look at the 4.5.6.7 route see no
dest->selected_fib and then start walking up the tree to resolve
the route. In our case we could easily hit the default route and be
unable to resolve the route. Which then becomes inactive in the
rib so we never attempt to install it.

This commit fixes this problem because when the rib_process decides
that we need to update the fib( ie replace old w/ new ), the
replacement with new was not setting the `dest->selected_fib` pointer
to the new route_entry, when the route was a system route.

Ticket: CM-24203
Signed-off-by: Donald Sharp <sharpd@cumulusnetworkscom>
6 years agoMerge pull request #3920 from AkhileshSamineni/show_bgp_ipv6_summary_fix_master
Donald Sharp [Fri, 15 Mar 2019 12:54:03 +0000 (08:54 -0400)]
Merge pull request #3920 from AkhileshSamineni/show_bgp_ipv6_summary_fix_master

bgpd: Incorrect number of peers count in "show bgp ipv6 summary" output

6 years agoMerge pull request #3900 from opensourcerouting/ripd-fix-no-passive-iface
Donald Sharp [Fri, 15 Mar 2019 12:37:44 +0000 (08:37 -0400)]
Merge pull request #3900 from opensourcerouting/ripd-fix-no-passive-iface

ripd: fix removal of configured passive interfaces

6 years agoMerge pull request #3902 from opensourcerouting/fix-removal-np-containers
Donald Sharp [Fri, 15 Mar 2019 12:37:12 +0000 (08:37 -0400)]
Merge pull request #3902 from opensourcerouting/fix-removal-np-containers

lib: fix removal of yang non-presence containers

6 years agoMerge pull request #3943 from mjstapp/fix_ospf_json_fix
Donald Sharp [Fri, 15 Mar 2019 12:34:31 +0000 (08:34 -0400)]
Merge pull request #3943 from mjstapp/fix_ospf_json_fix

ospfd: fix some json timer output

6 years agopimd: Free up zlookup structure late 3950/head
Donald Sharp [Thu, 14 Mar 2019 21:03:26 +0000 (17:03 -0400)]
pimd: Free up zlookup structure late

When we are shutting down, delay the zlookup free to as
late as possible since we may need it still

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years ago*: remove trailing newlines from zlog messages 3949/head
Quentin Young [Thu, 14 Mar 2019 18:41:15 +0000 (18:41 +0000)]
*: remove trailing newlines from zlog messages

Zlog puts its own newlines on, and doing this makes logs look nasty.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>