]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agopbrd: rename nh_afi variables to nh_type to better convey their meaning
Renato Westphal [Thu, 14 Feb 2019 22:00:14 +0000 (20:00 -0200)]
pbrd: rename nh_afi variables to nh_type to better convey their meaning

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: add support for interface nexthops on nexthop groups
Renato Westphal [Thu, 14 Feb 2019 22:00:14 +0000 (20:00 -0200)]
lib: add support for interface nexthops on nexthop groups

This patch adds support to nexthops of type NEXTHOP_TYPE_IFINDEX to
nexthop-groups. This should be especially useful when dealing with
p2p interfaces like tunnels that don't have IP addresses assigned
to them.

NOTE: nh->addr can be NULL now, so we should always perform a null
check before dereferencing this pointer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: change how nexthop groups store nexthop addresses
Renato Westphal [Thu, 14 Feb 2019 22:00:14 +0000 (20:00 -0200)]
lib: change how nexthop groups store nexthop addresses

Use a pointer to a sockunion instead of a full sockunion in the
nexthop_hold structure. This prepares the ground for the next commit,
which will make nexthop addresses optional (in this commit we assume
nh->addr will never be NULL, but this will change).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: consolidate nexthop-group deletion in a single place
Renato Westphal [Thu, 14 Feb 2019 22:00:14 +0000 (20:00 -0200)]
lib: consolidate nexthop-group deletion in a single place

Reuse the nhgl_delete() function to avoid code duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3799 from donaldsharp/show_debugging
Rafael Zalamena [Thu, 14 Feb 2019 16:16:38 +0000 (14:16 -0200)]
Merge pull request #3799 from donaldsharp/show_debugging

Show debugging for bfd

5 years agoMerge pull request #3791 from sworleys/RT-Braces-rtadv
Mark Stapp [Thu, 14 Feb 2019 14:07:47 +0000 (09:07 -0500)]
Merge pull request #3791 from sworleys/RT-Braces-rtadv

zebra: Fix CLANG suggestion for braces on init of struct

5 years agobfdd: Add `show debugging [bfd]` command
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>
5 years agobfdd: Add some code so we can compile from w/ in the bfdd dir
Donald Sharp [Thu, 14 Feb 2019 04:23:06 +0000 (23:23 -0500)]
bfdd: Add some code so we can compile from w/ in the bfdd dir

Copy pattern of Makefile from other daemons to allow us to
compile this thingie(tm) from within the bfdd directory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3794 from donaldsharp/sharp_import_check
Mark Stapp [Wed, 13 Feb 2019 20:25:02 +0000 (15:25 -0500)]
Merge pull request #3794 from donaldsharp/sharp_import_check

Sharp import check

5 years agoMerge pull request #3796 from donaldsharp/mpls_deletion_cleanup
Mark Stapp [Wed, 13 Feb 2019 20:19:39 +0000 (15:19 -0500)]
Merge pull request #3796 from donaldsharp/mpls_deletion_cleanup

zebra: Deletion of a lsp is not a failure event

5 years agozebra: Deletion of a lsp is not a failure event
Donald Sharp [Wed, 13 Feb 2019 17:49:59 +0000 (12:49 -0500)]
zebra: Deletion of a lsp is not a failure event

FRR is reporting that a lsp deletion event as a failure
in the log messsages.  This will lead to confusion and
lots of fun debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3622 from mjstapp/fix_cpp_compile
Donald Sharp [Wed, 13 Feb 2019 17:47:23 +0000 (12:47 -0500)]
Merge pull request #3622 from mjstapp/fix_cpp_compile

libs, daemons: changes to permit c++ compilation

5 years agoMerge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1
Donald Sharp [Wed, 13 Feb 2019 14:32:43 +0000 (09:32 -0500)]
Merge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1

topotest: bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev

5 years agosharpd: Add ability to track import-check nexthops
Donald Sharp [Wed, 13 Feb 2019 14:27:19 +0000 (09:27 -0500)]
sharpd: Add ability to track import-check nexthops

