]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years ago*: fix source file headers & includes for errcodes
Quentin Young [Tue, 19 Jun 2018 20:58:44 +0000 (20:58 +0000)]
*: fix source file headers & includes for errcodes

* Use the correct license header
* Stop headers from including themselves
* Use uniform relative include conventions
* Ensure that sources include what they use
* Turn off clang-format around struct array blocks

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoospfd: zlog_ferr facility
Chirag Shah [Tue, 19 Jun 2018 20:41:28 +0000 (16:41 -0400)]
ospfd: zlog_ferr facility

Ticket:CM-21333

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Convert zlog_err for clippy build
Donald Sharp [Tue, 19 Jun 2018 20:28:45 +0000 (16:28 -0400)]
lib: Convert zlog_err for clippy build

The clippy code does not need to log the error messages
as errors as that it is only run as part of the build
itself and as long as we see the notifications we are good.

So convert zlog_err to zlog_notice so that we do not think
we have any zlog_err's in lib anymore

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Remove unnecessary zebra.h include
Donald Sharp [Tue, 19 Jun 2018 20:28:04 +0000 (16:28 -0400)]
lib: Remove unnecessary zebra.h include

lib_errors.c does not need to include zebra.h, so remove

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripd: Add RIP_ERR_XXX to move from zlog_err to zlog_ferr
Donald Sharp [Tue, 19 Jun 2018 20:13:45 +0000 (16:13 -0400)]
ripd: Add RIP_ERR_XXX to move from zlog_err to zlog_ferr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agowatchfrr: Add WATCHFRR_ERR_XXX for zlog_err to zlog_ferr
Donald Sharp [Tue, 19 Jun 2018 19:59:44 +0000 (15:59 -0400)]
watchfrr: Add WATCHFRR_ERR_XXX for zlog_err to zlog_ferr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Fix Spelling mistake
Donald Sharp [Tue, 19 Jun 2018 19:50:55 +0000 (15:50 -0400)]
lib: Fix Spelling mistake

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrpd: Add EIGRP_ERR_XXX for zlog_err to zlog_ferr
Donald Sharp [Tue, 19 Jun 2018 19:39:45 +0000 (15:39 -0400)]
eigrpd: Add EIGRP_ERR_XXX for zlog_err to zlog_ferr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agonhrpd: Add NHRP_ERR_XXXX for zlog_err to zlog_ferr conversion
Donald Sharp [Tue, 19 Jun 2018 19:28:01 +0000 (15:28 -0400)]
nhrpd: Add NHRP_ERR_XXXX for zlog_err to zlog_ferr conversion

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Add some FLowspec specific Error Codes.
Donald Sharp [Tue, 19 Jun 2018 18:57:19 +0000 (14:57 -0400)]
bgpd: Add some FLowspec specific Error Codes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Convert to using LIB_ERR_XXX where possible
Donald Sharp [Tue, 19 Jun 2018 18:42:55 +0000 (14:42 -0400)]
bgpd: Convert to using LIB_ERR_XXX where possible

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra, lib: error references for zebra
Quentin Young [Tue, 19 Jun 2018 18:29:05 +0000 (18:29 +0000)]
zebra, lib: error references for zebra

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoisisd: Cleanup compile issue
Donald Sharp [Tue, 19 Jun 2018 14:52:08 +0000 (10:52 -0400)]
isisd: Cleanup compile issue

cleanup compile with missnamed enum usage.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: Add isis_errors and generate custom Error Codes
Donald Sharp [Mon, 18 Jun 2018 18:56:15 +0000 (14:56 -0400)]
isisd: Add isis_errors and generate custom Error Codes

Generate appropriate error codes for ISIS.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: Convert to use LIB_ERR_XXX
Donald Sharp [Mon, 18 Jun 2018 18:27:21 +0000 (14:27 -0400)]
isisd: Convert to use LIB_ERR_XXX

Where an obvious choice could be made about converting
to a LIB_ERR_XXX function do so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobabeld: Convert all zlog_err to zlog_ferr and add appropriate info
Donald Sharp [Mon, 18 Jun 2018 18:08:34 +0000 (14:08 -0400)]
babeld: Convert all zlog_err to zlog_ferr and add appropriate info

