]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #5200 from ton31337/feature/doc_access-list_sequence_numbers
Donald Sharp [Fri, 25 Oct 2019 01:24:56 +0000 (21:24 -0400)]
Merge pull request #5200 from ton31337/feature/doc_access-list_sequence_numbers

doc: Update documentation for access-list with sequence numbers

4 years agoMerge pull request #5220 from dslicenc/remove-afi-safi-msg
Donatas Abraitis [Thu, 24 Oct 2019 15:19:13 +0000 (18:19 +0300)]
Merge pull request #5220 from dslicenc/remove-afi-safi-msg

bgpd: remove error message for unkown afi/safi combination

4 years agoMerge pull request #5219 from pguibert6WIND/interface_same_name
Donatas Abraitis [Thu, 24 Oct 2019 14:01:56 +0000 (17:01 +0300)]
Merge pull request #5219 from pguibert6WIND/interface_same_name

staticd: check tuple (vrf, name) when interface events received

4 years agobgpd: remove error message for unkown afi/safi combination
Don Slice [Wed, 23 Oct 2019 16:30:28 +0000 (16:30 +0000)]
bgpd: remove error message for unkown afi/safi combination

Problem reported with error messages appearing in the log
complaining about invalid afi/safi combinations.  Determined
that the error messages were recently added in the function
that turns afi and safi values to strings.  Unfortunately,
the function is called from places using FOREACH_AFI_SAFI,
which spins thru every afi and safi number including some
that are not legal together (ipv4 evpn and l2vpn multicast
for example.)   This fix removes these error messages since
it is not necessarily an error to call it with invalid
combinations.

Ticket: CM-26883
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #5203 from qlyoung/fix-vrrp-error-alternations
Renato Westphal [Thu, 24 Oct 2019 00:16:04 +0000 (21:16 -0300)]
Merge pull request #5203 from qlyoung/fix-vrrp-error-alternations

vrrpd: fix startup error message reporting

4 years agoMerge pull request #5217 from mjstapp/fix_bgp_evpn_pi
Renato Westphal [Thu, 24 Oct 2019 00:02:00 +0000 (21:02 -0300)]
Merge pull request #5217 from mjstapp/fix_bgp_evpn_pi

bgpd: clarify evpn datastruct use for SA

4 years agoMerge pull request #5214 from donaldsharp/vrrp_doc
Renato Westphal [Thu, 24 Oct 2019 00:00:25 +0000 (21:00 -0300)]
Merge pull request #5214 from donaldsharp/vrrp_doc

doc: Update supported platforms matrix w/ vrrpd

4 years agoMerge pull request #5202 from Orange-OpenSource/isis-TE
Renato Westphal [Wed, 23 Oct 2019 23:59:29 +0000 (20:59 -0300)]
Merge pull request #5202 from Orange-OpenSource/isis-TE

isisd: Correct missing advertisement of TE parameters

4 years agostaticd: check tuple (vrf, name) when interface events received
Philippe Guibert [Wed, 23 Oct 2019 14:53:09 +0000 (16:53 +0200)]
staticd: check tuple (vrf, name) when interface events received

with network namespace vrf backend, there is possibilities that the same
interface name can be used across two different vrfs. Then, enforce the
check when static daemon receives interface events. Adding to the
interface name, check for the vrf id, too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: clarify evpn datastruct use for SA
Mark Stapp [Wed, 23 Oct 2019 15:56:35 +0000 (11:56 -0400)]
bgpd: clarify evpn datastruct use for SA

Clear up an SA report by clarifying a function call in the evpn
code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: Update supported platforms matrix w/ vrrpd
Donald Sharp [Wed, 23 Oct 2019 13:11:45 +0000 (09:11 -0400)]
doc: Update supported platforms matrix w/ vrrpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5204 from ghasemnaddaf/vrrp_updates
Quentin Young [Tue, 22 Oct 2019 15:27:29 +0000 (11:27 -0400)]
Merge pull request #5204 from ghasemnaddaf/vrrp_updates

doc: vrrp vip must not be on parent interface

