]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoospfd: fix clang-SA warning
David Lamparter [Fri, 29 Mar 2019 11:25:45 +0000 (12:25 +0100)]
ospfd: fix clang-SA warning

Need to clear refresh_list before dropping the reference.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #4147 from mjstapp/fix_pim_zebra_warning
Donald Sharp [Tue, 16 Apr 2019 23:31:34 +0000 (19:31 -0400)]
Merge pull request #4147 from mjstapp/fix_pim_zebra_warning

pimd: fix compile warnings

5 years agoMerge pull request #4084 from qlyoung/bgp-prefix-md5-auth
Russ White [Tue, 16 Apr 2019 23:25:43 +0000 (19:25 -0400)]
Merge pull request #4084 from qlyoung/bgp-prefix-md5-auth

Support TCP MD5 auth on prefixes & enable MD5 auth for BGP listen ranges

5 years agopimd: fix compile warnings
Mark Stapp [Tue, 16 Apr 2019 18:28:10 +0000 (14:28 -0400)]
pimd: fix compile warnings

Remove set-but-unused variables that provoke compile warnings

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4132 from opensourcerouting/northbound-debug
Mark Stapp [Tue, 16 Apr 2019 16:01:09 +0000 (12:01 -0400)]
Merge pull request #4132 from opensourcerouting/northbound-debug

lib: add fine-grained debugging in the northbound

5 years agoMerge pull request #4143 from opensourcerouting/update-libyang-build-intr
Quentin Young [Tue, 16 Apr 2019 15:58:51 +0000 (11:58 -0400)]
Merge pull request #4143 from opensourcerouting/update-libyang-build-intr

doc: update libyang build instructions to enable compiler optimizations

5 years agoMerge pull request #4031 from nitinsoniism/show_evpn_route_vni_all_detail
Russ White [Tue, 16 Apr 2019 15:42:25 +0000 (11:42 -0400)]
Merge pull request #4031 from nitinsoniism/show_evpn_route_vni_all_detail

bgpd: new show cmd  - bgp l2vpn evpn route vni all detail

5 years agodoc: document bgp listen ranges and md5 behavior
Quentin Young [Tue, 16 Apr 2019 15:19:10 +0000 (15:19 +0000)]
doc: document bgp listen ranges and md5 behavior

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: add support for MD5 auth on listen ranges
Quentin Young [Fri, 29 Mar 2019 23:24:08 +0000 (19:24 -0400)]
bgpd: add support for MD5 auth on listen ranges

Co-authored-by: Donald Sharp <sharpd@cumulusnetworks.com>
Co-authored-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add support for extended TCP MD5 auth
Quentin Young [Mon, 1 Apr 2019 18:16:54 +0000 (18:16 +0000)]
lib: add support for extended TCP MD5 auth

MD5 auth on TCP is supported for prefixes in recent versions of Linux;
add complementary support for FRR.

This is a reworked version of Donald's commit to keep library
compatibility and obviate the need for changes in daemons that don't
need to support this themselves.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3720 from donaldsharp/bgp_vrf_peering
Renato Westphal [Tue, 16 Apr 2019 15:25:26 +0000 (12:25 -0300)]
Merge pull request #3720 from donaldsharp/bgp_vrf_peering

lib: Allow bgp to always create a listen socket for the vrf

5 years agoMerge pull request #3762 from pguibert6WIND/do_not_alloc_lists_fs_by_def
Lou Berger [Tue, 16 Apr 2019 15:24:48 +0000 (11:24 -0400)]
Merge pull request #3762 from pguibert6WIND/do_not_alloc_lists_fs_by_def

bgpd: do not allocate lists on fs entries of bgp entries.

5 years agoMerge pull request #4096 from donaldsharp/pim_nht_cleanup
Russ White [Tue, 16 Apr 2019 14:27:35 +0000 (10:27 -0400)]
Merge pull request #4096 from donaldsharp/pim_nht_cleanup

Pim nht cleanup

5 years agoMerge pull request #4094 from mjstapp/dplane_system_routes
Russ White [Tue, 16 Apr 2019 14:22:26 +0000 (10:22 -0400)]
Merge pull request #4094 from mjstapp/dplane_system_routes

zebra: dataplane notifications for system route changes

5 years agoMerge pull request #4029 from ak503/isis_yang
Russ White [Tue, 16 Apr 2019 14:09:57 +0000 (10:09 -0400)]
Merge pull request #4029 from ak503/isis_yang

isis: priority of isis commands in interface configuration