Add the ability to sharp to track import-check type routes
from the cli.  Update docs too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Allow the registration of import checks to zebra
Donald Sharp [Wed, 13 Feb 2019 13:55:12 +0000 (08:55 -0500)]
sharpd: Allow the registration of import checks to zebra

Minor code modification to allow the sharp_zebra.c code
to differentiate between import check or nexthop watch
types.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3778 from mjstapp/fix_dplane_update
Donald Sharp [Wed, 13 Feb 2019 00:36:02 +0000 (19:36 -0500)]
Merge pull request #3778 from mjstapp/fix_dplane_update

zebra: use update semantics for routes consistently

5 years agozebra: Fix CLANG suggestion for braces on init of struct
Stephen Worley [Tue, 12 Feb 2019 20:24:00 +0000 (15:24 -0500)]
zebra: Fix CLANG suggestion for braces on init of struct

CLANG was throwing an error because struct rtadv_rdnss(dnssl) was being
initialized with = {0} instead of {}. Change to be the latter.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #3781 from donaldsharp/pbr_debug
David Lamparter [Tue, 12 Feb 2019 17:07:14 +0000 (18:07 +0100)]
Merge pull request #3781 from donaldsharp/pbr_debug

pbrd: Add some missing debugs from external events

5 years agoMerge pull request #3783 from mjstapp/fix_bad_rm_decrement
David Lamparter [Tue, 12 Feb 2019 17:06:07 +0000 (18:06 +0100)]
Merge pull request #3783 from mjstapp/fix_bad_rm_decrement

bgpd: remove route-map decrement call on prefix-list

5 years agobgpd: remove route-map decrement call on prefix-list
Mark Stapp [Tue, 12 Feb 2019 15:10:19 +0000 (10:10 -0500)]
bgpd: remove route-map decrement call on prefix-list

Commit b4897fa5 introduced a call to decrement a route-map counter,
applied to a prefix-list in bgp_rfapi_cfg.c. This commit removes
that call.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3773 from pguibert6WIND/bgp_delete_vrfid_unknown
David Lamparter [Tue, 12 Feb 2019 13:59:39 +0000 (14:59 +0100)]
Merge pull request #3773 from pguibert6WIND/bgp_delete_vrfid_unknown

bgpd: if vrf is unknown, bgp deletion not complete

5 years agoMerge pull request #3771 from donaldsharp/eigrp_crash
David Lamparter [Tue, 12 Feb 2019 13:40:09 +0000 (14:40 +0100)]
Merge pull request #3771 from donaldsharp/eigrp_crash

Eigrp crash

5 years agoMerge pull request #3723 from slrz/zebra-rtadv-add-rfc8106-support
David Lamparter [Tue, 12 Feb 2019 13:30:00 +0000 (14:30 +0100)]
Merge pull request #3723 from slrz/zebra-rtadv-add-rfc8106-support

zebra: add support for IPv6 RA options for DNS configuration (RFC8106)

5 years agopbrd: Add some missing debugs from external events
Donald Sharp [Tue, 12 Feb 2019 13:24:58 +0000 (08:24 -0500)]
pbrd: Add some missing debugs from external events

Add some debugs from events that can happen that will
influence our pbr behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3719 from liam-mcb/master
Martin Winter [Tue, 12 Feb 2019 01:54:53 +0000 (08:54 +0700)]
Merge pull request #3719 from liam-mcb/master

Revert "redhat: don't Requires initscript on systemd based distros"

5 years agotests: add C++ header compatibility smoke test
David Lamparter [Mon, 11 Feb 2019 12:22:49 +0000 (13:22 +0100)]
tests: add C++ header compatibility smoke test

Compiling an empty C file with most headers included and -Wc++-compat
gives us a build error if we introduce some stupid C++-incompatible
change.

