]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #8152 from idryzhov/fix-zebra-blackhole
Stephen Worley [Tue, 2 Mar 2021 16:50:46 +0000 (11:50 -0500)]
Merge pull request #8152 from idryzhov/fix-zebra-blackhole

zebra: don't use kernel nexthops for blackhole routes

3 years agoMerge pull request #8150 from pguibert6WIND/ecomm_seq_0_possible
Russ White [Tue, 2 Mar 2021 16:46:41 +0000 (11:46 -0500)]
Merge pull request #8150 from pguibert6WIND/ecomm_seq_0_possible

bgpd: accept (ext)community list sequence number set to 0

3 years agoMerge pull request #8175 from mjstapp/fix_printfrr_nulls
Russ White [Tue, 2 Mar 2021 16:36:49 +0000 (11:36 -0500)]
Merge pull request #8175 from mjstapp/fix_printfrr_nulls

lib, bgpd: handle NULL inputs in printfrr extensions

3 years agoMerge pull request #8084 from ranjanyash54/spf_json
Donald Sharp [Tue, 2 Mar 2021 12:26:49 +0000 (07:26 -0500)]
Merge pull request #8084 from ranjanyash54/spf_json

ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"

3 years agoMerge pull request #7951 from mjstapp/fix_cancel_event
Donald Sharp [Tue, 2 Mar 2021 12:21:47 +0000 (07:21 -0500)]
Merge pull request #7951 from mjstapp/fix_cancel_event

libs, bgpd: improve task cancellation by argument value

3 years agoMerge pull request #8021 from AnuradhaKaruppiah/evpn-weak-override-fix
Patrick Ruddy [Tue, 2 Mar 2021 10:44:43 +0000 (10:44 +0000)]
Merge pull request #8021 from AnuradhaKaruppiah/evpn-weak-override-fix

zebra: disable setting weak override flag in neigh updates

3 years agoMerge pull request #8117 from AnuradhaKaruppiah/evpn-consistency-checks
Patrick Ruddy [Tue, 2 Mar 2021 10:37:59 +0000 (10:37 +0000)]
Merge pull request #8117 from AnuradhaKaruppiah/evpn-consistency-checks

bgpd: enable ES consistency checks on first ES add

3 years agoospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"
Yash Ranjan [Mon, 9 Nov 2020 09:52:45 +0000 (01:52 -0800)]
ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"

Modify code to add JSON format output in show command
"show ipv6 ospf6 spf tree" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoMerge pull request #8172 from donaldsharp/more_pytest_bgp
Donatas Abraitis [Tue, 2 Mar 2021 07:30:06 +0000 (09:30 +0200)]
Merge pull request #8172 from donaldsharp/more_pytest_bgp

More pytest stuff

3 years agoMerge pull request #8178 from donaldsharp/bgp_fib_install
Donatas Abraitis [Tue, 2 Mar 2021 06:56:35 +0000 (08:56 +0200)]
Merge pull request #8178 from donaldsharp/bgp_fib_install

bgpd: Wait for Install should not always set the flag

3 years agoMerge pull request #8171 from mjstapp/print_nh_null
Donald Sharp [Tue, 2 Mar 2021 01:22:54 +0000 (20:22 -0500)]
Merge pull request #8171 from mjstapp/print_nh_null

lib: print NULL for NULL nexthops

3 years agolib: protect printfrr extensions from NULL input
Mark Stapp [Mon, 1 Mar 2021 20:41:30 +0000 (15:41 -0500)]
lib: protect printfrr extensions from NULL input

Protect the lib printfrr extension handlers from NULL inputs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: protect bgp printfrr extension from NULLs
Mark Stapp [Mon, 1 Mar 2021 20:40:51 +0000 (15:40 -0500)]
bgpd: protect bgp printfrr extension from NULLs

Protect the bgp printfrr extension from NULL input.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: Wait for Install should not always set the flag
Donald Sharp [Mon, 1 Mar 2021 18:09:11 +0000 (13:09 -0500)]
bgpd: Wait for Install should not always set the flag

If we are filtering a route due to any of the filter reasons
we should not be setting the BGP_NODE_FIB_INSTALL_FIB_PENDING
flag.  This is especially evident with say a loopback that
is covered by a network statement.  When we receive the route
back from our peer we should not be setting the
BGP_NODE_FIB_INSTALL_PENDING flag on it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: don't use kernel nexthops for blackhole routes
Igor Ryzhov [Thu, 25 Feb 2021 15:28:51 +0000 (18:28 +0300)]
zebra: don't use kernel nexthops for blackhole routes