5 years agodoc: update libyang build instructions to enable compiler optimizations
Renato Westphal [Tue, 16 Apr 2019 12:52:20 +0000 (09:52 -0300)]
doc: update libyang build instructions to enable compiler optimizations

libyang defaults CMAKE_BUILD_TYPE to "Debug", which disables compiler
optimizations. We should instruct our users to build libyang in the
"Release" mode so that compiler optimizations are enabled and they
can benefit from the associated performance improvements.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agofabricd: allow redistribute statements with both the route-map and metric options
Dmitrii Turlupov [Mon, 1 Apr 2019 13:55:38 +0000 (16:55 +0300)]
fabricd: allow redistribute statements with both the route-map and metric options

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
5 years agoisisd: allow redistribute statements with both the route-map and metric options
Dmitrii Turlupov [Fri, 29 Mar 2019 11:17:41 +0000 (14:17 +0300)]
isisd: allow redistribute statements with both the route-map and metric options

Fixes #4012.

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
5 years agoyang: priority of isis commands in interface configuration
Dmitrii Turlupov [Wed, 27 Mar 2019 12:27:36 +0000 (15:27 +0300)]
yang: priority of isis commands in interface configuration

Move down the "circuit-type" leaf in the isisd YANG module so that
"ip[v6] router isis" will be the first commands displayed in the
running configuration.

Fixes #4028.

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
5 years agoMerge pull request #4139 from qlyoung/doc-add-libyang-denablecache-fix
Renato Westphal [Mon, 15 Apr 2019 19:33:26 +0000 (16:33 -0300)]
Merge pull request #4139 from qlyoung/doc-add-libyang-denablecache-fix

doc: document libyang cache bug workaround

5 years agodoc: document libyang cache bug workaround
Quentin Young [Mon, 15 Apr 2019 19:29:10 +0000 (19:29 +0000)]
doc: document libyang cache bug workaround

Document workaround for
https://github.com/CESNET/libyang/issues/752

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add fine-grained debugging in the northbound
Renato Westphal [Fri, 12 Apr 2019 21:00:26 +0000 (18:00 -0300)]
lib: add fine-grained debugging in the northbound

Split the "debug northbound" command into the following commands:
* debug northbound callbacks configuration
* debug northbound callbacks state
* debug northbound callbacks rpc
* debug northbound notifications
* debug northbound events
* debug northbound client confd
* debug northbound client sysrepo

If "debug northbound" is entered alone, all of its suboptions
are enabled.

This commit also adds code to debug state/rpc callbacks and
notifications (only configuration callbacks were logged before).

Use the debugging infrastructure from "lib/debug.h" in order to
benefit from its facilities (e.g. MT-safe debugging) and avoid
code duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: fix inverted logic in the "debug all" command
Renato Westphal [Fri, 12 Apr 2019 21:00:05 +0000 (18:00 -0300)]
lib: fix inverted logic in the "debug all" command

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #4130 from donaldsharp/show_frr
Philippe Guibert [Sun, 14 Apr 2019 20:20:12 +0000 (22:20 +0200)]
Merge pull request #4130 from donaldsharp/show_frr

zebra: Add hidden 'show frr' command

5 years agozebra: Add hidden 'show frr' command
Donald Sharp [Fri, 12 Apr 2019 14:25:11 +0000 (10:25 -0400)]
zebra: Add hidden 'show frr' command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4081 from donaldsharp/rnh_reorder
Russ White [Thu, 11 Apr 2019 22:02:20 +0000 (18:02 -0400)]
Merge pull request #4081 from donaldsharp/rnh_reorder

zebra: Make rnh only send response once on first registration

5 years agoMerge pull request #4103 from qlyoung/fix-ospf-+metric
Russ White [Thu, 11 Apr 2019 21:45:41 +0000 (17:45 -0400)]
Merge pull request #4103 from qlyoung/fix-ospf-+metric

ospfd: fix behavior of +/-metric

5 years agoMerge pull request #4105 from donaldsharp/pim_cleanups
Russ White [Thu, 11 Apr 2019 21:44:50 +0000 (17:44 -0400)]
Merge pull request #4105 from donaldsharp/pim_cleanups

Pim cleanups

5 years agoMerge pull request #4111 from sworleys/Netlink-Rule-SA-Fix
Russ White [Thu, 11 Apr 2019 21:39:48 +0000 (17:39 -0400)]
Merge pull request #4111 from sworleys/Netlink-Rule-SA-Fix

zebra: Fix late memset of pbr rule in rule_netlink