4 years agoMerge pull request #5193 from qlyoung/doc-release-fixes
Donatas Abraitis [Tue, 22 Oct 2019 06:57:12 +0000 (09:57 +0300)]
Merge pull request #5193 from qlyoung/doc-release-fixes

Document release procedure

4 years agodoc: vrrp vip must not be on parent interface
Ghasem Naddaf [Mon, 21 Oct 2019 21:58:16 +0000 (14:58 -0700)]
doc: vrrp vip must not be on parent interface

Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
4 years agovrrpd: fix startup error message reporting
Quentin Young [Mon, 21 Oct 2019 18:21:16 +0000 (18:21 +0000)]
vrrpd: fix startup error message reporting

Due to some extremely shoddy programming on my part, the error messages
for certain errors was pretty much always wrong. We would start with the
correct error message, then on the next check, regardless of whether it
passed or failed, we would null out the error message, then on the next
one set it again (to the wrong message), then null it, and just keep
alternating. So errors were sometimes not being reported, sometimes
being reported correctly (if the condition parity happened to match the
appropriate condition), and sometimes being reported correctly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoisisd: Correct missing advertisement of TE param.
Olivier Dugeon [Mon, 21 Oct 2019 16:39:15 +0000 (18:39 +0200)]
isisd: Correct missing advertisement of TE param.

Traffic Engineering parameters are correctly advertised in LSP when
'mpls-te on' CLI command is present in the startup config file.

However, if IS-IS is started without TE enable at startup and
'mpls-te on' command is issued after, TE link parameters are never
announced. The patch correct this issue.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agodoc: strip ws, shell -> console
Quentin Young [Mon, 21 Oct 2019 16:11:09 +0000 (16:11 +0000)]
doc: strip ws, shell -> console

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: Update documentation for access-list with sequence numbers
Donatas Abraitis [Mon, 21 Oct 2019 15:04:39 +0000 (18:04 +0300)]
doc: Update documentation for access-list with sequence numbers

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5108 from donaldsharp/sendbuffer_size_bgp
Donatas Abraitis [Sun, 20 Oct 2019 09:09:42 +0000 (12:09 +0300)]
Merge pull request #5108 from donaldsharp/sendbuffer_size_bgp

Sendbuffer size bgp

4 years agoMerge pull request #5184 from sworleys/Kernel-Route-Update
Mark Stapp [Sat, 19 Oct 2019 16:01:47 +0000 (12:01 -0400)]
Merge pull request #5184 from sworleys/Kernel-Route-Update

zebra: Rib Update Event Scheduler For Un-managed Routes, etc.

4 years agoMerge pull request #4850 from lkrishnamoor/show_cli
Russ White [Sat, 19 Oct 2019 01:30:37 +0000 (21:30 -0400)]
Merge pull request #4850 from lkrishnamoor/show_cli

bgpd: Adding new bgp evpn cli's for ip-prefix lookup

4 years agozebra: On if down/addr-del, process kernel routes
Stephen Worley [Thu, 17 Oct 2019 19:44:08 +0000 (15:44 -0400)]
zebra: On if down/addr-del, process kernel routes

Since we don't have a daemon who's job is to handle kernel
routes and we don't get an explicit route delete anymore if
nexthops become unreachable from the kernel, zebra must
re-process kernel routes itself to make sure they are still valid.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Check active on OLD system/kernel routes
Stephen Worley [Thu, 17 Oct 2019 19:41:25 +0000 (15:41 -0400)]
zebra: Check active on OLD system/kernel routes

We can assume that system/kernel routes are valid indeed
if this is our first time procesing them. But since we don't
get explicit deletion events for kernel routes anymore, we
have to be prepared to process them if the nexthop becomes
unreachable for instance. Therefore, if the route is not NEW,
then don't assume its valid.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Handle rib updates as a thread event
Stephen Worley [Thu, 17 Oct 2019 19:38:54 +0000 (15:38 -0400)]
zebra: Handle rib updates as a thread event

If we need to batch process the rib (all tables or specific
vrf), do so as a scheduled thread event rather than immediately
handling it. Further, add context to the events so that you
narrow down to certain route types you want to reprocess.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agodoc: update release procedure docs
Quentin Young [Fri, 18 Oct 2019 18:38:09 +0000 (18:38 +0000)]
doc: update release procedure docs