Convert babeld to use zlog_ferr and add appropriate BABEL_ERR_XXX
information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobabeld: Add BABEL_ERR_XXX error messages.
Donald Sharp [Mon, 18 Jun 2018 17:38:21 +0000 (13:38 -0400)]
babeld: Add BABEL_ERR_XXX error messages.

Add some BABEL_ERR_XXX error messages and convert over to using
zlog_ferr instead of zlog_err.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add pim_errors and define some pim specific errors
Donald Sharp [Mon, 18 Jun 2018 17:21:27 +0000 (13:21 -0400)]
pimd: Add pim_errors and define some pim specific errors

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Cleanup initialization of bgp_errors.c
Donald Sharp [Mon, 18 Jun 2018 17:06:31 +0000 (13:06 -0400)]
bgpd: Cleanup initialization of bgp_errors.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: implement zlog_ferr facility for enhance error messages in bgp
Don Slice [Fri, 15 Jun 2018 21:08:53 +0000 (21:08 +0000)]
bgpd: implement zlog_ferr facility for enhance error messages in bgp

Signed-off-by: Don Slice <dslice@cumulusnetworks.com<
5 years agoldpd: Convert to using LIB_ERR_XXX and zlog_ferr
Donald Sharp [Mon, 18 Jun 2018 14:59:27 +0000 (10:59 -0400)]
ldpd: Convert to using LIB_ERR_XXX and zlog_ferr

convert ldpd over to using zlog_ferr and LIB_ERR_XXX
where appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrpd: Convert to use LIB_ERR_XXX for zlog_err
Donald Sharp [Mon, 18 Jun 2018 14:58:43 +0000 (10:58 -0400)]
eigrpd: Convert to use LIB_ERR_XXX for zlog_err

Convert, where appropriate, to using LIB_ERR_XXX for zlog_ferr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Update error ranges to include all daemons
Donald Sharp [Mon, 18 Jun 2018 14:45:27 +0000 (10:45 -0400)]
lib: Update error ranges to include all daemons

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Convert over to use LIB_ERR_XXX for zlog_err
Donald Sharp [Mon, 18 Jun 2018 14:17:36 +0000 (10:17 -0400)]
pimd: Convert over to use LIB_ERR_XXX for zlog_err

Convert, where appropriate, the zlog_err functions to zlog_ferr
for the LIB_ERR_XXX enums

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripngd: Convert over to using LIB_ERR_XXXX for zlog_ferr
Donald Sharp [Mon, 18 Jun 2018 14:05:16 +0000 (10:05 -0400)]
ripngd: Convert over to using LIB_ERR_XXXX for zlog_ferr

Convert over those zlog_err functions to zlog_ferr that
are appropriate for the LIB_ERR_XXX.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripd: Convert zlog_err to zlog_ferr for LIB_ERR_XXX
Donald Sharp [Mon, 18 Jun 2018 13:50:29 +0000 (09:50 -0400)]
ripd: Convert zlog_err to zlog_ferr for LIB_ERR_XXX

For those errors that can be traced to LIB_ERR_XXX
convert to using those in ripd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospf6d: Update OSPFv3 to use new zlog_ferr
Donald Sharp [Mon, 18 Jun 2018 13:46:19 +0000 (09:46 -0400)]
ospf6d: Update OSPFv3 to use new zlog_ferr

Update OSPFv3 to use the new zlog_ferr messages

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Cleanup some missed LIB_ERR_SYSTEM_CALL
Donald Sharp [Mon, 18 Jun 2018 13:29:27 +0000 (09:29 -0400)]
lib: Cleanup some missed LIB_ERR_SYSTEM_CALL

libfrr.c had some detection for system call issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add LIB_ERR_ZMQ
Donald Sharp [Mon, 18 Jun 2018 13:25:03 +0000 (09:25 -0400)]
lib: Add LIB_ERR_ZMQ

Add new error event for when we detect an issue within
the ZMQ subsystem.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add LIB_ERR_DEVELOPMENT
Donald Sharp [Mon, 18 Jun 2018 13:13:37 +0000 (09:13 -0400)]
lib: Add LIB_ERR_DEVELOPMENT