5 years agoMerge pull request #4125 from mjstapp/fix_debug_pim_static
Quentin Young [Thu, 11 Apr 2019 20:14:30 +0000 (16:14 -0400)]
Merge pull request #4125 from mjstapp/fix_debug_pim_static

pimd: use debug pim static

5 years agopimd: use debug pim static
Mark Stapp [Thu, 11 Apr 2019 15:46:40 +0000 (11:46 -0400)]
pimd: use debug pim static

Replace cli 'debug static' with 'debug pim static', to make
the 'debug static' node available for staticd (eventually).

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4119 from pacovn/201904_master__pw_fixes
Donald Sharp [Thu, 11 Apr 2019 12:20:02 +0000 (08:20 -0400)]
Merge pull request #4119 from pacovn/201904_master__pw_fixes

zebra: pseudowire event recovery (DoS fix)

5 years agozebra: dataplane notifications for system route changes
Mark Stapp [Thu, 21 Mar 2019 18:26:54 +0000 (14:26 -0400)]
zebra: dataplane notifications for system route changes

Add notifications from zebra to the dataplane subsystem when
kernel or connected routes change.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: pseudowire event recovery (DoS fix)
F. Aragon [Wed, 10 Apr 2019 17:08:50 +0000 (19:08 +0200)]
zebra: pseudowire event recovery (DoS fix)

When having a route recovery, because of the route installation
cycling and the next hop label check, it could happen that the PW
never gets recovered. The original code shows the intention of retrying,
but the code was missing. The fix includes the call to the timer programming
the recovery attempt.

Example for reproducing the issue:

      |P1|  <->  |P2|  <->  |P3|

- Being P1, P2, P3 nodes, using IS-IS as IGP, and having a pseudowire
betwen P1 and P3 (P1, P2, P3 having configured LDP daemons).
- After 60 seconds, kill the IS-IS daemon in P2.
- Wait 30 seconds
- Launch again the IS-IS daemon in P2
- The bug/issue is that after P1 <-> P3 recovering connectivity sometimes
  the PW is not recovered because the reason explained in the first paragraph.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #4115 from Wojtek242/wojtek242/doc-overview-fix
Donald Sharp [Wed, 10 Apr 2019 02:29:06 +0000 (22:29 -0400)]
Merge pull request #4115 from Wojtek242/wojtek242/doc-overview-fix

doc: replace old text with info about integrated configuration mode

5 years agoMerge pull request #4114 from chiragshah6/evpn_dev2
Mark Stapp [Tue, 9 Apr 2019 20:46:59 +0000 (16:46 -0400)]
Merge pull request #4114 from chiragshah6/evpn_dev2

zebra: avoid removing node twice from rb_tree

5 years agodoc: replace old text with info about integrated configuration mode
Wojciech Kozlowski [Tue, 9 Apr 2019 20:38:35 +0000 (22:38 +0200)]
doc: replace old text with info about integrated configuration mode

Signed-off-by: W. Kozlowski <wk@wojciechkozlowski.eu>
5 years agozebra: avoid removing node twice from rb_tree
Chirag Shah [Tue, 9 Apr 2019 19:30:15 +0000 (12:30 -0700)]
zebra: avoid removing node twice from rb_tree

In zebra terminate path, the node was attempted to remove
twice from the RB_TREE table. This lead to a crash during
zebra shutdown zebra_router_free_table already calls RB_REMOVE
to remove a node from rb tree table.

    siginfo=0x7fffd9134a30, context=<optimized out>) at lib/sigevent.c:249
     rbt=<optimized out>, t=<optimized out>) at lib/openbsd-tree.c:226
     t=0x56296965ff50 <zebra_router_table_head_RB_INFO>) at lib/openbsd-tree.c:383
    rbt=rbt@entry=0x562969669bd0 <zrouter+16>, elm=elm@entry=0x56296afcf810)
    at lib/openbsd-tree.c:393
    (elm=0x56296afcf810, head=0x562969669bd0 <zrouter+16>) at zebra/zebra_router.h:46

Singned-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agopimd: Add JoinDesired(S,G) to deciding to set spt bit
Donald Sharp [Tue, 9 Apr 2019 17:20:32 +0000 (13:20 -0400)]
pimd: Add JoinDesired(S,G) to deciding to set spt bit

The decision for Update_SPTbit(S,G, iif) includes a test
for JoinDesired(S,G) in section 4.2.2.  When we were deciding
to update the spt bit we were not taking this into account.

This commit fixes this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Update state when receiving S,G join when in S,G RPT Prune state
Donald Sharp [Mon, 8 Apr 2019 18:37:00 +0000 (14:37 -0400)]
pimd: Update state when receiving S,G join when in S,G RPT Prune state