Add a lot of detail and update some outdated stuff.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: fix messed up topotests docs
Quentin Young [Fri, 18 Oct 2019 18:49:41 +0000 (18:49 +0000)]
doc: fix messed up topotests docs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5180 from mjstapp/fix_nhrp_sa
Quentin Young [Fri, 18 Oct 2019 17:16:02 +0000 (13:16 -0400)]
Merge pull request #5180 from mjstapp/fix_nhrp_sa

nhrpd: clean up SA warning

4 years agoMerge pull request #5172 from donaldsharp/sa_clean_and_clean
Renato Westphal [Fri, 18 Oct 2019 02:14:31 +0000 (23:14 -0300)]
Merge pull request #5172 from donaldsharp/sa_clean_and_clean

Sa clean and clean

4 years agoMerge pull request #5182 from qlyoung/fix-doc-index-read-quanta
Renato Westphal [Fri, 18 Oct 2019 02:11:05 +0000 (23:11 -0300)]
Merge pull request #5182 from qlyoung/fix-doc-index-read-quanta

doc: fix read-quanta .. index copy-paste err

4 years agoMerge pull request #5181 from ghasemnaddaf/vrrp_updates
Quentin Young [Thu, 17 Oct 2019 22:55:08 +0000 (18:55 -0400)]
Merge pull request #5181 from ghasemnaddaf/vrrp_updates

vrrpd: use CS2MS instead of constant 10 everywhere

4 years agovrrpd: use CS2MS instead of constant 10 everywhere
Ghasem Naddaf [Wed, 16 Oct 2019 22:47:12 +0000 (15:47 -0700)]
vrrpd: use CS2MS instead of constant 10 everywhere

Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
vrrpd: use CS2MS instead of constant 10 everywhere

Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
4 years agonhrpd: clean up SA warning
Mark Stapp [Thu, 17 Oct 2019 13:52:51 +0000 (09:52 -0400)]
nhrpd: clean up SA warning

Try to signal to SA/clang more clearly to clean up an SA warning
in the nhrp-specific linkedlist code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: fix read-quanta .. index copy-paste err
Quentin Young [Thu, 17 Oct 2019 19:53:19 +0000 (19:53 +0000)]
doc: fix read-quanta .. index copy-paste err

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5179 from ashish12pant/large_comm
Donald Sharp [Thu, 17 Oct 2019 17:47:20 +0000 (13:47 -0400)]
Merge pull request #5179 from ashish12pant/large_comm

tests: bgp community and bgp large-community

4 years agoMerge pull request #5165 from donaldsharp/evpn_fixup
Sri Mohana Singamsetty [Thu, 17 Oct 2019 17:15:01 +0000 (10:15 -0700)]
Merge pull request #5165 from donaldsharp/evpn_fixup

bgpd: return created bgp_path_info

4 years agoMerge pull request #5171 from donaldsharp/remove_getrusage
Mark Stapp [Thu, 17 Oct 2019 16:26:28 +0000 (12:26 -0400)]
Merge pull request #5171 from donaldsharp/remove_getrusage

*: Allow disabling of `getrusage` calls

4 years agoMerge pull request #5150 from qlyoung/bgp-vector-io-4
Mark Stapp [Thu, 17 Oct 2019 14:57:47 +0000 (10:57 -0400)]
Merge pull request #5150 from qlyoung/bgp-vector-io-4

BGP vector I/O - Redux

4 years agoMerge pull request #5161 from sworleys/Fix-Rule-Dbl-Free
Mark Stapp [Thu, 17 Oct 2019 14:31:40 +0000 (10:31 -0400)]
Merge pull request #5161 from sworleys/Fix-Rule-Dbl-Free

lib,zebra: Fix PBR Rule Ifp Reference if Interface is Deleted

4 years agoMerge pull request #5175 from opensourcerouting/debug-nb-yang
Mark Stapp [Thu, 17 Oct 2019 14:07:05 +0000 (10:07 -0400)]
Merge pull request #5175 from opensourcerouting/debug-nb-yang

lib, vtysh: add new libyang option to the "debug northbound" command