While this won't catch everything, it's a good start.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: a few more trivial changes for C++ compatibility
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.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: add macro that performs explicit static casts when using a C++ compiler
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.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: rename enum to avoid conflict
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.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: add extern "C" {} blocks to all libfrr headers
Renato Westphal [Thu, 7 Feb 2019 22:10:31 +0000 (20:10 -0200)]
lib: add extern "C" {} blocks to all libfrr headers

These are necessary to use functions defined in these headers from C++.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agozebra: use update semantics for routes consistently
Mark Stapp [Mon, 11 Feb 2019 21:11:02 +0000 (16:11 -0500)]
zebra: use update semantics for routes consistently

Use 'update' semantics for route updates, to ensure that
netlink replace behavior works correctly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: prefer DEFINE_MTYPE_STATIC for local memtypes
Lars Seipel [Mon, 11 Feb 2019 01:10:50 +0000 (02:10 +0100)]
zebra: prefer DEFINE_MTYPE_STATIC for local memtypes

Signed-off-by: Lars Seipel <ls@slrz.net>
5 years agoMerge pull request #3774 from ton31337/fix/ospfd_instances_do_not_connect_to_default
Donald Sharp [Mon, 11 Feb 2019 17:52:31 +0000 (12:52 -0500)]
Merge pull request #3774 from ton31337/fix/ospfd_instances_do_not_connect_to_default

vtysh: Fix typo in function name

5 years agolib: remove unnamed struct in qobj for C++
David Lamparter [Mon, 11 Feb 2019 12:07:24 +0000 (13:07 +0100)]
lib: remove unnamed struct in qobj for C++

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: remove extra top-level ;
David Lamparter [Mon, 11 Feb 2019 10:40:19 +0000 (11:40 +0100)]
lib: remove extra top-level ;

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: make atomic ops C++ compatible
David Lamparter [Mon, 11 Feb 2019 10:38:57 +0000 (11:38 +0100)]
lib: make atomic ops C++ compatible

C++ doesn't have ISO C11 stdatomic.h or "_Atomic inttype", so use
std::atomic instead to get the headers compatible.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: make union prefixptr C++-compatible
David Lamparter [Mon, 11 Feb 2019 10:41:26 +0000 (11:41 +0100)]
lib: make union prefixptr C++-compatible

Add a no-op conversion constructor to tell C++ that union prefixptr
accepts any of its member types.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: revert table.h change for C++
David Lamparter [Mon, 11 Feb 2019 12:10:16 +0000 (13:10 +0100)]
lib: revert table.h change for C++

This reverts the lib/table.h change from commit
049b31f7d810fd70069e3edbbd3fea6b5c7af98f.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoisisd: rename northbound delete apis
Mark Stapp [Wed, 30 Jan 2019 10:07:39 +0000 (11:07 +0100)]
isisd: rename northbound delete apis

To align with the change to avoid the keyword 'delete', rename
the isis northbound handlers to '_destroy'.

Signed-off-by: Mark Stapp <mjstapp@gmail.com>
5 years agolibs, rip, isis: change northbound operation enum to DESTROY
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.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agolibs, daemons: changes to permit c++ compilation
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.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agovtysh: Fix typo in function name
Donatas Abraitis [Mon, 11 Feb 2019 15:53:49 +0000 (17:53 +0200)]
vtysh: Fix typo in function name

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: if vrf is unknown, bgp deletion not complete
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>
5 years agoeigrpd: Do not redelete the eigrp interface data structure
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>
5 years agoeigrpd: Correctly handle the ref-count in a couple of spots
Donald Sharp [Mon, 11 Feb 2019 12:19:14 +0000 (07:19 -0500)]
eigrpd: Correctly handle the ref-count in a couple of spots

The ref count for the eigrp topology table was incorrect in a couple
of spots.  Let's clean it up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrp: Make the eigrp_interface have a prefix instead of a *prefix
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>
5 years agoeigrpd: Remove unnecessary test for pointer
Donald Sharp [Sun, 10 Feb 2019 23:19:35 +0000 (18:19 -0500)]
eigrpd: Remove unnecessary test for pointer