When we receive a S,G join and the ifchannel is in S,G RPT Prune state,
pim should transition the ifchannel state to JOIN and transition the
pim_upstream state for the S,G stream.

Ticket: CM-24513
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Only send triggered response after all of *,G message is read
Donald Sharp [Mon, 8 Apr 2019 22:02:45 +0000 (18:02 -0400)]
pimd: Only send triggered response after all of *,G message is read

pim was sending a triggered response on every S,G RPT prune information
read.  Suppose we had this in a *,G message:

*,G
  S1, G RPT Prune
  S2, G RPT Prune

We would send two triggered *,G messages upstream.  This leads to over
processing and quickly changing state if S1 or S2 were in different
states.

Modify the code to send just one Triggered *,G upstream after looking
at all S,G state for a *,G.

Ticket: CM-24531
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: new show cmd - bgp l2vpn evpn route vni all detail
Nitin Soni [Thu, 28 Mar 2019 05:49:03 +0000 (22:49 -0700)]
bgpd: new show cmd  - bgp l2vpn evpn route vni all detail

This command is added to provide detailed information. It will be
useful in troubleshooting as we will be able to dump all detailed info
using a single command.
"net show bgp evpn route vni <all|id> [detail]". Additional filtering
can be done by providing vtep ip.

Command will display the detailed content for all vni and macs as
displayed by "net show bgp evpn route vni <> mac <> ip <>" for a single
vni, mac, ip.

Ticket: CM-24397
Signed-off-by: Nitin Soni <nsoni@cumulusnetworks.com>
Reviewed-by:
Testing-Done:

5 years agoMerge pull request #3779 from opensourcerouting/fix-mpls-label-topotests
Quentin Young [Tue, 9 Apr 2019 15:25:40 +0000 (11:25 -0400)]
Merge pull request #3779 from opensourcerouting/fix-mpls-label-topotests

tests: Remove some inconsistent local labels in check in test_ldp_vpls_topo1

5 years agoMerge pull request #4102 from opensourcerouting/sendbuf_recvbuf_privs
Quentin Young [Tue, 9 Apr 2019 14:59:00 +0000 (10:59 -0400)]
Merge pull request #4102 from opensourcerouting/sendbuf_recvbuf_privs

*: setting the socket send/recv buffer sizes doesn't need elevated privs

5 years agozebra: Fix late memset of pbr rule in rule_netlink
Stephen Worley [Tue, 9 Apr 2019 14:35:11 +0000 (10:35 -0400)]
zebra: Fix late memset of pbr rule in rule_netlink

We were memsetting zebra_pbr_rule struct after
we had already put some information in it. Also updated
the init of the struct to use braces instead of a
memset.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #4095 from pacovn/201904_master__lm_aliasing_fixes
Donald Sharp [Tue, 9 Apr 2019 12:38:02 +0000 (08:38 -0400)]
Merge pull request #4095 from pacovn/201904_master__lm_aliasing_fixes

zebra: label manager race condition fix

5 years agoMerge pull request #4099 from donaldsharp/clang_sa
Mark Stapp [Mon, 8 Apr 2019 17:43:16 +0000 (19:43 +0200)]
Merge pull request #4099 from donaldsharp/clang_sa

Clang sa fixes

5 years agoospfd: fix behavior of +/-metric
Quentin Young [Mon, 8 Apr 2019 17:05:45 +0000 (17:05 +0000)]
ospfd: fix behavior of +/-metric

OSPFD uses -1 as a sentinel value for uninitialized metrics. When
applying a route map with a +/-metric to redistributed routes, we were
using -1 as our base value to increment or decrement on, which meant
that if you set e.g. +10, you would end up with a redistributed route of
metric 9.

This patch also removes an off-by-one sanity check that would cause a
set metric +1 or set metric 0 to result in a metric value of 20 :-)

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: setting the socket send/recv buffer sizes doesn't need elevated privs
Renato Westphal [Mon, 8 Apr 2019 16:08:00 +0000 (13:08 -0300)]
*: setting the socket send/recv buffer sizes doesn't need elevated privs

The less code running under elevated privileges the better.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #4101 from pacovn/doc_typo1
Quentin Young [Mon, 8 Apr 2019 15:11:27 +0000 (11:11 -0400)]
Merge pull request #4101 from pacovn/doc_typo1

doc: fix typo

5 years agodoc: fix typo
F. Aragon [Mon, 8 Apr 2019 14:46:33 +0000 (16:46 +0200)]
doc: fix typo

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: Remove extra alloc function bgp_path_info_new
Donald Sharp [Sun, 7 Apr 2019 00:08:34 +0000 (20:08 -0400)]
bgpd: Remove extra alloc function bgp_path_info_new