4 years agoMerge pull request #5167 from mjstapp/test_nhrp_list_sa
Sri Mohana Singamsetty [Thu, 17 Oct 2019 05:22:05 +0000 (22:22 -0700)]
Merge pull request #5167 from mjstapp/test_nhrp_list_sa

nhrpd: be more careful in linkedlist macro

4 years agoMerge pull request #5176 from qlyoung/alpine-update-mpfr-dep
Donatas Abraitis [Thu, 17 Oct 2019 05:13:01 +0000 (08:13 +0300)]
Merge pull request #5176 from qlyoung/alpine-update-mpfr-dep

fix alpine 🎿🎿🎿 docker build 🛠️

4 years agotests: Add test cases for bgp community and large community
Ashish Pant [Thu, 17 Oct 2019 03:49:26 +0000 (09:19 +0530)]
tests: Add test cases for bgp community and large community

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Test cases to check functionality of bgp large community and
bgp community path attribute

4 years agotests: Update cli error list and retry function
Ashish Pant [Wed, 16 Oct 2019 23:48:50 +0000 (05:18 +0530)]
tests: Update cli error list and retry function

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add cli error returned for invalid bgp-community-list command

Fix retry function to avoid retries when expected is False

4 years agotests: Update bgp api for community and aggregate address
Ashish Pant [Wed, 16 Oct 2019 23:44:55 +0000 (05:14 +0530)]
tests: Update bgp api for community and aggregate address

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add support for not sending community data in bgp and update
aggregate address configuration code

4 years agotests: Add verify community list api
Ashish Pant [Wed, 16 Oct 2019 23:41:42 +0000 (05:11 +0530)]
tests: Add verify community list api

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Api checks if community list is present in the system or not

4 years agotests: Add step api in topojson
Ashish Pant [Wed, 16 Oct 2019 23:15:28 +0000 (04:45 +0530)]
tests: Add step api in topojson

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Print messages with a step number to log from test case

4 years agoalpine: clean up dep block
Quentin Young [Wed, 16 Oct 2019 20:38:27 +0000 (20:38 +0000)]
alpine: clean up dep block

Wrap to 80 cols...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoalpine: update mpfr3 -> mpfr4
Quentin Young [Wed, 16 Oct 2019 20:37:44 +0000 (20:37 +0000)]
alpine: update mpfr3 -> mpfr4

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agolib: silence compiler warning in the gRPC plugin
Renato Westphal [Wed, 16 Oct 2019 20:13:28 +0000 (17:13 -0300)]
lib: silence compiler warning in the gRPC plugin

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib, vtysh: add new libyang option to the "debug northbound" command
Renato Westphal [Wed, 16 Oct 2019 19:59:54 +0000 (16:59 -0300)]
lib, vtysh: add new libyang option to the "debug northbound" command

Guard the libyang debug messages under this command so that only
people interested on those messages will see them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agovtysh: remove DEFPY variable names
Renato Westphal [Wed, 16 Oct 2019 16:05:17 +0000 (13:05 -0300)]
vtysh: remove DEFPY variable names

Some DEFPY commands were copied to vtysh without being cleaned up
properly. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #5078 from lkrishnamoor/advertise-routes
Russ White [Wed, 16 Oct 2019 19:05:23 +0000 (15:05 -0400)]
Merge pull request #5078 from lkrishnamoor/advertise-routes

bgpd: Fix "show bgp l2vpn evpn neighbors x.x.x.x advertised-routes json"

4 years agoMerge pull request #5118 from lkrishnamoor/routes_json
Russ White [Wed, 16 Oct 2019 19:01:13 +0000 (15:01 -0400)]
Merge pull request #5118 from lkrishnamoor/routes_json

bgpd: Fix in "show bgp l2vpn evpn neighbors X.X.X.X routes json"

4 years agobgpd: In redistribution aspath cannot be NULL
Donald Sharp [Wed, 16 Oct 2019 15:03:49 +0000 (11:03 -0400)]
bgpd: In redistribution aspath cannot be NULL

Coverity has found a path where the attr.aspath may be NULL.

assert that the aspath is non-null so we can make this go away.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: zrt->table cannot crash here
Donald Sharp [Wed, 16 Oct 2019 14:33:19 +0000 (10:33 -0400)]
zebra: zrt->table cannot crash here