Sometimes a error state is detected when we have added
new code to FRR, but not updated all the places that
we should have.  Consider this a developmental escape
that needs to be fixed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add LIB_ERR_NS to error subsystem
Donald Sharp [Mon, 18 Jun 2018 12:55:06 +0000 (08:55 -0400)]
lib: Add LIB_ERR_NS to error subsystem

Add additional information about NameSpace errors that
may happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib, zebra: Add LIB_ERR_INTERFACE
Donald Sharp [Mon, 18 Jun 2018 12:49:36 +0000 (08:49 -0400)]
lib, zebra: Add LIB_ERR_INTERFACE

Add a error type that allows us to track bad interface states.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd, lib, zebra: Convert LIB_ERR_PRIVILEGES
Donald Sharp [Thu, 14 Jun 2018 14:38:40 +0000 (10:38 -0400)]
bgpd, lib, zebra: Convert LIB_ERR_PRIVILEGES

For all the places we zlog_err about raising/lowering privileges, use
zlog_ferr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add LIB_ERR_SNMP
Donald Sharp [Thu, 14 Jun 2018 13:35:09 +0000 (09:35 -0400)]
lib: Add LIB_ERR_SNMP

Add code to indicate a SNMP error of some sort that needs to be
handled and addressed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add LIB_ERR_VTY
Donald Sharp [Thu, 14 Jun 2018 13:21:11 +0000 (09:21 -0400)]
lib: Add LIB_ERR_VTY

Add a error code for when the vty subsystem detects
an error.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add LIB_ERR_SYSTEM_CALL and convert VRF_SOCKET to SOCKET
Donald Sharp [Thu, 14 Jun 2018 13:13:18 +0000 (09:13 -0400)]
lib: Add LIB_ERR_SYSTEM_CALL and convert VRF_SOCKET to SOCKET

Add a new error code LIB_ERR_SYSTEM_CALL to the ferr subsystem.
Additionally convert LIB_ERR_VRF_SOCKET to a more generic
LIB_ERR_SOCKET.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: When logging commands do not use zlog_err
Donald Sharp [Thu, 14 Jun 2018 13:02:49 +0000 (09:02 -0400)]
lib: When logging commands do not use zlog_err

When we are logging a commands via the `log commands`
cli, use zlog_notice instead of zlog_err, since that
this is not an actual error situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
5 years agolib: Convert to zlog_ferr for zclient.c
Donald Sharp [Thu, 14 Jun 2018 12:56:27 +0000 (08:56 -0400)]
lib: Convert to zlog_ferr for zclient.c

Convert the zclient.c file to use zlog_ferr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib, bgpd: Add code to make lib auto create the ferr infrastructure
Donald Sharp [Thu, 14 Jun 2018 12:23:49 +0000 (08:23 -0400)]
lib, bgpd: Add code to make lib auto create the ferr infrastructure

Add code to auto-create the ferr infrastructure as well as add
some initial error handling for vrf.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Allow adding arrays of ferr's
Donald Sharp [Thu, 14 Jun 2018 11:57:39 +0000 (07:57 -0400)]
lib: Allow adding arrays of ferr's

Simplify addition of new messages to the system by allow passage of
arrays of data, instead of one at a time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: add error reference system
Quentin Young [Wed, 13 Jun 2018 23:08:30 +0000 (23:08 +0000)]
lib: add error reference system

* Add zlog_* function to log with a reference code
* Add ability to track reference cards for errors to ferr.[ch]
* Assign some reference code ranges

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: Add missing flowspec.rst to distribution tar file
Martin Winter [Sat, 11 Aug 2018 23:39:35 +0000 (16:39 -0700)]
doc: Add missing flowspec.rst to distribution tar file

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #2805 from opensourcerouting/malloc-size
Quentin Young [Tue, 14 Aug 2018 15:43:39 +0000 (11:43 -0400)]
Merge pull request #2805 from opensourcerouting/malloc-size

lib: track total memory per MTYPE if possible

5 years agoMerge pull request #2294 from opensourcerouting/bfd-final
Donald Sharp [Tue, 14 Aug 2018 12:57:44 +0000 (08:57 -0400)]
Merge pull request #2294 from opensourcerouting/bfd-final

bfdd: add BFD support