The bgp_path_info_new function whenever it was called
pretty much duplicated the info_make function call.  So
convert over to using it and remove the bgp_path_info_new
function so people are not tempted.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: rn may be null
Donald Sharp [Sat, 6 Apr 2019 23:56:06 +0000 (19:56 -0400)]
ospfd: rn may be null

rn is not set the first time through the do {} while (); loop
As such we need to protect against it from being null( although
highly unlikely to ever happen given the ospf code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: pi->peer assignment exists no need for null check
Donald Sharp [Sat, 6 Apr 2019 23:53:55 +0000 (19:53 -0400)]
bgpd: pi->peer assignment exists no need for null check

The creation of a new `struct bgp_path_info` requires a legitimate
peer being passed in for creation.  There exists no code paths
where this is not true.  As such checking pi->peer for null convinces
SA that it might happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Fixup IFF_OUT_LOG macro to make SA happy
Donald Sharp [Sat, 6 Apr 2019 22:38:54 +0000 (18:38 -0400)]
lib: Fixup IFF_OUT_LOG macro to make SA happy

The IFF_OUT_LOG macro is using BUFSIZE, which is the sizeof(logbuf)
but for some reason 8.0 clang SA is not happy with it.  Just
make it happy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4066 from sworleys/Add-NG-Hash-Func
Mark Stapp [Fri, 5 Apr 2019 19:31:41 +0000 (21:31 +0200)]
Merge pull request #4066 from sworleys/Add-NG-Hash-Func

lib: Add hash function for nexthop groups

5 years agolib: Add hash function for nexthop groups
Stephen Worley [Tue, 2 Apr 2019 17:57:48 +0000 (13:57 -0400)]
lib: Add hash function for nexthop groups

Add a hash function to turn a nexthop group into a
32 bit unsigned hash key with jhash. We do not care to
hash any recursively resolved nexthops, just the group.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #4085 from donaldsharp/zebra_nht_individual_items
Renato Westphal [Fri, 5 Apr 2019 17:38:12 +0000 (14:38 -0300)]
Merge pull request #4085 from donaldsharp/zebra_nht_individual_items

zebra: Allow specification of v[4|6] addrs on some commands

5 years agozebra: Allow specification of v[4|6] addrs on some commands
Donald Sharp [Thu, 4 Apr 2019 18:28:31 +0000 (14:28 -0400)]
zebra: Allow specification of v[4|6] addrs on some commands

The `show ipv[4|6] <nht|import-check> ...` commands are starting
to produce a bunch of output due to multiple daemons now
using the code.  Allow the specification of a v4 or v6 address
to allow the show command to only display the interesting nht.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Initiate *,G S,G RPT Prune in some cases
Donald Sharp [Fri, 5 Apr 2019 12:40:51 +0000 (08:40 -0400)]
pimd: Initiate *,G S,G RPT Prune in some cases

On the LHR after we decide that traffic is flowing and
we set the SPT bit for the S,G *and* the incoming IIF
of the S,G is different than the incoming IIF of the *,G
we should immediately send the *,G S,G RPT Prune as
a triggered response instead of waiting for the next
cycle.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add a flag PIM_NEXTHOP_ANSWER_RECEIVED
Donald Sharp [Wed, 3 Apr 2019 15:21:37 +0000 (11:21 -0400)]
pimd: Add a flag PIM_NEXTHOP_ANSWER_RECEIVED

Track whether or not we have received an answer from
our query to do nexthop tracking.  This allows us to
go straight to doing a synchronous query for our
RPF.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Tracking of RPF is *separate* from the lookup
Donald Sharp [Tue, 2 Apr 2019 13:40:41 +0000 (09:40 -0400)]
pimd: Tracking of RPF is *separate* from the lookup

Start the separation of tracking a Destination from the act
of looking it up.  The cojoining of these two concepts led
to a bunch of code that had to think about both problems leading
to weird situations and code paths.  Simplify the code by making
pim_ecmp_nexthop_search a static function and we only ever
call pim_ecmp_nexthop_lookup when we need to do a RPF().

pim_ecmp_nexthop_lookup will now attempt to find a stored pnc
and if it finds one it will report on the answer from it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Determining if we are the RP should happen always
Donald Sharp [Wed, 3 Apr 2019 01:15:21 +0000 (21:15 -0400)]
pimd: Determining if we are the RP should happen always

When creating new RP information from a `ip pim rp A.B.C.D/M A.B.C.D`
we should determine if we are the RP even if we can or cannot
determine if we have a path to the RP via RPF.

This is because we should determine if we are the RP based upon a
connected ip address match not whether or not we have a path to
the RPF.  We would normally think this is not important but
RPF is inherently asynchronous and we can have a state where
we have registered for nht but have not received the actual
path back yet from zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Zero out nhop being used
Donald Sharp [Tue, 2 Apr 2019 18:15:49 +0000 (14:15 -0400)]
pimd: Zero out nhop being used

Zero out the lookup nexthop for usage, prevent a crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4093 from mjstapp/fix_vrf_sched_flag
Donald Sharp [Fri, 5 Apr 2019 14:56:08 +0000 (10:56 -0400)]
Merge pull request #4093 from mjstapp/fix_vrf_sched_flag

zebra: remove unused VRF_RIB_SCHEDULED flag

5 years agozebra: label manager race condition fix
F. Aragon [Fri, 5 Apr 2019 13:26:14 +0000 (15:26 +0200)]
zebra: label manager race condition fix

This fix covers the case where two or more events are processed but only one
becoming effective. E.g. when mixing a synchronous label request from a LDP
deamon and an asynchronous request from a BGP daemon it could happen to the
BGP having the label chunk, but the LDP stuck waiting for the response.

Given e.g.

  ldpd     <-------->
  (sync label request)
                       Zebra (label proxy)  <-->  Zebra (shared label manager)
  bgpd     <-------->
  (async label request)

Sequence:

   LDP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
   BGP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
                                                      <---- Zebra (LM) RP LDP
                                                      <---- Zebra (LM) RP BGP

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: remove unused VRF_RIB_SCHEDULED flag
Mark Stapp [Fri, 5 Apr 2019 12:46:28 +0000 (08:46 -0400)]
zebra: remove unused VRF_RIB_SCHEDULED flag

We don't use th vrf-level VRF_RIB_SCHEDULED flag any longer;
remove it and collapse the zebra_vrf flags' values.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4083 from donaldsharp/static_reinstall_nexthops
Jafar Al-Gharaibeh [Fri, 5 Apr 2019 06:09:03 +0000 (01:09 -0500)]
Merge pull request #4083 from donaldsharp/static_reinstall_nexthops

staticd: Allow reinstall of static nexthops on vrf restart

5 years agoMerge pull request #3548 from opensourcerouting/rip-vrf
Donald Sharp [Thu, 4 Apr 2019 23:24:14 +0000 (19:24 -0400)]
Merge pull request #3548 from opensourcerouting/rip-vrf

rip(ng)d: add VRF support

5 years agotests: test_ldp_vpls_topo1 Remove some inconsistent labels in check
Martin Winter [Tue, 12 Feb 2019 02:31:50 +0000 (18:31 -0800)]
tests: test_ldp_vpls_topo1 Remove some inconsistent labels in check

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #3899 from ton31337/fix/remove_private_as_with_local_as
Lou Berger [Thu, 4 Apr 2019 20:08:42 +0000 (16:08 -0400)]
Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_as

bgpd: Remove private AS numbers if local-as is defined

5 years agoMerge pull request #4065 from mjstapp/fix_nexthop_compare
Quentin Young [Thu, 4 Apr 2019 18:08:22 +0000 (14:08 -0400)]
Merge pull request #4065 from mjstapp/fix_nexthop_compare

libs: nexthop comparison includes labels if present

5 years agoMerge pull request #4080 from mjstapp/fix_nh_copy_const
Quentin Young [Thu, 4 Apr 2019 17:52:01 +0000 (13:52 -0400)]
Merge pull request #4080 from mjstapp/fix_nh_copy_const

libs: use const in copy_nexthops api

5 years agoMerge pull request #4076 from dteach-rv/bgp_rpki_enable_fix
Quentin Young [Thu, 4 Apr 2019 17:51:22 +0000 (13:51 -0400)]
Merge pull request #4076 from dteach-rv/bgp_rpki_enable_fix

bgpd: Fix rpki command nodes.

5 years agostaticd: Allow reinstall of static nexthops on vrf restart
Donald Sharp [Thu, 4 Apr 2019 16:19:50 +0000 (12:19 -0400)]
staticd: Allow reinstall of static nexthops on vrf restart

When staticd receives notification that a vrf that it is using
is back up into a state that can be used, go through and
mark all the si data structures nexthops as not installed.
This will allow us to complete the loop and reinstall routes
that need to be fully resolved.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4074 from qlyoung/remove-event-counter
Renato Westphal [Thu, 4 Apr 2019 15:03:12 +0000 (12:03 -0300)]
Merge pull request #4074 from qlyoung/remove-event-counter

lib: remove event_counter.[ch]

5 years agolibs: use const in copy_nexthops api
Mark Stapp [Thu, 4 Apr 2019 14:54:10 +0000 (10:54 -0400)]
libs: use const in copy_nexthops api

Use const for the source arg to copy_nexthops().

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4072 from chiragshah6/evpn_dev2
Lou Berger [Thu, 4 Apr 2019 14:20:43 +0000 (10:20 -0400)]
Merge pull request #4072 from chiragshah6/evpn_dev2

lib,bgpd: do not register nexthop 0.0.0.0 to nht

5 years agoMerge pull request #4073 from donaldsharp/undebug_me_or_not
Lou Berger [Thu, 4 Apr 2019 14:08:34 +0000 (10:08 -0400)]
Merge pull request #4073 from donaldsharp/undebug_me_or_not

some cleanup across multiple daemons

5 years agozebra: Make rnh only send response once on first registration
Donald Sharp [Thu, 4 Apr 2019 12:45:20 +0000 (08:45 -0400)]
zebra: Make rnh only send response once on first registration

The current code path of registration does this:

a) Lookup or create the rnh
b) register the client with the rnh for callback
   If this is a new rnh send a response to the client that
   only includes the rnh data that it has (nothing so no path)
   If this is a existing rnh send the actual path to the client,
     if it exists.