Fixes #6522 and #8149.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Run `black` against tests again to clean up formatting
Donald Sharp [Mon, 1 Mar 2021 14:18:49 +0000 (09:18 -0500)]
tests: Run `black` against tests again to clean up formatting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.snmp
Donald Sharp [Mon, 1 Mar 2021 14:17:53 +0000 (09:17 -0500)]
tests: Add pytest.mark.snmp

Add the ability to run snmp tests

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add some pytest.mark.bgpd
Donald Sharp [Mon, 1 Mar 2021 14:11:38 +0000 (09:11 -0500)]
tests: Add some pytest.mark.bgpd

Add some pytest.mark.bgpd.  This is about all I could stomach doing
in one patch.  I'll do another pass at another time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: print NULL for NULL nexthops
Mark Stapp [Mon, 1 Mar 2021 13:51:13 +0000 (08:51 -0500)]
lib: print NULL for NULL nexthops

Instead of crashing, print "NULL" when printfrr callback for
nexthops is called for a NULL nexthop argument.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8073 from idryzhov/vtysh-show-config
Santosh P K [Mon, 1 Mar 2021 13:10:06 +0000 (18:40 +0530)]
Merge pull request #8073 from idryzhov/vtysh-show-config

lib: allow "show config running" command for non-transactional CLI

3 years agobgpd: accept (ext)community list sequence number set to 0
Philippe Guibert [Thu, 25 Feb 2021 12:54:31 +0000 (13:54 +0100)]
bgpd: accept (ext)community list sequence number set to 0

now that sequence number is configurable, there is no problem in
permitting to configure seq 0 sequence number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #8166 from donaldsharp/ospfv3_info
Mark Stapp [Sun, 28 Feb 2021 15:57:01 +0000 (10:57 -0500)]
Merge pull request #8166 from donaldsharp/ospfv3_info

ospf6d: turn some info->debug

3 years agoospf6d: turn some info->debug
Donald Sharp [Sat, 27 Feb 2021 15:42:07 +0000 (10:42 -0500)]
ospf6d: turn some info->debug

The log is being spammed every spf interval:

Feb 27 16:19:34  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2043 usec, Reason: R+, R-, N+
Feb 27 16:20:59  ospf6d[462371]: SPF: Scheduled in 0 msec
Feb 27 16:20:59  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2284 usec, Reason: R+, R-
Feb 27 16:21:01  ospf6d[462371]: SPF: Scheduled in 0 msec
Feb 27 16:21:01  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2153 usec, Reason: R+, R-, N-

There is no reason to do this

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8164 from opensourcerouting/isisd-ti-lfa-fixes
Mark Stapp [Sat, 27 Feb 2021 15:13:14 +0000 (10:13 -0500)]
Merge pull request #8164 from opensourcerouting/isisd-ti-lfa-fixes

isisd: TI-LFA fixes

3 years agoisisd: handle corner case involving TI-LFA and the SR No-PHP flag
Renato Westphal [Fri, 26 Feb 2021 16:39:02 +0000 (13:39 -0300)]
isisd: handle corner case involving TI-LFA and the SR No-PHP flag

When the last SID in the TI-LFA repair list is an Adj-SID from the
penultimate hop router towards the final hop, the No-PHP flag of the
original Prefix-SID must be honored in the repair list itself since
the penultimate hop router won't have a chance to process that SID
and pop it if necessary.

Reported-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: remove assert from the TI-LFA repair list computation algorithm
Renato Westphal [Fri, 26 Feb 2021 16:37:12 +0000 (13:37 -0300)]
isisd: remove assert from the TI-LFA repair list computation algorithm

In some cases it's possible that the TI-LFA algorithms will try to
compute a SID repair list more than once for the same backup nexthop
[1]. This of course shouldn't be allowed, as a backup nexthop can't
have multiple label stacks. When that happens, we should just ignore
the new repair list if one is already applied, instead of asserting
and crashing the daemon.

[1] One scenario this can happen is when there's ECMP involving
different P-nodes in the PQ-space intersection.

Reported-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agodoc: improve documentation of the IS-IS fast reroute commands
Renato Westphal [Thu, 25 Feb 2021 17:40:34 +0000 (14:40 -0300)]
doc: improve documentation of the IS-IS fast reroute commands

* Clarify which commands are applicable to which flavors of LFA;
* Explain the default prefix priority for different prefix types;
* Rearrange some command descriptions so that they appear in this
  order: local LFA, remote LFA and then TI-LFA.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #8157 from kuldeepkash/multicast_pim_bsm
Mark Stapp [Fri, 26 Feb 2021 16:48:17 +0000 (11:48 -0500)]
Merge pull request #8157 from kuldeepkash/multicast_pim_bsm

tests: Fix for blackhole test in test_mcast_pim_bsmp suite