If we are inside the for loop then eigrp *must* be valid.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3770 from donaldsharp/detailed_debugs
David Lamparter [Mon, 11 Feb 2019 07:21:12 +0000 (08:21 +0100)]
Merge pull request #3770 from donaldsharp/detailed_debugs

zebra: Update zserv debug messages to give a bit more useful info

5 years agoMerge pull request #3767 from donaldsharp/martians_ate_my_homework
David Lamparter [Mon, 11 Feb 2019 07:20:26 +0000 (08:20 +0100)]
Merge pull request #3767 from donaldsharp/martians_ate_my_homework

bgpd: Remove unused bgp_debug_count function

5 years agoMerge pull request #3715 from qlyoung/fix-systemd-deps
David Lamparter [Mon, 11 Feb 2019 06:50:16 +0000 (07:50 +0100)]
Merge pull request #3715 from qlyoung/fix-systemd-deps

tools: fix systemd dependency graph

5 years agozebra: Update zserv debug messages to give a bit more useful info
Donald Sharp [Sun, 10 Feb 2019 16:22:03 +0000 (11:22 -0500)]
zebra: Update zserv debug messages to give a bit more useful info

When we schedule a packet for future handling, list the packet
type so that we can see what we are getting with debugs.

Also note which client and how many packets we received from that
client.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove unused bgp_debug_count function
Donald Sharp [Sat, 9 Feb 2019 23:22:01 +0000 (18:22 -0500)]
bgpd: Remove unused bgp_debug_count function

This function was not used anywhere, remove it from the system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3760 from patrasar/RP_configure_inconsistent_addr_mask
Donald Sharp [Fri, 8 Feb 2019 12:37:43 +0000 (07:37 -0500)]
Merge pull request #3760 from patrasar/RP_configure_inconsistent_addr_mask

pimd: reject inconsistent address/mask "ip pim rp command"

5 years agoMerge pull request #3761 from patrasar/fix_refresh_oil_timer
Donald Sharp [Fri, 8 Feb 2019 12:31:12 +0000 (07:31 -0500)]
Merge pull request #3761 from patrasar/fix_refresh_oil_timer

pimd: Don't refersh the oif_creation timer if S,G already present

5 years agopimd: reject inconsistent address/mask "ip pim rp command"
Sarita Patra [Fri, 8 Feb 2019 09:35:21 +0000 (01:35 -0800)]
pimd: reject inconsistent address/mask "ip pim rp command"

Issue: Configure "ip pim rp x.x.x.x 225.0.0.0/4".
Show running config shows "ip pim rp x.x.x.x 224.0.0.0/4"
This is mis-leading.

Root-cause: Internally 225.0.0.0/4 is getting converted to
224.0.0.0/4 group mask, since the prefix length is 4.

Fix: Restrict the user to configure inconsistent group address
mask by throughing a cli error "Inconsistent address and mask".

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agopimd: Don't refersh the oif_creation timer if S,G already present
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.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #3752 from mjstapp/fix_wq_static_func
Donald Sharp [Thu, 7 Feb 2019 22:24:06 +0000 (17:24 -0500)]
Merge pull request #3752 from mjstapp/fix_wq_static_func

libs: remove useless static work_queue_free helper

5 years agobgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expected
Lou Berger [Sun, 3 Feb 2019 15:12:33 +0000 (15:12 +0000)]
bgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expected

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev
Lou Berger [Sun, 3 Feb 2019 15:23:06 +0000 (15:23 +0000)]
bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agoMerge pull request #3745 from chiragshah6/evpn_dev1
Russ White [Thu, 7 Feb 2019 19:36:46 +0000 (14:36 -0500)]
Merge pull request #3745 from chiragshah6/evpn_dev1

EVPN advertise svi ip as macip route changes via config command

5 years agolibs: remove useless static work_queue_free helper
Mark Stapp [Thu, 7 Feb 2019 18:54:50 +0000 (13:54 -0500)]
libs: remove useless static work_queue_free helper