5 years agoMerge branch 'master' into bfd-final
Donald Sharp [Tue, 14 Aug 2018 12:16:10 +0000 (08:16 -0400)]
Merge branch 'master' into bfd-final

5 years agoMerge pull request #2823 from opensourcerouting/snap-staticd
Donald Sharp [Tue, 14 Aug 2018 11:48:15 +0000 (07:48 -0400)]
Merge pull request #2823 from opensourcerouting/snap-staticd

Updates to snap package to support staticd

5 years agoMerge pull request #2833 from opensourcerouting/assorted-fixes
Donald Sharp [Tue, 14 Aug 2018 00:24:57 +0000 (20:24 -0400)]
Merge pull request #2833 from opensourcerouting/assorted-fixes

Assorted fixes (pre-northbound)

5 years agoMerge pull request #2832 from opensourcerouting/rm-debug-leftovers
Donald Sharp [Mon, 13 Aug 2018 23:05:36 +0000 (19:05 -0400)]
Merge pull request #2832 from opensourcerouting/rm-debug-leftovers

zebra: remove unguarded debugging leftovers

5 years agolib, vtysh: fix inconsistent interface commands in vtysh
Renato Westphal [Mon, 9 Jul 2018 00:39:37 +0000 (21:39 -0300)]
lib, vtysh: fix inconsistent interface commands in vtysh

The definition of the interface commands in vtysh.c were outdated.
Currently, all daemons that call if_cmd_init() will have the "no interface
IFNAME" command and the "[no] description" commands as well, so there's
no need to define exceptions for these commands anymore.

To fix this, make extract.pl parse the if.c file so that vtysh can get the
interface commands from there automatically. Only the "interface IFNAME
[vrf NAME]" must be kept in vtysh.c because it changes the vty node and
thus needs special treatment.

Finally, make pimd and pbrd display interface descriptions on "sh run"
when they are configured.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib, vtysh: fix inconsistent VRF commands in vtysh
Renato Westphal [Mon, 9 Jul 2018 00:16:47 +0000 (21:16 -0300)]
lib, vtysh: fix inconsistent VRF commands in vtysh

* Only zebra and pimd call vrf_cmd_init(), so these are the only daemons
  that should receive VRF commands from vtysh;
* "netns NAME" and "no netns NAME" are available only in zebra, write
  custom DEFSHs in vtysh to make it aware of that;
* Remove the "no vrf NAME" definition from vtysh.c and expose the
  original command to vtysh by converting the DEFUN_NOSH to a simple
  DEFUN. This command doesn't change the vty node so there's no need to
  special case it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agozebra: fix "no pseudowire IFNAME" on vtysh
Renato Westphal [Sun, 8 Jul 2018 22:18:58 +0000 (19:18 -0300)]
zebra: fix "no pseudowire IFNAME" on vtysh

We must hide only "pseudowire IFNAME" from vtysh, the "no" form of the
command should be made available to the extract.pl script. Split the
command into two to fix this problem.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoldpd: use DEFPY_NOSH whenever possible
Renato Westphal [Sun, 8 Jul 2018 23:31:43 +0000 (20:31 -0300)]
ldpd: use DEFPY_NOSH whenever possible

All ldpd commands were written using DEFPY except the ones that needed
to be ignored by vtysh, in which case we were using DEFUN_NOSH. Now that
DEFPY_NOSH is available, convert the remaining commands for consistency
and to simplify the code a little bit.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: implement DEFPY_NOSH
Renato Westphal [Sun, 8 Jul 2018 22:02:36 +0000 (19:02 -0300)]
lib: implement DEFPY_NOSH

This is the DEFPY equivalent of DEFUN_NOSH.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobabeld: avoid reading the configuration file twice
Renato Westphal [Mon, 2 Jul 2018 01:08:02 +0000 (22:08 -0300)]
babeld: avoid reading the configuration file twice

The frr_config_fork() function called by all FRR daemons during
initialization already takes care of reading the startup configuration
file.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: add listnode_add_head()
Renato Westphal [Mon, 28 May 2018 13:15:09 +0000 (10:15 -0300)]
lib: add listnode_add_head()