c) If a new client or a flag has changed refigure and send result
   to all clients.

This is problematic in that suppose the rnh is new.  Clients
will receive two answers:
  1) A call back with no nexthops
  2) A call back with the resolved # of nexthops

Imagine pim who depends on nht to handle this, pim will create
a mroute( because it does a hard lookup of the rpf as it is registering
the nexthop ), then it will receive the first callback causing
it to tear down the mroute and then receive the second callback
causing it to put it right back.. This is obviously not very
good for mroutes.

This code moves the send to the new client till after the new
client has connected, thus only allowing one callback to the new
client with the actual answer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4075 from qlyoung/reduce-exported-vars
Mark Stapp [Thu, 4 Apr 2019 10:18:49 +0000 (12:18 +0200)]
Merge pull request #4075 from qlyoung/reduce-exported-vars

lib: reduce exported var symbols

5 years agoMerge pull request #4060 from donaldsharp/pim_cherrybomb
Jafar Al-Gharaibeh [Thu, 4 Apr 2019 04:02:32 +0000 (23:02 -0500)]
Merge pull request #4060 from donaldsharp/pim_cherrybomb

Pim cherrybomb

5 years agobgpd: Fix rpki command nodes.
root [Wed, 3 Apr 2019 20:47:44 +0000 (16:47 -0400)]
bgpd: Fix rpki command nodes.