If we have a zrt data structure then we have a table pointer
as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Coverity SA doesn't trust the CLI
Donald Sharp [Wed, 16 Oct 2019 14:30:28 +0000 (10:30 -0400)]
lib: Coverity SA doesn't trust the CLI

Fix with some asserts to show Coverity SA that we mean
real(:trademark:) business.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: `struct bgp_path_info *`->attr must not be NULL
Donald Sharp [Wed, 16 Oct 2019 14:25:19 +0000 (10:25 -0400)]
bgpd: `struct bgp_path_info *`->attr must not be NULL

We make the assumption that ->attr is not NULL throughout
the code base.  We are totally inconsistent about application
of this though.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Add MRAI timer documentation to bgp docs
Donald Sharp [Wed, 16 Oct 2019 12:09:48 +0000 (08:09 -0400)]
doc: Add MRAI timer documentation to bgp docs

We were missing the bgp MRAI timer documentation.  Add it in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Check setsockopt return codes
Donald Sharp [Wed, 16 Oct 2019 11:58:44 +0000 (07:58 -0400)]
bgpd: Check setsockopt return codes

Let end user know that a setsockopt failed and we may
be experiencing degraded performance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Allow disabling of `getrusage` calls
Donald Sharp [Wed, 16 Oct 2019 17:19:09 +0000 (13:19 -0400)]
*: Allow disabling of `getrusage` calls

getrusage, in a heavily stressed system, can account for
signficant running time due to process switching to the kernel.
Allow the end-operator to specify `--disable-cpu-time` to
avoid this call.  Additionally we cause `show thread cpu` to
not show up if this is selected.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agonhrpd: be more careful with linked lists
Mark Stapp [Wed, 16 Oct 2019 12:51:43 +0000 (08:51 -0400)]
nhrpd: be more careful with linked lists

NHRPD has its own linked-list implementation, and one of the
apis is a little free and easy with pointers. Also be safer
with one list iteration operation.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: add documentation for write- and read-quanta
Quentin Young [Wed, 16 Oct 2019 14:41:54 +0000 (14:41 +0000)]
doc: add documentation for write- and read-quanta

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5155 from GalaxyGorilla/libyang_debug_logging
Donald Sharp [Wed, 16 Oct 2019 13:11:48 +0000 (09:11 -0400)]
Merge pull request #5155 from GalaxyGorilla/libyang_debug_logging

lib: Let libyang log everything possible

4 years agodoc: Add cli options for bgp to documentation
Donald Sharp [Fri, 4 Oct 2019 18:43:58 +0000 (14:43 -0400)]
doc: Add cli options for bgp to documentation

Document the bgp cli options.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Add ability to set tcp socket buffer size
Donald Sharp [Fri, 4 Oct 2019 18:33:01 +0000 (14:33 -0400)]
bgpd: Add ability to set tcp socket buffer size

Add -s X or --socket_size X to the bgp cli to allow
the end user to specify the outgoing bgp tcp kernel
socket buffer size.

It is recommended that this option is only used on
large scale operations.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Add getsockopt_so_recvbuf
Donald Sharp [Mon, 7 Oct 2019 15:31:33 +0000 (11:31 -0400)]
lib: Add getsockopt_so_recvbuf

Add a new function getsockopt_so_recvbuf which tells you the
operating systems receive buffer size.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5139 from donaldsharp/zebra_write_cmd_missing
Donatas Abraitis [Wed, 16 Oct 2019 11:18:17 +0000 (14:18 +0300)]
Merge pull request #5139 from donaldsharp/zebra_write_cmd_missing

lib, zebra: Fix last write command written

4 years agobgpd: return created bgp_path_info
Donald Sharp [Wed, 16 Oct 2019 11:01:20 +0000 (07:01 -0400)]
bgpd: return created bgp_path_info

In bgp_create_evpn_bgp_path_info we create a bgp_path_info
that should be returned since we need it later.

Found by Coverity Scan.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Let libyang log everything possible
GalaxyGorilla [Tue, 15 Oct 2019 11:15:22 +0000 (11:15 +0000)]
lib: Let libyang log everything possible