Collapse the old static free function into the actual public
function that was using it (and the only user of it.)

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3722 from donaldsharp/static_recursive
David Lamparter [Thu, 7 Feb 2019 18:22:29 +0000 (19:22 +0100)]
Merge pull request #3722 from donaldsharp/static_recursive

Zebra fixes

5 years agoMerge pull request #3744 from mjstapp/wq_deprecated_api
David Lamparter [Thu, 7 Feb 2019 17:52:27 +0000 (18:52 +0100)]
Merge pull request #3744 from mjstapp/wq_deprecated_api

libs: remove deprecated workqueue api

5 years agoMerge pull request #3748 from donaldsharp/sharp_nht_addition
David Lamparter [Thu, 7 Feb 2019 17:48:48 +0000 (18:48 +0100)]
Merge pull request #3748 from donaldsharp/sharp_nht_addition

Sharp cleanups and new cli

5 years agoMerge pull request #3749 from rtrlib/2019-02-07-bugfix-master
David Lamparter [Thu, 7 Feb 2019 17:44:04 +0000 (18:44 +0100)]
Merge pull request #3749 from rtrlib/2019-02-07-bugfix-master

RPKI bug fixes

5 years agobgpd: fix crash when trying to remove non-existing rpki cache
Marcel Röthke [Thu, 7 Feb 2019 16:16:19 +0000 (17:16 +0100)]
bgpd: fix crash when trying to remove non-existing rpki cache

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobgpd: fix "show rpki cache-server" for ssh caches
Marcel Röthke [Thu, 7 Feb 2019 16:12:16 +0000 (17:12 +0100)]
bgpd: fix "show rpki cache-server" for ssh caches

Fix #3662

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agosharpd: Add 'sharp data nexthop' data dump
Donald Sharp [Thu, 7 Feb 2019 14:58:38 +0000 (09:58 -0500)]
sharpd: Add 'sharp data nexthop' data dump

Add some basic data dumping about what we have watched
from the vty/vtysh cli for nexthops.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Add 'sharp data route" dump command
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>
5 years agosharpd: Move route global variables into the global data structure
Donald Sharp [Thu, 7 Feb 2019 13:57:40 +0000 (08:57 -0500)]
sharpd: Move route global variables into the global data structure

Clean up the route global variables into a global data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Add start of global data structures
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>
5 years agosharpd: Allow nhop tracking to specify connected
Donald Sharp [Thu, 7 Feb 2019 03:03:34 +0000 (03:03 +0000)]
sharpd: Allow nhop tracking to specify connected

Allow the sharp daemon to specify whether or not a watched
nexthop should be connected or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: MTYPE_PREFIX_FLOWSPEC should not be exposed by memory.h
Donald Sharp [Thu, 7 Feb 2019 14:35:01 +0000 (09:35 -0500)]
lib: MTYPE_PREFIX_FLOWSPEC should not be exposed by memory.h

This MTYPE should be owned by prefix.c as a STATIC for the file.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: advertise svi ip as macip route changes
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>
5 years agobgpd: advertise svi ip as macip config cmd
Chirag Shah [Mon, 4 Feb 2019 02:08:46 +0000 (18:08 -0800)]
bgpd: advertise svi ip as macip config cmd

Ticket:CM-23782

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: advertise svi ip as macip zebra parse api
Chirag Shah [Mon, 4 Feb 2019 01:29:59 +0000 (17:29 -0800)]
bgpd: advertise svi ip as macip zebra parse api

Ticket:CM-23782

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agolib: advertise svi ip as macip opcode
Chirag Shah [Mon, 4 Feb 2019 01:24:59 +0000 (17:24 -0800)]
lib: advertise svi ip as macip opcode

This change is used to send configue changes for
advertise svi address as macip (type-2) route.

Ticket:CM-23782

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agotools: fix systemd dependency graph
Quentin Young [Wed, 6 Feb 2019 19:40:55 +0000 (19:40 +0000)]
tools: fix systemd dependency graph

Currently our systemd dependencies look something like this (example
from vanilla Debian 9):