3 years agotests: Fix for blackhole test in test_mcast_pim_bsmp suite
Kuldeep Kashyap [Fri, 26 Feb 2021 07:49:58 +0000 (23:49 -0800)]
tests: Fix for blackhole test in test_mcast_pim_bsmp suite

1. Fixed for blackhole test in test_mcast_pim_bsmp suite

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #8139 from volta-networks/fix_ospf6_show_database
Donald Sharp [Thu, 25 Feb 2021 11:34:52 +0000 (06:34 -0500)]
Merge pull request #8139 from volta-networks/fix_ospf6_show_database

ospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command

3 years agoMerge pull request #8025 from AnuradhaKaruppiah/lacp-bypass
Patrick Ruddy [Thu, 25 Feb 2021 09:26:11 +0000 (09:26 +0000)]
Merge pull request #8025 from AnuradhaKaruppiah/lacp-bypass

bgp, zebra: Support for lacp bypass with EVPN-MH

3 years agoMerge pull request #8146 from qlyoung/doc-fix-tracing-indent
Donatas Abraitis [Thu, 25 Feb 2021 07:54:50 +0000 (09:54 +0200)]
Merge pull request #8146 from qlyoung/doc-fix-tracing-indent

doc: fix indent depth in tracing doc

3 years agoMerge pull request #8148 from qlyoung/fix-pim-nb-static-mroute-loop-check
Jafar Al-Gharaibeh [Wed, 24 Feb 2021 23:50:57 +0000 (17:50 -0600)]
Merge pull request #8148 from qlyoung/fix-pim-nb-static-mroute-loop-check

pimd: do static mroute loop check in NB VALIDATE

3 years agopimd: do static mroute loop check in NB VALIDATE
Quentin Young [Wed, 24 Feb 2021 22:57:26 +0000 (17:57 -0500)]
pimd: do static mroute loop check in NB VALIDATE

We can proactively check whether this mroute will be nacked by loopfree
MFC checks so let's do it in the apply phase and emit a useful error
message.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8128 from qlyoung/docs-cleanup
Mark Stapp [Wed, 24 Feb 2021 21:53:42 +0000 (16:53 -0500)]
Merge pull request #8128 from qlyoung/docs-cleanup

General docs cleanup

3 years agodoc: fix indent depth in tracing doc
Quentin Young [Wed, 24 Feb 2021 19:53:33 +0000 (14:53 -0500)]
doc: fix indent depth in tracing doc

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #7957 from idryzhov/ospf-instance
Quentin Young [Wed, 24 Feb 2021 18:30:10 +0000 (13:30 -0500)]
Merge pull request #7957 from idryzhov/ospf-instance

3 years agoMerge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook
Quentin Young [Wed, 24 Feb 2021 18:24:33 +0000 (13:24 -0500)]
Merge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook

lib: add agentx_enabled hook

3 years agodoc: more misc. cleanups
Quentin Young [Wed, 24 Feb 2021 18:06:26 +0000 (13:06 -0500)]
doc: more misc. cleanups

- Re-add wrongly removed ISIS commands
- Re-add distribution commands in BGP
- Remove nonexistent commands in pathd
- Fix typo in OSPF6
- Improve command defs in PIM

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agozebra: fix problem with bypass getting set accidentally on all ESs
Anuradha Karuppiah [Fri, 19 Feb 2021 01:49:20 +0000 (17:49 -0800)]
zebra: fix problem with bypass getting set accidentally on all ESs

This was caused because of uninitialized netlint attrs in the bond-member
netlink parse API.

PS: It was caught by the upstream topotests on ARM8 (passed everywhere
else).

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agotests: increase ping attempts in EVPN MH to fix failures on ARM
Anuradha Karuppiah [Tue, 16 Feb 2021 19:17:04 +0000 (11:17 -0800)]
tests: increase ping attempts in EVPN MH to fix failures on ARM

There are two fixes to handle slow convergence on ARM -
1. Ping on every re-try attempt to account for initial packet loss
2. Handle incomplete show outputs gracefully

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: support for lacp bypass with EVPN MH
Anuradha Karuppiah [Tue, 11 Aug 2020 00:46:09 +0000 (17:46 -0700)]
bgpd: support for lacp bypass with EVPN MH

When a local ES is in LACP bypass state BGP doesn't advertise
reachability to it i.e. the Type-1/EAD-per-ES routes and Type-4
route for the ES is not advertised. This is the equivalent of
oper-down handling.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: del/add remote mac if there is a change from es->non-es dst and vicevera
Anuradha Karuppiah [Tue, 22 Sep 2020 13:16:52 +0000 (06:16 -0700)]
zebra: del/add remote mac if there is a change from es->non-es dst and vicevera