Currently libyang logs errors only (LY_LLERR by default), independent of
FRR's log level. This commit lets libyang log everything including all
sorts of debug logs (when libyang is built in 'Debug' mode). FRR's
logging infrastructure filters logs out according to the configured log
level.

There is a very small performance overhead involved, even when libyang
is build in 'Release' mode. This overhead is mainly affecting config
processing and barely measurable being around 0-3% of the processing
time without this change.

Signed-off-by: Sascha Kattelmann <sascha@netdef.org>
4 years agoMerge pull request #5097 from ton31337/fix/do_not_reconnect_if_prefix_overflow
Donald Sharp [Tue, 15 Oct 2019 20:18:19 +0000 (16:18 -0400)]
Merge pull request #5097 from ton31337/fix/do_not_reconnect_if_prefix_overflow

bgpd: Keep the session down if maximum-prefix is reached

4 years agoMerge pull request #5088 from pogojotz/revert-asm-equiv-in-MTYPE
Donald Sharp [Tue, 15 Oct 2019 19:49:31 +0000 (15:49 -0400)]
Merge pull request #5088 from pogojotz/revert-asm-equiv-in-MTYPE

lib: Revert usage of asm-code in MTYPE definitions

4 years agozebra: Don't bother ref'ing ifp in zebra_pbr_rule
Stephen Worley [Tue, 15 Oct 2019 19:39:49 +0000 (15:39 -0400)]
zebra: Don't bother ref'ing ifp in zebra_pbr_rule

If we only really use the ifp for the name, then
don't bother referencing the ifp. If that ifp is
freed, we don't expect zebra to handle the rules that
use it (that's pbrd's job), so it is going to be
pointing to unintialized memory when we decide to remove
that rule later. Thus, just keep the name in the data
and dont mess with pointer refs.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #5134 from sudhanshukumar22/bgp-snmp-issue
Quentin Young [Tue, 15 Oct 2019 19:33:38 +0000 (15:33 -0400)]
Merge pull request #5134 from sudhanshukumar22/bgp-snmp-issue

lib: changes for making snmp socket non-blocking

4 years agoMerge pull request #5145 from Spantik/2796
Quentin Young [Tue, 15 Oct 2019 19:27:51 +0000 (15:27 -0400)]
Merge pull request #5145 from Spantik/2796

lib: Clean up the index that is being used for storing FD and events.

4 years agozebra: Use the rule ifindex as a hash key, not ifp
Stephen Worley [Tue, 15 Oct 2019 18:50:10 +0000 (14:50 -0400)]
zebra: Use the rule ifindex as a hash key, not ifp

Use the ifindex value as a primary hash key/identifier, not
the ifp pointer. It is possible for that data to be freed
and then we would not be able to hash and find the rule entry
anymore. Using the ifindex, we can still find the rule even
if the interface is removed.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Use ifindex_t for struct pbr_rule
Stephen Worley [Tue, 15 Oct 2019 18:48:33 +0000 (14:48 -0400)]
lib: Use ifindex_t for struct pbr_rule

We should be using the ifindex_t typedef here for the
type, not uint32_t.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Only free if rule was found/release in table
Stephen Worley [Tue, 15 Oct 2019 17:42:15 +0000 (13:42 -0400)]
zebra: Only free if rule was found/release in table

We were seeing a double free on shutdown if the
hash release fails here due to the interface state
changing. We probably shouldn't free the data if its
still being handled in the table so adding a check there
and a debug message.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib, zebra: Fix last write command written
Donald Sharp [Fri, 11 Oct 2019 12:56:39 +0000 (08:56 -0400)]
lib, zebra: Fix last write command written

With commit: a9ff90c41b0a95195d19d451ee83eb460e1599d0
the vrf_id_t was changed from a uint16_t to a uint32_t

Zebra tracked the last command sent to it's peer via peeking
into the data it was sending to each client ( since we had
lost the idea of what the command was when it was time to track
the data ).

Add a define to track this and add a bit of verbiage
to the code to allow us to notice when we screw with
the header again so that this is just fixed correctly
when it happens again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5153 from opensourcerouting/fix_libyang_warning
Donald Sharp [Tue, 15 Oct 2019 18:38:04 +0000 (14:38 -0400)]
Merge pull request #5153 from opensourcerouting/fix_libyang_warning