Move &rpki_cmd from VIEW to ENABLE.  A non-enabled session could
enter into the rpki command node and exit into glocalb config mode
without having to enable.

Move &show_rpki* from ENABLE to VIEW. Allow non-enabled user to
view cache state and prefix table state.

Signed-off-by: David Teach <dteach@routeviews.org>
5 years agolib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms
Donald Sharp [Wed, 3 Apr 2019 20:39:50 +0000 (16:39 -0400)]
lib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms

Use the correct printf formater for those obscure platforms that
we build against.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: reduce exported var symbols
Quentin Young [Wed, 3 Apr 2019 20:34:18 +0000 (20:34 +0000)]
lib: reduce exported var symbols

Don't need these in our DSO tables

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: remove event_counter.[ch]
Quentin Young [Wed, 3 Apr 2019 20:18:08 +0000 (20:18 +0000)]
lib: remove event_counter.[ch]

goodbye spooky code

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd, pimd: Remove undebug commands
Donald Sharp [Wed, 3 Apr 2019 20:17:26 +0000 (16:17 -0400)]
bgpd, pimd: Remove undebug commands

The undebug XXX commands were deprecated over a year ago now,
time to nuke from on high.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years ago*: do not register nexthop 0.0.0.0 to nht
Chirag Shah [Wed, 3 Apr 2019 01:47:46 +0000 (18:47 -0700)]
*: do not register nexthop 0.0.0.0 to nht

Avoid tracking 0.0.0.0/32 nexthop with RIB.

When routes are aggregated,
the originate of the route becomes self.
Do not track nexthop self (0.0.0.0) with rib.

Ticket: CM-24248
Testing Done:

Before fix-