This is needed as kernel currently doesn't allow a mac replace if the dst
changes from a L2NHG to a single-VTEP and viceversa.

Ticket: CM-31561

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: flush macs linked to the bond when it moves out of bypass
Anuradha Karuppiah [Tue, 8 Sep 2020 16:23:04 +0000 (09:23 -0700)]
zebra: flush macs linked to the bond when it moves out of bypass

When a ES-bond is in bypass state MACs learnt on it are linked to the
access port instead of the ES. When LACP converges on the bond it moves
out of bypass and the MACs previously learnt on it are flushed to force
a re-learn on new traffic.

Ticket: CM-31326

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: link local MACs to destination port for efficient lacp-bypass processing
Anuradha Karuppiah [Tue, 8 Sep 2020 13:56:33 +0000 (06:56 -0700)]
zebra: link local MACs to destination port for efficient lacp-bypass processing

When an ES-bond comes out of bypass FRR needs to flush the local MACs learnt
while the bond was in bypass. To do that efficiently local MACs are linked
to the dest-access port. This only happens if the access-port is in
LACP-bypass or if it is non-ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: support for lacp bypass with EVPN MH
Anuradha Karuppiah [Wed, 5 Aug 2020 14:13:55 +0000 (07:13 -0700)]
zebra: support for lacp bypass with EVPN MH

Feature overview:
=================
A 802.3ad bond can be setup to allow lacp-bypass. This is done to enable
servers to pxe boot without a LACP license i.e. allows the bond to go oper
up (with a single link) without LACP converging.

If an ES-bond is oper-up in an "LACP-bypass" state MH treats it as a non-ES
bond. This involves the following special handling -
1. If the bond is in a bypass-state the associated ES is placed in a
bypass state.
2. If an ES is in a bypass state -
a. DF election is disabled (i.e. assumed DF)
b. SPH filter is not installed.
3. MACs learnt via the host bond are advertised with a zero ESI.
When the ES moves out of "bypass" the MACs are moved from a zero-ESI to
the correct non-zero id. This is treated as a local station move.

Implementation:
===============
When (a) an ES is detached from a hostbond or (b) an ES-bond goes into
LACP bypass zebra deletes all the local macs (with that ES as destination)
in the kernel and its local db. BGP re-sends any imported MAC-IP routes
that may exist with this ES destination as remote routes i.e. zebra can
end up programming a MAC that was perviously local as remote pointing
to a VTEP-ECMP group.

When an ES is attached to a hostbond or an ES-bond goes
LACP-up (out of bypss) zebra again deletes all the local macs in the
kernel and its local db. At this point BGP resends any imported MAC-IP
routes that may exist with this ES destination as sync routes i.e.
zebra can end up programming a MAC that was perviously remote
as local pointing to an access port.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agovtysh: fix show_per_daemon for multi-instance ospfd
Igor Ryzhov [Wed, 27 Jan 2021 23:41:42 +0000 (02:41 +0300)]
vtysh: fix show_per_daemon for multi-instance ospfd

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: don't rely on instance existence in vty
Igor Ryzhov [Wed, 27 Jan 2021 23:41:07 +0000 (02:41 +0300)]
ospfd: don't rely on instance existence in vty

Store instance index at startup and use it when processing vty commands.
The instance itself may be created and deleted by the user in runtime
using `[no] router ospf X` command.

Fixes #7908

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac
Patrick Ruddy [Wed, 24 Feb 2021 10:20:24 +0000 (10:20 +0000)]
Merge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac

evpn-mh: Advertise SVI MAC as a type-2 route if EVPN MH is enabled

3 years agoMerge pull request #8134 from ton31337/fix/doc_formatting
Quentin Young [Tue, 23 Feb 2021 23:50:18 +0000 (18:50 -0500)]
Merge pull request #8134 from ton31337/fix/doc_formatting

doc: Format highlighted syntax properly for Systemtap examples

3 years agodoc: clean up a couple snafus in doc changes
Quentin Young [Tue, 23 Feb 2021 20:57:56 +0000 (15:57 -0500)]
doc: clean up a couple snafus in doc changes

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8035 from qlyoung/remove-more-sprintf
Mark Stapp [Tue, 23 Feb 2021 20:55:02 +0000 (15:55 -0500)]
Merge pull request #8035 from qlyoung/remove-more-sprintf

*: remove more sprintf()

3 years agodoc: fix dupe bug-reports label, index entry
Quentin Young [Tue, 23 Feb 2021 20:49:19 +0000 (15:49 -0500)]
doc: fix dupe bug-reports label, index entry

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: update docs on docs
Quentin Young [Tue, 23 Feb 2021 20:43:13 +0000 (15:43 -0500)]
doc: update docs on docs