lib: fix harmless lyd_schema_sort() warning

4 years agobgpd: speak soothing words to scanbuild
Quentin Young [Tue, 15 Oct 2019 18:25:02 +0000 (18:25 +0000)]
bgpd: speak soothing words to scanbuild

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5156 from donaldsharp/soft_reconfig_the_peer
Russ White [Tue, 15 Oct 2019 15:37:07 +0000 (11:37 -0400)]
Merge pull request #5156 from donaldsharp/soft_reconfig_the_peer

bgpd: Soft reconfig-in should find the right bgp_path_info

4 years agoMerge pull request #5022 from chiragshah6/mdev
Russ White [Tue, 15 Oct 2019 15:34:22 +0000 (11:34 -0400)]
Merge pull request #5022 from chiragshah6/mdev

bgpd: evpn fix advertise-svi-ip display in show commands

4 years agoMerge pull request #5152 from donaldsharp/evpn_es_not_locking
Russ White [Tue, 15 Oct 2019 15:09:12 +0000 (11:09 -0400)]
Merge pull request #5152 from donaldsharp/evpn_es_not_locking

Some bgp evpn fixes

4 years agobgpd: Soft reconfig-in should find the right bgp_path_info
Donald Sharp [Tue, 15 Oct 2019 12:27:22 +0000 (08:27 -0400)]
bgpd: Soft reconfig-in should find the right bgp_path_info

When using soft reconfiguration inbound we are storing packet
data on the side for replaying when necessary.  The problem here
is that we are just grabbing the first bgp_path_info and using
that as the base.  What happens when we have soft-reconfig turned
on with multiple bgp_path_info's for a path?  This was introduced
in commit 8692c506520f6b268525b80890702432c95f13c4, yes back
in 2012!  I would argue, though, that it was just broken
in a different way before this.

Choose the correct bgp_path_info that corresponds to the peer
we received the data from for rethinking.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5119 from lkrishnamoor/community-list
Donatas Abraitis [Tue, 15 Oct 2019 10:35:27 +0000 (13:35 +0300)]
Merge pull request #5119 from lkrishnamoor/community-list

bgpd: Implement "sh bgp l2vpn evpn community|large-community X"

4 years agolib: Clean up the index that is being used for storing FD and events.
Spantik [Mon, 14 Oct 2019 12:17:29 +0000 (05:17 -0700)]
lib: Clean up the index that is being used for storing FD and events.

When POLLNVAL is received for a FD then that FD is removed from the
pfd array and also array is rearranged using memmove. When memmove
is used then unused index are not cleanedup. When a new FD takes
up that index then it ends up using stale events without any handler
set for the same.

Signed-off-by: Santosh P K <sapk@vmware.com>
4 years agobgpd: Implement "sh bgp l2vpn evpn community|large-community X"
Lakshman Krishnamoorthy [Mon, 7 Oct 2019 21:58:39 +0000 (14:58 -0700)]
bgpd: Implement "sh bgp l2vpn evpn community|large-community X"

Full output here: https://github.com/FRRouting/frr/pull/5119

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agoMerge pull request #5130 from donaldsharp/as_path_json_maximum_overdrive
Donatas Abraitis [Tue, 15 Oct 2019 06:14:16 +0000 (09:14 +0300)]
Merge pull request #5130 from donaldsharp/as_path_json_maximum_overdrive

bgpd: AS paths are uint32_t instead of integers

4 years agoMerge pull request #5128 from chiragshah6/yang_dev
Renato Westphal [Tue, 15 Oct 2019 01:40:59 +0000 (22:40 -0300)]
Merge pull request #5128 from chiragshah6/yang_dev

yang: zebra modules formatting

4 years agolib: fix harmless lyd_schema_sort() warning
Renato Westphal [Tue, 15 Oct 2019 01:20:24 +0000 (22:20 -0300)]
lib: fix harmless lyd_schema_sort() warning

The dnode member of the nb_config structure can be null on
daemons that don't implement any YANG module. As such, update
the nb_cli_show_config_prepare() function to always check if the
libyang data node that is going to be displayed is null or not
before operating on it.