Provide a new convenience function that adds an element to the beginning
of a list.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agosnapcraft: Add new staticd to snap package
Martin Winter [Sat, 11 Aug 2018 23:44:27 +0000 (16:44 -0700)]
snapcraft: Add new staticd to snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agovtysh: Fix missing tailing / in --config_dir option parsing
Martin Winter [Mon, 13 Aug 2018 21:52:21 +0000 (14:52 -0700)]
vtysh: Fix missing tailing / in --config_dir option parsing

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agozebra: remove unguarded debugging leftovers
Renato Westphal [Mon, 13 Aug 2018 21:53:45 +0000 (18:53 -0300)]
zebra: remove unguarded debugging leftovers

These debug messages were committed by accident.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #2830 from pacovn/Coverity_1221459_revert
David Lamparter [Mon, 13 Aug 2018 19:05:34 +0000 (21:05 +0200)]
Merge pull request #2830 from pacovn/Coverity_1221459_revert

ospf6d: revert fix for Coverity 1221459

5 years agoMerge pull request #2820 from opensourcerouting/err-prep
Quentin Young [Mon, 13 Aug 2018 18:56:56 +0000 (14:56 -0400)]
Merge pull request #2820 from opensourcerouting/err-prep

remove alloc return value checks + minor babeld cleanup

5 years agoospf6d: revert fix for Coverity 1221459
F. Aragon [Mon, 13 Aug 2018 17:46:56 +0000 (19:46 +0200)]
ospf6d: revert fix for Coverity 1221459