- Don't document 'no' commands
- Don't use .. index:: for clicmds
- Don't document all possible variants

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: Format highlighted syntax properly for Systemtap examples
Donatas Abraitis [Tue, 23 Feb 2021 12:31:41 +0000 (14:31 +0200)]
doc: Format highlighted syntax properly for Systemtap examples

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command
lynne [Tue, 23 Feb 2021 17:07:28 +0000 (12:07 -0500)]
ospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command

When an unknown LSA is in the database and the user issues the
"show ipv6 ospf6 database" command there is a crash.  The code currently
doesn't properly handle display of unknown LSAs.

Signed-off-by: Lynne Morrison <lynne@voltaio.net>
3 years agoMerge pull request #8095 from idryzhov/fix-nb-stale-pointers
Russ White [Tue, 23 Feb 2021 16:15:31 +0000 (11:15 -0500)]
Merge pull request #8095 from idryzhov/fix-nb-stale-pointers

fix stale pointers in northbound nodes

3 years agoMerge pull request #8020 from ton31337/feature/test_aggregator_as_with_0_exabgp
Russ White [Tue, 23 Feb 2021 16:06:34 +0000 (11:06 -0500)]
Merge pull request #8020 from ton31337/feature/test_aggregator_as_with_0_exabgp

tests: Test if BGP AGGREGATOR attribute is discarded if ASN comes as 0

3 years agoMerge pull request #8130 from ton31337/feature/document_systemtap_usdt
Donald Sharp [Tue, 23 Feb 2021 12:25:19 +0000 (07:25 -0500)]
Merge pull request #8130 from ton31337/feature/document_systemtap_usdt

doc: Instruction how to use Systemtap with FRRouting

3 years agoMerge pull request #7435 from sudhanshukumar22/bgp-peer-group-issue
Donatas Abraitis [Tue, 23 Feb 2021 07:14:24 +0000 (09:14 +0200)]
Merge pull request #7435 from sudhanshukumar22/bgp-peer-group-issue

Bgp peer group issue

3 years agoMerge pull request #7460 from pguibert6WIND/remove_bgp_constraint
Donatas Abraitis [Tue, 23 Feb 2021 07:02:04 +0000 (09:02 +0200)]
Merge pull request #7460 from pguibert6WIND/remove_bgp_constraint

bgpd: upon bgp deletion, do not systematically ask to remove main bgp

3 years agodoc: Instruction how to use Systemtap with FRRouting
Donatas Abraitis [Mon, 22 Feb 2021 21:36:01 +0000 (23:36 +0200)]
doc: Instruction how to use Systemtap with FRRouting

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: disable setting weak override flag in neigh updates
Anuradha Karuppiah [Fri, 31 Jul 2020 13:21:57 +0000 (06:21 -0700)]
zebra: disable setting weak override flag in neigh updates

This is causing problems with VM move i.e. transition from remote
neigh to local neigh. This transition involves changing the NUD_STATE
NUD_NOARP to NUD_STALE. And the weak override flag prevents changing
the state from connected (REACHABLE, NOARP, PERMANENT) to STALE.

PS: Weak-override was originally used to prevent race conditions where
FRR can end up making a REACHABLE neigh STALE. We may need to revisit
and address that case at a later point.

Ticket: CM-30273

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agodoc: remove 'no' form of commands
Quentin Young [Fri, 19 Feb 2021 22:32:07 +0000 (17:32 -0500)]
doc: remove 'no' form of commands

These don't need to be documented, most of the time they are obvious,
when they aren't the behavior can just be described in the command
description.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: automatically generate index entries for cli
Quentin Young [Fri, 19 Feb 2021 20:33:45 +0000 (15:33 -0500)]
doc: automatically generate index entries for cli

- Generate index entries automatically
- Remove manual command index entries
- Clean up a few other manual index entries

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: clean up duplicate/wrong commands
Quentin Young [Thu, 18 Feb 2021 22:52:33 +0000 (17:52 -0500)]
doc: clean up duplicate/wrong commands

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8105 from donaldsharp/reduce_monotime
Mark Stapp [Mon, 22 Feb 2021 18:04:43 +0000 (13:04 -0500)]
Merge pull request #8105 from donaldsharp/reduce_monotime

lib: Reduce getrusage/monotime for event handling

3 years agolib: register dependency between control plane protocol and vrf nb nodes
Igor Ryzhov [Tue, 16 Feb 2021 09:57:01 +0000 (12:57 +0300)]
lib: register dependency between control plane protocol and vrf nb nodes