$ systemctl list-dependencies frr
frr.service
● ├─system.slice
● └─sysinit.target
  ...

$ systemctl list-dependencies --reverse frr
frr.service
● └─network-online.target
●   └─apt-daily.service

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:

$ systemctl list-dependencies frr
frr.service
● ├─system.slice
● │ └─networking.service
● ├─network.target
● └─sysinit.target
  ...

$ systemctl list-dependencies --reverse frr
frr.service
● └─multi-user.target
●   └─graphical.target

This way, FRR will be started by multi-user.target (just like most
applications), but delayed until after networking has been configured.

In the same stroke, this should also fix issues on systems that do not
provide "networking.service" (such as CentOS 7).

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolibs: remove deprecated workqueue api
Mark Stapp [Wed, 6 Feb 2019 17:11:19 +0000 (12:11 -0500)]
libs: remove deprecated workqueue api

Remove deprecated api from workqueue module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3684 from mjstapp/dplane_pw
Donald Sharp [Tue, 5 Feb 2019 23:41:12 +0000 (18:41 -0500)]
Merge pull request #3684 from mjstapp/dplane_pw

zebra: async dataplane for pseudowires

5 years agoMerge pull request #3737 from qlyoung/doc-move-topotest-to-devdocs
Rafael Zalamena [Tue, 5 Feb 2019 22:32:14 +0000 (20:32 -0200)]
Merge pull request #3737 from qlyoung/doc-move-topotest-to-devdocs

doc: move topotests docs to developers guide

5 years agozebra: Do not display recursive nexthops as installed
Donald Sharp [Sat, 2 Feb 2019 00:56:07 +0000 (19:56 -0500)]
zebra: Do not display recursive nexthops as installed

Recursive nexthops should not be marked as installed

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Fix multiple levels of static recursion
Donald Sharp [Sat, 2 Feb 2019 00:08:16 +0000 (19:08 -0500)]
zebra: Fix multiple levels of static recursion

Allow the nexthop-check code to figure out recursive static routes
in a logical manner.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: add hooks for external logging function
Emanuele Di Pascale [Fri, 25 Jan 2019 13:40:27 +0000 (14:40 +0100)]
lib: add hooks for external logging function

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agodoc: move topotests docs to developers guide
Quentin Young [Tue, 5 Feb 2019 19:22:38 +0000 (19:22 +0000)]
doc: move topotests docs to developers guide

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3693 from chiragshah6/ospf_vrf_dev
Russ White [Tue, 5 Feb 2019 16:25:30 +0000 (11:25 -0500)]
Merge pull request #3693 from chiragshah6/ospf_vrf_dev

ospfd: address CVE-2017-3224

5 years agoMerge pull request #3518 from rgirada/routemap_3090
Donald Sharp [Tue, 5 Feb 2019 16:13:22 +0000 (11:13 -0500)]
Merge pull request #3518 from rgirada/routemap_3090

libd: Implemented a cli "show route-map-unused" to track all unused rou…

5 years agoMerge pull request #3733 from donaldsharp/meta_queue_nht_game_over_man_game_over
Russ White [Tue, 5 Feb 2019 16:06:42 +0000 (11:06 -0500)]
Merge pull request #3733 from donaldsharp/meta_queue_nht_game_over_man_game_over

zebra: NHT was being run at least 2 times and missreporting data

5 years agoMerge pull request #3727 from qlyoung/fix-signed-printspec-bgp-as
Russ White [Tue, 5 Feb 2019 16:05:53 +0000 (11:05 -0500)]
Merge pull request #3727 from qlyoung/fix-signed-printspec-bgp-as

bgpd: use correct specifier to print asn

5 years agoMerge pull request #3725 from donaldsharp/eigrp_metric
Russ White [Tue, 5 Feb 2019 15:55:02 +0000 (10:55 -0500)]
Merge pull request #3725 from donaldsharp/eigrp_metric

Eigrp metric