The correction in commit 7edb6aa (PR #2502) was wrong, as it is was not
taking in consideration the unlock counter. Thanks to @eqvinox for noticing
it.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2827 from pacovn/Coverity_1472310_Unchecked_return_value
Quentin Young [Mon, 13 Aug 2018 17:22:17 +0000 (13:22 -0400)]
Merge pull request #2827 from pacovn/Coverity_1472310_Unchecked_return_value

bgpd: return value check (Coverity 1472310)

5 years agoMerge pull request #2828 from pacovn/Coverity_1472311_null_check
Rafael Zalamena [Mon, 13 Aug 2018 17:09:31 +0000 (14:09 -0300)]
Merge pull request #2828 from pacovn/Coverity_1472311_null_check

staticd: null check (Coverity 1472311)

5 years agoMerge pull request #2825 from dslicenc/frr-reload-vni
David Lamparter [Mon, 13 Aug 2018 17:04:52 +0000 (19:04 +0200)]
Merge pull request #2825 from dslicenc/frr-reload-vni

tools: correct frr-reload.py handling of bgp vni/exit-vni config

5 years agoMerge pull request #2824 from vishaldhingra/reg_case
David Lamparter [Mon, 13 Aug 2018 17:04:13 +0000 (19:04 +0200)]
Merge pull request #2824 from vishaldhingra/reg_case

peer_delete did not trigger ZEBRA_NEXTHOP_UNREGISTER to ZEBRA

5 years agostaticd: null check (Coverity 1472311)
F. Aragon [Mon, 13 Aug 2018 16:10:09 +0000 (18:10 +0200)]
staticd: null check (Coverity 1472311)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: return value check (Coverity 1472310)
F. Aragon [Mon, 13 Aug 2018 16:05:42 +0000 (18:05 +0200)]
bgpd: return value check (Coverity 1472310)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agopeer_delete did not trigger ZEBRA_NEXTHOP_UNREGISTER to ZEBRA
vishaldhingra [Fri, 10 Aug 2018 13:00:17 +0000 (06:00 -0700)]
peer_delete did not trigger ZEBRA_NEXTHOP_UNREGISTER to ZEBRA

bgp_unlink_nexthop_check() PEER should be NULL and bgp_info list count should be 0

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agodoc: Add missing flowspec.rst to distribution tar file
Martin Winter [Sat, 11 Aug 2018 23:39:35 +0000 (16:39 -0700)]
doc: Add missing flowspec.rst to distribution tar file

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agobabeld: Use enum instead of #defines for kernel route type information
Donald Sharp [Mon, 18 Jun 2018 17:42:21 +0000 (13:42 -0400)]
babeld: Use enum instead of #defines for kernel route type information

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Cleanup assumption that ALLOC could fail.
Donald Sharp [Tue, 19 Jun 2018 20:17:09 +0000 (16:17 -0400)]
tests: Cleanup assumption that ALLOC could fail.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Remove memory check test
Donald Sharp [Mon, 18 Jun 2018 13:18:10 +0000 (09:18 -0400)]
lib: Remove memory check test

Found a missed memory check test that can just be removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripd: re-add check for rip_create fail
Quentin Young [Wed, 18 Jul 2018 16:52:50 +0000 (16:52 +0000)]
ripd: re-add check for rip_create fail

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: ALLOC calls cannot fail
Donald Sharp [Thu, 14 Jun 2018 12:58:05 +0000 (08:58 -0400)]
*: ALLOC calls cannot fail

There is no need to check for failure of a ALLOC call
as that any failure to do so will result in a assert
happening.  So we can safely remove all of this code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2809 from opensourcerouting/routemap-rpki-fix
Quentin Young [Fri, 10 Aug 2018 20:42:37 +0000 (16:42 -0400)]
Merge pull request #2809 from opensourcerouting/routemap-rpki-fix

bgpd: Fix bgp rpki to match route-map update from PR #2697

5 years agotools/checkpatch: fix some bogus macro warnings
David Lamparter [Fri, 10 Aug 2018 18:45:41 +0000 (20:45 +0200)]
tools/checkpatch: fix some bogus macro warnings

checkpatch was throwing an error for "#define FOO , bar"

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools: correct frr-reload.py handling of bgp vni/exit-vni config
Don Slice [Thu, 9 Aug 2018 21:24:24 +0000 (21:24 +0000)]
tools: correct frr-reload.py handling of bgp vni/exit-vni config

Problem reported that when a peer-group was added in certain
configurations, it would be rejected because of the order of the
commands put in by nclu. Issued turned out to be how frr-reload.py
was handling the sub-sub-context of the vni under the address-family
and subsequently how it handled the following exit-vni.

Ticket: CM-21996
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agodoc: add "show memory" user documentation
David Lamparter [Wed, 8 Aug 2018 15:06:45 +0000 (17:06 +0200)]
doc: add "show memory" user documentation

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #2806 from opensourcerouting/vty-term-fd
Quentin Young [Thu, 9 Aug 2018 16:43:02 +0000 (12:43 -0400)]
Merge pull request #2806 from opensourcerouting/vty-term-fd

lib: fix "-t" command line option

5 years agoMerge pull request #2812 from manuhalo/fix-staticd-coverity
David Lamparter [Thu, 9 Aug 2018 13:40:21 +0000 (15:40 +0200)]
Merge pull request #2812 from manuhalo/fix-staticd-coverity

staticd: Fix null pointer access (coverity 1472311)

5 years agostaticd: Fix null pointer access (coverity 1472311)
Emanuele Di Pascale [Thu, 9 Aug 2018 12:26:55 +0000 (14:26 +0200)]
staticd: Fix null pointer access (coverity 1472311)

Aded a check to ensure that if_is_vrf() is not called on a NULL if pointer.
Incidentally this was causing PR #2805 to fail.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #2807 from mjstapp/configure_help_fixes
Renato Westphal [Thu, 9 Aug 2018 01:01:50 +0000 (22:01 -0300)]
Merge pull request #2807 from mjstapp/configure_help_fixes

configure.ac : fix help text

5 years agobgpd: Fix bgp rpki to match route-map update from PR #2697
Martin Winter [Wed, 8 Aug 2018 22:08:22 +0000 (15:08 -0700)]
bgpd: Fix bgp rpki to match route-map update from PR #2697

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agobgpd/ospf(6)d/pimd: hide BFD commands with timers
Rafael Zalamena [Wed, 1 Aug 2018 18:24:52 +0000 (15:24 -0300)]
bgpd/ospf(6)d/pimd: hide BFD commands with timers

Don't show BFD commands with timers since it might confuse users
("show running-config" won't display timers in client daemons anymore),
but keep accepting this command from previous configurations.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: fix IPv6 peers using link-local address
Rafael Zalamena [Thu, 26 Jul 2018 01:44:41 +0000 (22:44 -0300)]
bfdd: fix IPv6 peers using link-local address

When using link-local address we must specify the scope-id for the
address in order to bind to the interface.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: clean-up bfd clients data on shutdown
Rafael Zalamena [Wed, 25 Jul 2018 16:39:58 +0000 (13:39 -0300)]
bfdd: clean-up bfd clients data on shutdown

On `zebra` / `bfdd` shutdown we now clean up all client data to avoid
memory leaks (ghost clients). This also prevents 'slow' shutdown on
`zebra` sparing us from seeing some rare topotests shutdown failures
(signal handler getting stopped by signal).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: improve logging messages
Rafael Zalamena [Wed, 25 Jul 2018 03:03:47 +0000 (00:03 -0300)]
bfdd: improve logging messages

Show a little more details, remove some duplicated calls and remove the
macro compatibility with old debugging functions.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: clean up header inclusion
Rafael Zalamena [Wed, 25 Jul 2018 02:03:41 +0000 (23:03 -0300)]
bfdd: clean up header inclusion

Most of the headers we need are included by zebra.h, so lets simplify
this.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: code refactory for simplification
Rafael Zalamena [Wed, 25 Jul 2018 01:32:36 +0000 (22:32 -0300)]
bfdd: code refactory for simplification

Simplify code and remove unnecessary log messages. The old log messages
are going to be shown by the caller anyway.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: free zebra clients data on unregistration
Rafael Zalamena [Wed, 11 Jul 2018 19:04:51 +0000 (16:04 -0300)]
bfdd: free zebra clients data on unregistration

Avoid a memory leak on client daemons restart by getting rid of old
registrations.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: send replay request on zebra connection
Rafael Zalamena [Wed, 11 Jul 2018 18:55:12 +0000 (15:55 -0300)]
bfdd: send replay request on zebra connection

This will make `bfdd` synchronize with its client when zebra dies or
bfdd is restarted.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: show single hop local-address
Rafael Zalamena [Wed, 11 Jul 2018 18:52:56 +0000 (15:52 -0300)]
bfdd: show single hop local-address

Show local-address on single hop when configured.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: smooth configuration transition
Rafael Zalamena [Tue, 10 Jul 2018 14:00:09 +0000 (11:00 -0300)]
bfdd: smooth configuration transition

After configuring a new value set the polling bit to negotiate speeds
again next transmission cycle.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: show the correct transmission speed
Rafael Zalamena [Tue, 10 Jul 2018 13:25:38 +0000 (10:25 -0300)]
bfdd: show the correct transmission speed

When configured transmission speed doesn't match the actual speed, show
the difference in the output.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: add documentation
Rafael Zalamena [Wed, 27 Jun 2018 17:24:40 +0000 (14:24 -0300)]
bfdd: add documentation

Add BFD daemon documentation:
* commands;
* man page;
* manual / description;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgpd/ospf(6)d/pimd: don't show BFD timers
Rafael Zalamena [Wed, 27 Jun 2018 16:46:08 +0000 (13:46 -0300)]
bgpd/ospf(6)d/pimd: don't show BFD timers

When BFD timers are configured, don't show it anymore in the daemon
side. This will help us migrate the timers command from daemons to
`bfdd`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: re-route PTM-BFD daemon messages
Rafael Zalamena [Wed, 27 Jun 2018 16:40:50 +0000 (13:40 -0300)]
bfdd: re-route PTM-BFD daemon messages

When `bfdd` is enabled - which it is by default - re-route the PTM-BFD
messages to the FRR's internal BFD daemon instead of the external
PTM daemon.

This will help the migration of BFD implementations and avoid
duplicating code.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: add vty shell commands
Rafael Zalamena [Wed, 27 Jun 2018 16:26:06 +0000 (13:26 -0300)]
bfdd: add vty shell commands

Implement vty shell integration and allow `bfdd` to be configured
through FRR's vtysh.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: wire to the build process
Rafael Zalamena [Wed, 27 Jun 2018 15:24:51 +0000 (12:24 -0300)]
bfdd: wire to the build process

Add BFD daemon to the build process and packaging instructions.

Currently the bfdd daemon does nothing, this is just to document how the
daemon insertion step occured.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: imported new daemon source code
Rafael Zalamena [Wed, 27 Jun 2018 14:29:02 +0000 (11:29 -0300)]
bfdd: imported new daemon source code

Import source code from external `bfdd` daemon ported from Cumulus PTM.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>