When the control plane protocol is created, the vrf structure is
allocated, and its address is stored in the northbound node.
The vrf structure may later be deleted by the user, which will lead to
a stale pointer stored in this node.

Instead of this, allow daemons that use the vrf pointer to register the
dependency between the control plane protocol and vrf nodes. This will
guarantee that the nodes will always be created and deleted together, and
there won't be any stale pointers.

Add such registration to staticd and pimd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: add definitions for vrf xpaths
Igor Ryzhov [Tue, 16 Feb 2021 09:57:30 +0000 (12:57 +0300)]
lib: add definitions for vrf xpaths

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: don't rely on northbound control plane protocol vrf pointer
Igor Ryzhov [Mon, 15 Feb 2021 18:17:08 +0000 (21:17 +0300)]
bgpd: don't rely on northbound control plane protocol vrf pointer

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: add ability to register dependencies between northbound nodes
Igor Ryzhov [Tue, 16 Feb 2021 09:49:25 +0000 (12:49 +0300)]
lib: add ability to register dependencies between northbound nodes

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8125 from opensourcerouting/topotest-labn-jsoncmp
Donald Sharp [Mon, 22 Feb 2021 14:38:03 +0000 (09:38 -0500)]
Merge pull request #8125 from opensourcerouting/topotest-labn-jsoncmp

tests: JSON comparison command for LabN topotests

3 years agolib: Reduce getrusage/monotime for event handling
Donald Sharp [Thu, 18 Feb 2021 00:58:19 +0000 (19:58 -0500)]
lib: Reduce getrusage/monotime for event handling

When handling a large number of events at one time
FRR will call monotime and getrusage 2 times for each
event.  With this change modify the code to change
this to (X events / 2) + 1 calls of getrusage and monotime

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8114 from volta-networks/fix_c++_xrefdata
David Lamparter [Mon, 22 Feb 2021 13:52:37 +0000 (14:52 +0100)]
Merge pull request #8114 from volta-networks/fix_c++_xrefdata

lib: fix c++ usage of zlog

3 years agoMerge pull request #7920 from donaldsharp/more_pytest_cleanup
Mark Stapp [Mon, 22 Feb 2021 12:31:22 +0000 (07:31 -0500)]
Merge pull request #7920 from donaldsharp/more_pytest_cleanup

More pytest cleanup

3 years agotests: example using new "jsoncmp_pass" command
David Schweizer [Mon, 22 Feb 2021 09:49:36 +0000 (10:49 +0100)]
tests: example using new "jsoncmp_pass" command

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agolib: fix c++ usage of zlog
Emanuele Di Pascale [Mon, 22 Feb 2021 09:29:55 +0000 (10:29 +0100)]
lib: fix c++ usage of zlog

Since some recent commit, building c++ code attempting to use zlog_debug
(or any other level) would fail with the following complaint:

lib/zlog.h:91:3: sorry, unimplemented: non-trivial designated
initializers not supported
   };
   ^
lib/zlog.h:105:26: note: in expansion of macro ‘_zlog_ref’
 #define zlog_debug(...)  _zlog_ref(LOG_DEBUG, __VA_ARGS__)

This is due to out-of-order initialization of the xrefdata struct
fields. Setting them all in the order in which they are defined
fixes the issue.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agotests: JSON comparison command for LabN topotests
David Schweizer [Mon, 22 Feb 2021 09:31:57 +0000 (10:31 +0100)]
tests: JSON comparison command for LabN topotests