5 years agoMerge pull request #3730 from donaldsharp/send_information
Russ White [Tue, 5 Feb 2019 15:53:50 +0000 (10:53 -0500)]
Merge pull request #3730 from donaldsharp/send_information

Send information

5 years agoMerge pull request #3688 from chiragshah6/evpn_dev
Russ White [Tue, 5 Feb 2019 15:48:33 +0000 (10:48 -0500)]
Merge pull request #3688 from chiragshah6/evpn_dev

zebra: EVPN probe local inactive neigh/arp entry upon mac mobility

5 years agoMerge pull request #3679 from chiragshah6/evpn_dev2
Russ White [Tue, 5 Feb 2019 15:47:35 +0000 (10:47 -0500)]
Merge pull request #3679 from chiragshah6/evpn_dev2

zebra: reinstate bgp evpn remote route on local evpn route delete

5 years agoMerge pull request #3732 from qlyoung/fix-missing-backtic-doc
Renato Westphal [Tue, 5 Feb 2019 15:10:59 +0000 (13:10 -0200)]
Merge pull request #3732 from qlyoung/fix-missing-backtic-doc

doc: fix missing backtick

5 years agozebra: NHT was being run at least 2 times and missreporting data
Donald Sharp [Mon, 4 Feb 2019 20:16:31 +0000 (15:16 -0500)]
zebra: NHT was being run at least 2 times and missreporting data

With the data plane changes that were made, we are now running
nexthop tracking 2 times.  Once at the end of meta-queue insertion
and once at the end of receiving a bunch of data from the dataplane.

The Addition of the data plane code caused flags to not be set
fully for the resolved routes( since we do not know the answer yet ),
This in turn caused the nexthop tracking run after the meta-queue
to think that the route was not `good`.  This would cause it to
tell all interested parties that there was no nexthop.

After the dataplane insertion we are also no running nht code.
This was re-figuring out the nexthop correctly and also
correctly reporting to interested parties that there was a path again.

Example:
donna.cumulusnetworks.com(config)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, f - failed route

K>* 0.0.0.0/0 [0/103] via 10.50.11.1, enp0s3, 00:06:47
S>* 4.5.6.7/32 [1/0] via 192.168.209.1, enp0s8, 00:04:47
C>* 10.50.11.0/24 is directly connected, enp0s3, 00:06:47
C>* 192.168.209.0/24 is directly connected, enp0s8, 00:06:47
C>* 192.168.210.0/24 is directly connected, enp0s9, 00:06:47
donna.cumulusnetworks.com(config)# ip route 4.5.6.7/32 192.168.210.1
donna.cumulusnetworks.com(config)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, f - failed route

K>* 0.0.0.0/0 [0/103] via 10.50.11.1, enp0s3, 00:07:06
S>* 4.5.6.7/32 [1/0] via 192.168.209.1, enp0s8, 00:00:04
  *                  via 192.168.210.1, enp0s9, 00:00:04
C>* 10.50.11.0/24 is directly connected, enp0s3, 00:07:06
C>* 192.168.209.0/24 is directly connected, enp0s8, 00:07:06
C>* 192.168.210.0/24 is directly connected, enp0s9, 00:07:06
donna.cumulusnetworks.com(config)#

Log files for sharp, which is watching 4.5.6.7:
2019/02/04 15:20:54.844288 SHARP: Received update for 4.5.6.7/32
2019/02/04 15:20:54.844820 SHARP: Received update for 4.5.6.7/32
2019/02/04 15:20:54.844836 SHARP:  Nexthop 192.168.209.1, type: 2, ifindex: 3, vrf: 0, label_num: 0
2019/02/04 15:20:54.844853 SHARP:  Nexthop 192.168.210.1, type: 2, ifindex: 4, vrf: 0, label_num: 0

As you can see we have received an update with no nexthops( invalid route )
and a second update immediately after it with 2 nexthops.

What's the big deal you say?  Well we have code in other daemons that reacts
to not having a path for a nexthop.  In BGP this will cause us to tear
down the peer.  In staticd we'll remove the recursively resolved route.
In pim we'll remove all paths to the mroute.  This is not desirable.