This fixes the following warning (introduced by commit 5e6a9350c1):
libyang: Invalid arguments (lyd_schema_sort())

Reported-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agobgpd: Be careful about displaying vni's as labels.
Donald Sharp [Tue, 15 Oct 2019 01:09:55 +0000 (21:09 -0400)]
bgpd: Be careful about displaying vni's as labels.

When a type 2/3 or 5 route is received, verified and the
resulting route generated is pushed into the appropriate vrf
the vni's associated with the route are also passed in.
This is showing up as a Remote label when you dump
the route in bgp:

BGP routing table entry for 0.0.0.0/0^M
Paths: (1 available, best #1, table third)
   Advertised to non peer-group peers:
   10.10.120.22
   42001 42005 42006 42055
     10.10.120.22 from 10.10.120.22 (10.10.255.193)
       Origin IGP, valid, external, bestpath-from-AS 42001, best
       Remote label: 62750
       AddPath ID: RX 0, TX 2
       Last update: Fri Oct 11 12:59:56 2019

The `Remote label: 62750` is the mpls label version of the
vni passed in.  This is meaningless and confusing to the end
user.  Do not display this information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Refactor bgp_path_info creation
Donald Sharp [Tue, 15 Oct 2019 01:05:15 +0000 (21:05 -0400)]
bgpd: Refactor bgp_path_info creation

We are doing the same thing in multiple places.  Refactor.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Properly lock parent node for type4 routes
Donald Sharp [Tue, 15 Oct 2019 00:44:56 +0000 (20:44 -0400)]
bgpd: Properly lock parent node for type4 routes

When creating a bgp_path_info for a type 4 route the pi->extra->parent
and the route node for the originating table were not being locked
properly.  This will prevent BGP from not properly cleaning up
the data structures on cleanup.

Possibly every one of the functions that we use to create the
new bgp_path_info's should use an abstracted version of this code,
but I am unsure at this point in time if a type 4 should use the same
or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5083 from zays26/feature/vtysh-master
Quentin Young [Mon, 14 Oct 2019 19:34:44 +0000 (15:34 -0400)]
Merge pull request #5083 from zays26/feature/vtysh-master

vtysh: fix searching commands in parent nodes

4 years agoMerge pull request #5148 from qlyoung/fix-bgp-read-assert
Lou Berger [Mon, 14 Oct 2019 18:45:03 +0000 (14:45 -0400)]
Merge pull request #5148 from qlyoung/fix-bgp-read-assert

bgpd: move assert out of error case

4 years agobgpd: raise default & max r/w quanta to 64
Quentin Young [Mon, 7 Oct 2019 17:33:39 +0000 (17:33 +0000)]
bgpd: raise default & max r/w quanta to 64

Vectored writes are more efficient with a higher quantum.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: vector I/O
Quentin Young [Fri, 4 Oct 2019 18:52:24 +0000 (18:52 +0000)]
bgpd: vector I/O

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: move assert out of error case
Quentin Young [Mon, 14 Oct 2019 16:09:36 +0000 (16:09 +0000)]
bgpd: move assert out of error case

bgp_process_packets has an assert to make sure an appropriate amount of
working space in the input buffer has been freed up for future reads.
However, this assert shouldn't be made when we have encountered an error
that's going to tear down the session, because in this case we may not
be able to process the full contents of the input buffer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5132 from sworleys/Fix-IF-Infinite-Loop
Russ White [Mon, 14 Oct 2019 18:21:19 +0000 (14:21 -0400)]
Merge pull request #5132 from sworleys/Fix-IF-Infinite-Loop

*: Fix Interface Infinite Loop Walk and Cleanup if_create Codepath

4 years agoRevert "Merge pull request #4885 from satheeshkarra/pim_mlag"
Quentin Young [Mon, 14 Oct 2019 17:15:09 +0000 (17:15 +0000)]
Revert "Merge pull request #4885 from satheeshkarra/pim_mlag"

This reverts commit d563896dada99f3474d428f928786cbfde936fee, reversing
changes made to 09ea1a40386f02a13cdb0462cc55af0d03f0c277.