The changes add the "jsoncmp_pass" and the "jsoncmp_fail" commands to
compare VTY shell's JSON output to an expected JSON object during
topotests using the LabN testing framework. This helps to eliminate
false negative test results (i.e. due to routes beeing out of order
after convergence or cosmetic changes in VTY shell's text output).

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agoMerge pull request #7444 from sudhanshukumar22/bgp-clean-dampening-issue
Donatas Abraitis [Mon, 22 Feb 2021 07:37:04 +0000 (09:37 +0200)]
Merge pull request #7444 from sudhanshukumar22/bgp-clean-dampening-issue

bgpd: clear ip bgp dampening was not triggering the route calculation…

3 years agoMerge pull request #8119 from donaldsharp/clippy_mem_leak
David Lamparter [Mon, 22 Feb 2021 05:41:23 +0000 (06:41 +0100)]
Merge pull request #8119 from donaldsharp/clippy_mem_leak

lib: Free memory leak in error path in clippy

3 years agolib: Free memory leak in error path in clippy
Donald Sharp [Sat, 20 Feb 2021 12:38:06 +0000 (07:38 -0500)]
lib: Free memory leak in error path in clippy

When running clippy, the main function in it's
error path could leak the memory pointed to by name.
Fix this.  This was/is reported by clang SA.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8111 from volta-networks/fix_bgp_plist_vpn
Donatas Abraitis [Sat, 20 Feb 2021 10:23:26 +0000 (12:23 +0200)]
Merge pull request #8111 from volta-networks/fix_bgp_plist_vpn

bgpd: fix 'neighbor X prefix-list Y in' SAFI VPN

3 years agoMerge pull request #8112 from pguibert6WIND/bgp_flowspec_attrunchanged
Donald Sharp [Fri, 19 Feb 2021 23:30:36 +0000 (18:30 -0500)]
Merge pull request #8112 from pguibert6WIND/bgp_flowspec_attrunchanged

bgpd: add attribute-unchanged attribute to flowspec

3 years agoMerge pull request #8116 from qlyoung/clippy-name-wchar
Martin Winter [Fri, 19 Feb 2021 23:26:05 +0000 (00:26 +0100)]
Merge pull request #8116 from qlyoung/clippy-name-wchar

lib: use right type for wconv() return val

3 years agobgpd: enable ES consistency checks on first ES add
Anuradha Karuppiah [Fri, 19 Feb 2021 18:29:34 +0000 (10:29 -0800)]
bgpd: enable ES consistency checks on first ES add

Consistency checks are processed in the background using a periodic timer.
Start this timer only if Ethernet Segments are present and consistency
checking is needed.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agolib: use right type for wconv() return val
Quentin Young [Fri, 19 Feb 2021 16:58:11 +0000 (11:58 -0500)]
lib: use right type for wconv() return val

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agozebra: fix problem with SVI MAC not being sent to BGP
Anuradha Karuppiah [Thu, 18 Feb 2021 02:36:56 +0000 (18:36 -0800)]
zebra: fix problem with SVI MAC not being sent to BGP

For MH the SVI MAC is advertised to prevent flooding of ARP replies.
But because of a bug the SVI MAC was being added to the zebra database
but not sent to bgpd for advertising.

Ticket: CM-33329

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agozebra: drop the SVI MAC cleanup done as a part of interface delete
Anuradha Karuppiah [Fri, 22 Jan 2021 01:55:35 +0000 (17:55 -0800)]
zebra: drop the SVI MAC cleanup done as a part of interface delete

As a part of FRR shutdown interfaces are force flushed (in an arbitary
order). Interfaces are already down at that point i.e. resources like
SVI-MAC have already been released. Attempting to clean it up again
as a part of the force-flush was resulting in access of freed up memory -

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
==26457== Thread 1:
==26457== Invalid read of size 8
==26457==    at 0x1AE6B0: zebra_evpn_acc_bd_svi_set (zebra_evpn_mh.c:606)
==26457==    by 0x1B1460: zebra_evpn_if_cleanup (zebra_evpn_mh.c:1040)
==26457==    by 0x13CA69: if_zebra_delete_hook (interface.c:244)
==26457==    by 0x48A0E34: hook_call_if_del (if.c:59)
==26457==    by 0x48A0E34: if_delete_retain (if.c:290)
==26457==    by 0x48A2F94: if_delete (if.c:313)
==26457==    by 0x48A3169: if_terminate (if.c:1217)
==26457==    by 0x48E0024: vrf_delete (vrf.c:254)
==26457==    by 0x48E0024: vrf_delete (vrf.c:225)
==26457==    by 0x48E02FE: vrf_terminate (vrf.c:551)
==26457==    by 0x1442E1: sigint (main.c:203)
==26457==    by 0x1442E1: sigint (main.c:141)
==26457==    by 0x48CF862: quagga_sigevent_process (sigevent.c:103)
==26457==    by 0x48DD324: thread_fetch (thread.c:1404)
==26457==    by 0x48A926A: frr_run (libfrr.c:1122)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(gdb) bt
(gdb) fr 5
1037    zebra/zebra_evpn_mh.c: No such file or directory.
(gdb) p zif->ifp->name
$2 = "vlan131", '\000' <repeats 12 times>
(gdb) p zif->link->info
$5 = (void *) 0x1
(gdb) p/x zif->ifp->flags
$7 = 0x1002
(gdb)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-32435

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agozebra: prevent crash in evpn if cleanup
Chirag Shah [Tue, 24 Nov 2020 20:22:49 +0000 (12:22 -0800)]
zebra: prevent crash in evpn if cleanup

zebra crash is seen while cleaning up evpn interface
during shutdown event.
evpn interface clean up is called from vrf_delete callback

(gdb) frame 4
(is_up=false, br_zif=0x0, vlan_zif=0x557f31fb36f0) at zebra/zebra_evpn_mh.c:614
614     zebra/zebra_evpn_mh.c: No such file or directory.
(gdb) p tmp_br_zif
$1 = (struct zebra_if *) 0x0
(gdb) p vlan_zif->link
$2 = (struct interface *) 0x557f31fb2d40
(gdb) p vlan_zif->link->info
$3 = (void *) 0x0
(gdb) p zebra_if->ifp->name
No symbol "zebra_if" in current context.
(gdb) p vlan_zif->ifp->name
$4 = "peerlink-3.4094\000\000\000\000"

Ticket:CM-32435
Reviewed By:CCR-10957
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agozebra: changes to advertise SVI mac by default if evpn-mh is enabled
Anuradha Karuppiah [Mon, 2 Nov 2020 18:53:50 +0000 (10:53 -0800)]
zebra: changes to advertise SVI mac by default if evpn-mh is enabled

Added support for advertising SVI MAC if EVPN-MH is enabled.

In the case of EVPN MH arp replies from an attached server can be sent to
the ES-peer. To prevent flooding of the reply the SVI MAC needs to be
advertised by default.

Note:
advertise-svi-ip could have been used as an alternate way to advertise
SVI MAC. However that config cannot be turned on if SVI IPs are
re-used (which is done to avoid wasting IP addresses in a subnet).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: fix problem with SVI IP being advertised even if disabled
Anuradha Karuppiah [Tue, 3 Nov 2020 22:34:46 +0000 (14:34 -0800)]
zebra: fix problem with SVI IP being advertised even if disabled

SVI IP is being advertised unconditionally i.e. even if disabled (and
that is the default config). This can be problematic when the SVI address
is re-used across racks.

Added the user config condition in all the relevant places where the
SVI advertisement is triggered.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #8079 from pjdruddy/pr-snmp-coverity
Donald Sharp [Fri, 19 Feb 2021 13:54:02 +0000 (08:54 -0500)]
Merge pull request #8079 from pjdruddy/pr-snmp-coverity

MPLSL3VPN snmp coverity fixes

3 years agoMerge pull request #8102 from volta-networks/fix_ospf6_error_logs
Donald Sharp [Fri, 19 Feb 2021 13:22:47 +0000 (08:22 -0500)]
Merge pull request #8102 from volta-networks/fix_ospf6_error_logs

ospf6d: Update logs that indicate why ospf6 adjacency is not coming up.

3 years agoMerge pull request #8103 from mjstapp/fix_thread_awaken
Donald Sharp [Fri, 19 Feb 2021 13:21:31 +0000 (08:21 -0500)]
Merge pull request #8103 from mjstapp/fix_thread_awaken

lib: don't awaken from poll for every timer

3 years agoMerge pull request #8107 from ranjanyash54/intra_prefix_metric
Donald Sharp [Fri, 19 Feb 2021 13:19:53 +0000 (08:19 -0500)]
Merge pull request #8107 from ranjanyash54/intra_prefix_metric

ospf6d: Show metric in intra-prefix LSA detail

3 years agobgpd: add attribute-unchanged attribute to flowspec
Philippe Guibert [Fri, 19 Feb 2021 13:17:05 +0000 (14:17 +0100)]
bgpd: add attribute-unchanged attribute to flowspec

flowspec address family can now use attribute-unchanged attribute.
This parameter is necessary when it comes to play with
route-server-client, as that latter command forces to change
attribute-unchanged nexthop.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: fix 'neighbor X prefix-list Y in' SAFI VPN
Emanuele Di Pascale [Fri, 19 Feb 2021 12:26:04 +0000 (13:26 +0100)]
bgpd: fix 'neighbor X prefix-list Y in' SAFI VPN

this particular callback had not been implemented in the northbound
conversion, so the command had no effect.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoospf6d: Metric option in intra-prefix LSA detail
Yash Ranjan [Thu, 18 Feb 2021 12:38:11 +0000 (04:38 -0800)]
ospf6d: Metric option in intra-prefix LSA detail

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoMerge pull request #8106 from donaldsharp/fix_bad_interaction
Mark Stapp [Thu, 18 Feb 2021 15:31:04 +0000 (10:31 -0500)]
Merge pull request #8106 from donaldsharp/fix_bad_interaction

bgpd: Fix crash when we don't have a nexthop

3 years agoospf6d: Update logs that indicate why ospf6 adjacency is not coming up.
lynne [Wed, 17 Feb 2021 14:21:43 +0000 (09:21 -0500)]
ospf6d: Update logs that indicate why ospf6 adjacency is not coming up.

Add more details to these logs to help make it easier to determine why
ospf6 adjacency is not coming up.   Also make these logs show up without
having to turn on debug logging, again making it easier to debug the
misconfiguration.

Signed-off-by: Lynne Morrison <lynne@voltaio.net>