The fix is to remove the meta-queue run of nexthop tracking.

While running after data plane notice of routes to handle is not ideal
we will be fixing this in the future with the nexthop group code, which
should know what nexthops are affected by a nexthop group change.

Fixed code debug code:
donna.cumulusnetworks.com(config)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, f - failed route

K>* 0.0.0.0/0 [0/103] via 10.50.11.1, enp0s3, 00:00:46
S>* 4.5.6.7/32 [1/0] via 192.168.209.1, enp0s8, 00:00:02
C>* 10.50.11.0/24 is directly connected, enp0s3, 00:00:46
C>* 192.168.209.0/24 is directly connected, enp0s8, 00:00:46
C>* 192.168.210.0/24 is directly connected, enp0s9, 00:00:46
donna.cumulusnetworks.com(config)# ip route 4.5.6.7/32 192.168.210.1
donna.cumulusnetworks.com(config)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, f - failed route

K>* 0.0.0.0/0 [0/103] via 10.50.11.1, enp0s3, 00:00:59
S>* 4.5.6.7/32 [1/0] via 192.168.209.1, enp0s8, 00:00:02
  *                  via 192.168.210.1, enp0s9, 00:00:02
C>* 10.50.11.0/24 is directly connected, enp0s3, 00:00:59
C>* 192.168.209.0/24 is directly connected, enp0s8, 00:00:59
C>* 192.168.210.0/24 is directly connected, enp0s9, 00:00:59

2019/02/04 15:26:20.656395 SHARP: Received update for 4.5.6.7/32
2019/02/04 15:26:20.656440 SHARP:  Nexthop 192.168.209.1, type: 2, ifindex: 3, vrf: 0, label_num: 0
2019/02/04 15:26:33.688251 SHARP: Received update for 4.5.6.7/32
2019/02/04 15:26:33.688322 SHARP:  Nexthop 192.168.209.1, type: 2, ifindex: 3, vrf: 0, label_num: 0
2019/02/04 15:26:33.688329 SHARP:  Nexthop 192.168.210.1, type: 2, ifindex: 4, vrf: 0, label_num: 0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Pim is not respecting the move of an interface from old->new vrf
Donald Sharp [Sat, 2 Feb 2019 20:52:14 +0000 (15:52 -0500)]
pimd: Pim is not respecting the move of an interface from old->new vrf

PIM needed to be updated to move to the new vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Send interface request after initial hello
Donald Sharp [Mon, 4 Feb 2019 17:22:55 +0000 (12:22 -0500)]
lib: Send interface request after initial hello

Ask for all interface information after we have connected
to zebra and sent the initial hello.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Remove zclient->idinfo restrictions
Donald Sharp [Mon, 4 Feb 2019 16:45:31 +0000 (11:45 -0500)]
zebra: Remove zclient->idinfo restrictions

The restricting of data about interfaces was both inconsistent
in application and allowed protocol developers to get into states where
they did not have the expected data about an interface that they
thought that they would.  These restrictions and inconsistencies
keep causing bugs that have to be sorted through.

The latest iteration of this bug was that commit:
f20b478ef3d25e153939516a473bb2e80603cbd5

Has caused pim to not receive interface up notifications( but
it knows the interface is back in the vrf and it knows the
relevant ip addresses on the interface as they were changed
as part of an ifdown/ifup cycle ).

Remove this restriction and allow the interface events to
be propagated to all clients.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3698 from donaldsharp/netlink_is_serious_business
Renato Westphal [Tue, 5 Feb 2019 13:52:33 +0000 (11:52 -0200)]
Merge pull request #3698 from donaldsharp/netlink_is_serious_business

Netlink is serious business

5 years agoMerge pull request #3602 from donaldsharp/mlag_debug
David Lamparter [Mon, 4 Feb 2019 23:54:16 +0000 (00:54 +0100)]
Merge pull request #3602 from donaldsharp/mlag_debug

zebra cleanup and some mlag additions