tor-11# show ip nht vrf all

VRF blue:
0.0.0.0
 unresolved
 Client list: bgp(fd 16)

VRF default:

VRF green:

VRF magenta:
0.0.0.0
 unresolved
 Client list: bgp(fd 16)

After fix-

tor-11# show ip nht vrf all

VRF blue:

VRF default:

VRF green:

VRF magenta:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #4070 from donaldsharp/static_fixup
Mark Stapp [Wed, 3 Apr 2019 15:04:15 +0000 (17:04 +0200)]
Merge pull request #4070 from donaldsharp/static_fixup

staticd: Fix static routes that are not added in RIB after Null0 or v…

5 years agostaticd: Fix static routes that are not added in RIB after Null0 or vrf routes
Adrian Ban [Tue, 2 Apr 2019 15:25:50 +0000 (17:25 +0200)]
staticd: Fix static routes that are not added in RIB after Null0 or vrf routes

When you add a static route like:

ip route 10.0.0.0/24 Null0
ip route 192.168.7.0/24 99.99.99.99 nexthop-vrf EVA

all routes after this command will be ignored by staticd and are not inserted in RIB.
This is the cause of return instead of continue in the for loop in static_nht_update_safi() function that is stopping the search in the routes list and is returning in the previous function without calling static_zebra_route_add() function.

This patch is fixing this issue.

Signed-off-by: Adrian Ban <bugs@abtelcom.ro>
5 years agoMerge pull request #3789 from mjstapp/dplane_skip_kernel
Donald Sharp [Wed, 3 Apr 2019 13:26:21 +0000 (09:26 -0400)]
Merge pull request #3789 from mjstapp/dplane_skip_kernel

zebra: support skip-kernel for dataplane updates

5 years agoMerge pull request #3923 from Tuetuopay/evpn-session-vrf
Donald Sharp [Wed, 3 Apr 2019 12:00:14 +0000 (08:00 -0400)]
Merge pull request #3923 from Tuetuopay/evpn-session-vrf

Add support for EVPN session in the non-default VRF

5 years agolibs: nexthop comparison includes labels if present
Mark Stapp [Tue, 2 Apr 2019 16:33:06 +0000 (12:33 -0400)]
libs: nexthop comparison includes labels if present

Adjust the nexthop comparison api so that it calls the label-
comparison api. Adjust the label-comp api so that "no labels"
is "equal".

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4018 from chiragshah6/evpn_dev
Sri Mohana Singamsetty [Wed, 3 Apr 2019 03:28:33 +0000 (20:28 -0700)]
Merge pull request #4018 from chiragshah6/evpn_dev

zebra: evpn dup detect handle ip state change

5 years agoMerge pull request #4053 from patrasar/3672
Donald Sharp [Tue, 2 Apr 2019 17:47:28 +0000 (13:47 -0400)]
Merge pull request #4053 from patrasar/3672

pimd: Introduce mroute_creation in channel oil data structure

5 years agoMerge pull request #4061 from mjstapp/fix_rtm_resolve
Donald Sharp [Tue, 2 Apr 2019 16:02:17 +0000 (12:02 -0400)]
Merge pull request #4061 from mjstapp/fix_rtm_resolve

zebra: conditionalize RTM_RESOLVE flag

5 years agoMerge pull request #4051 from qlyoung/doc-update-build-docs
Renato Westphal [Tue, 2 Apr 2019 15:59:51 +0000 (12:59 -0300)]
Merge pull request #4051 from qlyoung/doc-update-build-docs

doc: remove unneeded build deps

5 years agoMerge pull request #3931 from chiragshah6/evpn_dev1
Russ White [Tue, 2 Apr 2019 15:59:35 +0000 (11:59 -0400)]
Merge pull request #3931 from chiragshah6/evpn_dev1

bgpd: vrf route-leak router-id change reflect to vpn auto rd rt

5 years agozebra: conditionalize RTM_RESOLVE flag
Mark Stapp [Tue, 2 Apr 2019 13:26:45 +0000 (09:26 -0400)]
zebra: conditionalize RTM_RESOLVE flag

RTM_RESOLVE may not be present; conditionalize zebra's reference
to it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agopimd: pim_nexthop_lookup should return true/false
Donald Sharp [Mon, 1 Apr 2019 19:41:32 +0000 (15:41 -0400)]
pimd: pim_nexthop_lookup should return true/false

The current reverse logic led to this code construct
if (!pim_nexthop_lookup(...)) {
//Do something successfull
}

This is backwards and will cause logic errors when people
use this code.  Fix to use true/false for success/failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>