]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agolib: Remove default case statement from a enum driven switch
Donald Sharp [Thu, 16 Aug 2018 17:59:27 +0000 (13:59 -0400)]
lib: Remove default case statement from a enum driven switch

We are using a enum to drive a switch statement and we have
a default case statement that can never be entered because
we know all the enum states have been covered.  Remove it
from the code as that it cannot happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Remove zlog_warn from some places in buffer.c
Donald Sharp [Thu, 16 Aug 2018 17:56:44 +0000 (13:56 -0400)]
lib: Remove zlog_warn from some places in buffer.c

zlog_warn was being used to inform user of impossible situations
or for normal operations.  Remove these from the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Remove smux option for snmp
Donald Sharp [Thu, 16 Aug 2018 17:51:13 +0000 (13:51 -0400)]
lib: Remove smux option for snmp

The smux.c code has not been able to compile for 2+ years
and no-one has noticed. Additionally net-snmp has marked
smux integration as deprecated for quite some time as well.

Since no-one has noticed and it's been broken and smux integration
is deprecated let's just remove this from the code base.

From looking at the code, it sure looks like SNMP could use
a decent cleanup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: convert zlog_warns to debugs or errors
Donald Sharp [Thu, 16 Aug 2018 16:21:25 +0000 (12:21 -0400)]
bgpd: convert zlog_warns to debugs or errors

Several zlog_warns were being used to tell the end
user that bgp had detected a bug.  These all look like information
added during development that can be noted as debugs or logged
as an error situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Remove warn to file an issue
Donald Sharp [Wed, 15 Aug 2018 18:53:51 +0000 (14:53 -0400)]
bgpd: Remove warn to file an issue

A warn with a backtrace does not need another warn
to file an issue with Quagga, so just remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2762 from chiragshah6/evpn_dev
Russ White [Wed, 22 Aug 2018 23:50:18 +0000 (19:50 -0400)]
Merge pull request #2762 from chiragshah6/evpn_dev

bgpd: check existing l3vni for any l2vni creation

6 years agobgpd: check existing l3vni for any l2vni creation
Chirag Shah [Wed, 1 Aug 2018 01:45:39 +0000 (18:45 -0700)]
bgpd: check existing l3vni for any l2vni creation

Scan all bgp vrf instances and respective L3VNI against the VNI which is being configured.

Ticket:CM-21859
Testing Done:
Configure l3vni,
try to configure same vni as l2vni under router bgp, address-family
l2vpn evpn.
The configuration is rejected.

show evpn vni
VNI        Type VxLAN IF              # MACs   # ARPs   # Remote VTEPs Tenant VRF
4001       L3   vx-4001               0        0        n/a vrf1

TOR(config)# router bgp 5546
TOR(config-router)# address-family l2vpn evpn
TOR(config-router-af)# vni 4001
% Failed to create VNI

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #2886 from donaldsharp/stream_resize
Russ White [Wed, 22 Aug 2018 20:04:37 +0000 (16:04 -0400)]
Merge pull request #2886 from donaldsharp/stream_resize

Stream resize

6 years agoMerge pull request #2892 from qlyoung/fix-log-ref-number-signedness
David Lamparter [Wed, 22 Aug 2018 19:21:40 +0000 (21:21 +0200)]
Merge pull request #2892 from qlyoung/fix-log-ref-number-signedness

lib: error codes are uint32_t's

6 years agolib: error codes are uint32_t's
Quentin Young [Wed, 22 Aug 2018 17:27:28 +0000 (17:27 +0000)]
lib: error codes are uint32_t's

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2890 from patrasar/Fix_2847
Donald Sharp [Wed, 22 Aug 2018 16:26:28 +0000 (12:26 -0400)]
Merge pull request #2890 from patrasar/Fix_2847

bgpd: Fix memory leak show ip bgp json

6 years agobgpd: Fix memory leak show ip bgp json
root [Wed, 22 Aug 2018 23:08:26 +0000 (16:08 -0700)]
bgpd: Fix memory leak show ip bgp json

Root Cause: In the function bgp_show_table(), we are creating a
json object and a json array with the same name as “json_paths”.
First it will create a json object variable "json_paths" pointing
to the memory allocated for the json object. Then it will create
a json array for each bap node rn (if rn->info is available) with
the same name as json_paths. Because of this, json_paths which was
pointing to the memory allocated for the json object earlier, now
will be overwritten with the memory allocated for the json array.
As per the existing code, at the end of each iteration loop of bgp
node, it will deallocate the memory used by the json array and
assigned NULL to the variable json_paths. Since we don’t have the
pointer pointing to the memory allocated for json object, will be
not able to de-allocate the memory, which is a memory leak here.

Fix: Removing this json object since it is never getting used in
this function.

Testing:  Reproduced the memory leak with valgrind.
With the fix, memory leak gets resolved and checked with valgrind.

Signed-off-by: Sarita Patra saritap@vmware.com
6 years agoMerge pull request #2850 from patrasar/Fix_2363
Donald Sharp [Wed, 22 Aug 2018 15:44:15 +0000 (11:44 -0400)]
Merge pull request #2850 from patrasar/Fix_2363

Fix pim_mroute_del crash while killing pimd

6 years agoMerge pull request #2884 from opensourcerouting/assorted-20180821
Donald Sharp [Wed, 22 Aug 2018 12:17:32 +0000 (08:17 -0400)]
Merge pull request #2884 from opensourcerouting/assorted-20180821

assorted warning fixes

6 years agolib: Convert stream_new to use one malloc
Donald Sharp [Wed, 22 Aug 2018 00:34:42 +0000 (20:34 -0400)]
lib: Convert stream_new to use one malloc

Modify stream.c to have stream_new call one malloc call
instead of two.  Also change stream_resize_orig to
use stream_resize_inplace and to send an error
to the developer to switch over.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoisisd, ospfd, tests: Switch to using stream_resize_inplace
Donald Sharp [Wed, 22 Aug 2018 00:22:28 +0000 (20:22 -0400)]
isisd, ospfd, tests: Switch to using stream_resize_inplace

Switch code and tests to use new stream_resize_inplace functionality.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Add stream_resize_orig and stream_resize_inplace
Donald Sharp [Wed, 22 Aug 2018 00:06:27 +0000 (20:06 -0400)]
lib: Add stream_resize_orig and stream_resize_inplace

Start setup for handling of stream_resize into old
and new functions.

Create a stream_resize_inplace function that takes
a double pointer to allow for a realloc operation
to return the possibly moved pointer.

Add a CONFDATE for removal as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2818 from kssoman/rmap_fix
Donald Sharp [Wed, 22 Aug 2018 11:50:14 +0000 (07:50 -0400)]
Merge pull request #2818 from kssoman/rmap_fix

Zebra does not properly track which route-maps are changed (#2493)

6 years agoMerge pull request #2888 from pguibert6WIND/misc_fix_static_tableid
Donald Sharp [Wed, 22 Aug 2018 11:40:14 +0000 (07:40 -0400)]
Merge pull request #2888 from pguibert6WIND/misc_fix_static_tableid

Misc fix static tableid

6 years agostatic: remove useless debug variable
Philippe Guibert [Wed, 22 Aug 2018 08:04:49 +0000 (10:04 +0200)]
static: remove useless debug variable

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agostaticd: do not forget to set table id marker on zebra message
Philippe Guibert [Wed, 22 Aug 2018 08:04:06 +0000 (10:04 +0200)]
staticd: do not forget to set table id marker on zebra message

Table identifier is not read if table id marker is not set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agostaticd: remove usage of vrf_is_backend_netns in staticd
Philippe Guibert [Wed, 22 Aug 2018 07:19:50 +0000 (09:19 +0200)]
staticd: remove usage of vrf_is_backend_netns in staticd

this function had to be used only inside zebra ( this was written in the
header vrf.h). To keep the functionality, a more generic API is used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: change vrf_is_mapped_on_netns API
Philippe Guibert [Wed, 22 Aug 2018 07:19:04 +0000 (09:19 +0200)]
lib: change vrf_is_mapped_on_netns API

The function handles not a vrf pointer instead of a vrf_id value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agopimd: Fix pim_mroute_del crash while terminating pimd
root [Wed, 22 Aug 2018 07:00:32 +0000 (00:00 -0700)]
pimd: Fix pim_mroute_del crash while terminating pimd

When pimd is getting terminated, pim_upstream_del() gets called as
part of cleaning process. pim_upstream_del() deletes the route and
assigns NULL to the up->channel_oil. It also deletes each if_channel
by calling the function pim_ifchannel_delete().
pim_ifchannel_delete() internally calls the caller function pim_upstream_del(),
if it is the last ifchannel for that upstream. So pim_upstream_del
is getting called twice, which will access the up->channel_oil which
was already set to NULL before. This results in crash.

Fix:
pim_ifchannel_delete() should call pim_upstream_del (caller function)
only if the up->ref_count > 0. Added an assert(up->ref_count > 0) in
the function pim_upstream_del().

Signed-off-by: Sarita Patra <saritap@vmware.com>
6 years agolib/bgpd: re-fix bgp_info_extra_free()
David Lamparter [Sat, 18 Aug 2018 02:47:27 +0000 (04:47 +0200)]
lib/bgpd: re-fix bgp_info_extra_free()

Make the wart slightly less bad... also there is still a possible write
after free here.  This needs to be fixed again, properly, by some
structure changes.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #2868 from opensourcerouting/snap-rpki
Donald Sharp [Tue, 21 Aug 2018 22:49:24 +0000 (18:49 -0400)]
Merge pull request #2868 from opensourcerouting/snap-rpki

snapcraft: Add RPKI to snap package

6 years agoMerge pull request #2877 from pguibert6WIND/fixup_fs_master
Donald Sharp [Tue, 21 Aug 2018 22:46:42 +0000 (18:46 -0400)]
Merge pull request #2877 from pguibert6WIND/fixup_fs_master

bgpd: avoid memory leak in bgp flowspec list, plus usage of bool

6 years agoMerge pull request #2876 from donaldsharp/lsa_new_and_data
David Lamparter [Tue, 21 Aug 2018 19:22:45 +0000 (21:22 +0200)]
Merge pull request #2876 from donaldsharp/lsa_new_and_data

ospfd: Add ospf_lsa_new_and_data function and abstract away

6 years agoMerge pull request #2882 from qlyoung/fix-zlog-deadlock
David Lamparter [Tue, 21 Aug 2018 19:21:28 +0000 (21:21 +0200)]
Merge pull request #2882 from qlyoung/fix-zlog-deadlock

lib: fix deadlock in log.c

6 years ago*: fix gcc-8 format-overflow warnings
David Lamparter [Sat, 18 Aug 2018 02:33:38 +0000 (04:33 +0200)]
*: fix gcc-8 format-overflow warnings

e.g.
pimd/pim_oil.c: In function ‘pim_channel_oil_dump’:
pimd/pim_oil.c:51:19: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Werror=format-overflow=]

Build on gcc-8.2.0 is warning-free after this patch.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: wrap "fallthrough" attr
David Lamparter [Wed, 15 Aug 2018 03:49:29 +0000 (05:49 +0200)]
build: wrap "fallthrough" attr

This generates a warning on gcc versions before 7.0.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobgpd: pbr entry log message changed to zlog_debug
Philippe Guibert [Tue, 21 Aug 2018 08:43:33 +0000 (10:43 +0200)]
bgpd: pbr entry log message changed to zlog_debug

pbr entry log message changed to zlog_debug.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: simplify fs add pbr entry
Philippe Guibert [Tue, 21 Aug 2018 08:38:27 +0000 (10:38 +0200)]
bgpd: simplify fs add pbr entry

Simplify the fs pbr entry creation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: avoid memory leak in bgp flowspec list, plus usage of bool
Philippe Guibert [Mon, 20 Aug 2018 16:32:00 +0000 (18:32 +0200)]
bgpd: avoid memory leak in bgp flowspec list, plus usage of bool

Avoid memory leak in bgp flowspec list.
Usage of bool parameter instead of int, to handle the number of entries
PBR.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: fix deadlock in log.c
Quentin Young [Tue, 21 Aug 2018 15:15:38 +0000 (15:15 +0000)]
lib: fix deadlock in log.c

Daemons could deadlock when log file could not be opened during a log
rotation.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2881 from donaldsharp/external_removal
David Lamparter [Tue, 21 Aug 2018 15:00:28 +0000 (17:00 +0200)]
Merge pull request #2881 from donaldsharp/external_removal

ospfd: Remove unused function

6 years agoMerge pull request #2878 from pguibert6WIND/fix_show_error_all
Donald Sharp [Tue, 21 Aug 2018 14:35:16 +0000 (10:35 -0400)]
Merge pull request #2878 from pguibert6WIND/fix_show_error_all

lib: fix show error all

6 years agoospfd: Remove unused function
Donald Sharp [Tue, 21 Aug 2018 12:40:51 +0000 (08:40 -0400)]
ospfd: Remove unused function

The ospf_external_route_lookup function was not
being used so let's just remove it.

Unfortunately the removal was not quite so simple as
that ospf_asbr.h was being used to generate a reference
for the `struct ospf_route` data structure, so we
need to fix up the compile by fixing up header
inclusions so that ospf_route.h is actually included

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: fix show error all
Philippe Guibert [Tue, 21 Aug 2018 09:09:36 +0000 (11:09 +0200)]
lib: fix show error all

show error all was displaying 0 value for code, whereas real code value
was not displayed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #2867 from dslicenc/show-route-leak-json
David Lamparter [Tue, 21 Aug 2018 03:52:30 +0000 (05:52 +0200)]
Merge pull request #2867 from dslicenc/show-route-leak-json

bgpd: add json output to bgp route-leak show command

6 years agoospfd: Add ospf_lsa_new_and_data function and abstract away
Donald Sharp [Tue, 21 Aug 2018 00:41:37 +0000 (20:41 -0400)]
ospfd: Add ospf_lsa_new_and_data function and abstract away

In all but one instance we were following this pattern
with ospf_lsa_new:

ospf_lsa_new()
ospf_lsa_data_new()

so let's create a ospf_lsa_new_and_data to abstract
this bit of fun and cleanup all the places where
it assumes these function calls can fail.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2874 from opensourcerouting/fix-doc-bfdd-index
Donald Sharp [Mon, 20 Aug 2018 23:39:27 +0000 (19:39 -0400)]
Merge pull request #2874 from opensourcerouting/fix-doc-bfdd-index

doc: address multiple warnings related to bfdd's docs

6 years agobfdd: fix documentation warnings
Rafael Zalamena [Fri, 17 Aug 2018 14:34:22 +0000 (11:34 -0300)]
bfdd: fix documentation warnings

* Extend dashes on 'OSPF BFD Configuration' title;
* Add JSON output code indentation;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobgpd: fix additional issue with bgp route-leak json commit
Don Slice [Mon, 20 Aug 2018 21:05:57 +0000 (21:05 +0000)]
bgpd:  fix additional issue with bgp route-leak json commit

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agodoc: bfdd manpage should be included in the manpage index
Christian Franke [Mon, 20 Aug 2018 20:44:13 +0000 (22:44 +0200)]
doc: bfdd manpage should be included in the manpage index

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agobgpd: fix issues with bgp route-leak json commit
Don Slice [Mon, 20 Aug 2018 19:36:11 +0000 (19:36 +0000)]
bgpd: fix issues with bgp route-leak json commit

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #2872 from donaldsharp/tcp_zebra
David Lamparter [Mon, 20 Aug 2018 18:53:26 +0000 (20:53 +0200)]
Merge pull request #2872 from donaldsharp/tcp_zebra

doc, debianpkg: Cleanup tcp-zebra configure options

6 years agodoc, debianpkg: Cleanup tcp-zebra configure options
Donald Sharp [Mon, 20 Aug 2018 17:17:34 +0000 (13:17 -0400)]
doc, debianpkg: Cleanup tcp-zebra configure options

Since we removed --enable-tcp-zebra cleanup the last
remaining vestiges of that code from the system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2814 from qlyoung/fix-ospf6d-lsa-uaf-test
David Lamparter [Mon, 20 Aug 2018 16:16:46 +0000 (18:16 +0200)]
Merge pull request #2814 from qlyoung/fix-ospf6d-lsa-uaf-test

ospf6d: fix use after free on LSA

6 years agosnapcraft: Add RPKI to snap package
Martin Winter [Sat, 11 Aug 2018 01:35:06 +0000 (18:35 -0700)]
snapcraft: Add RPKI to snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agobgpd: add json output to bgp route-leak show command
Don Slice [Fri, 17 Aug 2018 19:22:55 +0000 (19:22 +0000)]
bgpd: add json output to bgp route-leak show command

Ticket: CM-20259
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agozebra : routemap "match ipv6 address prefix list" does not work
kssoman [Fri, 17 Aug 2018 15:53:28 +0000 (08:53 -0700)]
zebra : routemap "match ipv6 address prefix list" does not work

* Added code for "match ipv6 address prefix list" command
* Added common function route_match_address_prefix_list() to process
  routemap for AFI_IP and AFI_IP6 address family

Signed-off-by: kssoman <somanks@vmware.com>
6 years agoMerge pull request #2829 from donaldsharp/more_upstream
Lou Berger [Fri, 17 Aug 2018 15:49:44 +0000 (11:49 -0400)]
Merge pull request #2829 from donaldsharp/more_upstream

bgpd: Check for L3VNI before sending RMAC/L3 RTs

6 years agozebra : Zebra does not properly track which route-maps are changed (#2493)
kssoman [Fri, 17 Aug 2018 15:47:48 +0000 (08:47 -0700)]
zebra : Zebra does not properly track which route-maps are changed (#2493)

* Check for the modified routemap in zebra_route_map_process_update_cb()
* Added zebra_rib_table_rm_update() for RIB routemap processing
* Added zebra_nht_rm_update() for NHT routemap processing

Signed-off-by: kssoman <somanks@vmware.com>
6 years agoMerge pull request #2834 from dslicenc/import-vrf-fixes
Russ White [Fri, 17 Aug 2018 13:16:26 +0000 (09:16 -0400)]
Merge pull request #2834 from dslicenc/import-vrf-fixes

bgpd: issues with vrf imports when switchd or networking restarted

6 years agoMerge pull request #2858 from Jafaral/sphinx
Quentin Young [Fri, 17 Aug 2018 03:45:14 +0000 (23:45 -0400)]
Merge pull request #2858 from Jafaral/sphinx

configure.ac: emit a config  warning if sphinx-build is missing

6 years agoMerge pull request #2856 from opensourcerouting/bfd-work
Donald Sharp [Thu, 16 Aug 2018 22:48:51 +0000 (18:48 -0400)]
Merge pull request #2856 from opensourcerouting/bfd-work

bfdd: bug fixes and improvements

6 years agoMerge pull request #2857 from donaldsharp/ptm_loves_us
Rafael Zalamena [Thu, 16 Aug 2018 21:34:59 +0000 (18:34 -0300)]
Merge pull request #2857 from donaldsharp/ptm_loves_us

zebra: When using BFD ensure that zebra thinks ptm is disabled

6 years agobfdd: fix coverity scan issue (CID 1472622)
Rafael Zalamena [Thu, 16 Aug 2018 18:47:34 +0000 (15:47 -0300)]
bfdd: fix coverity scan issue (CID 1472622)

Don't use the stack variable, but what we have recorded in our buffered
data on the heap.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: fix zebra_ptm adapter memory leak
Rafael Zalamena [Thu, 16 Aug 2018 18:23:13 +0000 (15:23 -0300)]
bfdd: fix zebra_ptm adapter memory leak

Memory leak detect with Address Sanitizer and topotests.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: improve ptm_adapter log messages
Rafael Zalamena [Wed, 15 Aug 2018 23:40:40 +0000 (20:40 -0300)]
bfdd: improve ptm_adapter log messages

Make them look like the rest of the daemon: message begins with a unique
descriptive message to help locate debug messages.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: fix coverity scan issues (1472630, 1472623)
Rafael Zalamena [Wed, 15 Aug 2018 21:00:24 +0000 (18:00 -0300)]
bfdd: fix coverity scan issues (14726301472623)

Always initialize/santize string before calling the `read` function. It
ensures that the debug function will always pick up the right thing.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoconfigure.ac: emit a config warning if sphinx-build is missing
Jafar Al-Gharaibeh [Thu, 16 Aug 2018 21:25:34 +0000 (16:25 -0500)]
configure.ac: emit a config  warning if sphinx-build is missing

  If we don't have --disabled-doc and sphinx-build is not available
  warn the user that sphinx-build is needed to build documentation
  as shown in the last line of config summary example below

FRRouting configuration
------------------------------
FRR version             : 5.1-dev
host operating system   : linux-gnu
source code location    : .
compiler                : gcc -std=gnu11
compiler flags          :  -g -Os -fno-omit-frame-pointer -funwind-tables -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -pthread
make                    : make
linker flags            :  -rdynamic -ldl -lm -lcrypt   -ljson-c -lrt  -lreadline  -ltermcap -lm
state file directory    : /var/run
config file directory   : /usr/local/etc
example directory       : /usr/local/etc
module directory        : /usr/local/lib/frr/modules
user to run as          : frr
group to run as         : frr
group for vty sockets   :
config file mask        : 0600
log file mask           : 0600
zebra protobuf enabled  : no

The above user and group must have read/write access to the state file
directory and to the config files in the config file directory.
configure: WARNING: sphinx-build is missing but required to build documentation

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agozebra: When using BFD ensure that zebra thinks ptm is disabled
Donald Sharp [Thu, 16 Aug 2018 20:29:08 +0000 (16:29 -0400)]
zebra: When using BFD ensure that zebra thinks ptm is disabled

In order for connected routes to be installed the if_is_operative
function is called.  This function checks the status of ptm
and decides to use ptm enabled/disabled on the interface.
The call to zebra_ptm_get_enable was returning true and causing
the interface subsystem to do the wrong thing.  Modify the
internal bfd case to when checking for ptm enabled to say it
is not enabled.

Tested-by: Mark Stapp <mjs@voltanet.io>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2848 from donaldsharp/more_init
Russ White [Thu, 16 Aug 2018 15:35:52 +0000 (11:35 -0400)]
Merge pull request #2848 from donaldsharp/more_init

sharpd, staticd: Add access_list_init

6 years agoMerge pull request #2846 from donaldsharp/backet_data
Russ White [Thu, 16 Aug 2018 15:32:41 +0000 (11:32 -0400)]
Merge pull request #2846 from donaldsharp/backet_data

Backet data

6 years agoMerge pull request #2849 from patrasar/memory_leak_nht
Russ White [Thu, 16 Aug 2018 15:31:21 +0000 (11:31 -0400)]
Merge pull request #2849 from patrasar/memory_leak_nht

Fix memory leak pim nexthop creation

6 years agopimd: Fix memory leak pim nexthop creation
Sarita Patra [Thu, 16 Aug 2018 13:41:01 +0000 (06:41 -0700)]
pimd: Fix memory leak pim nexthop creation

While terminating pim instance, the memory allocated for pim nexthop
should be released before deallocating the memory of pim nexthop cache(pnc).
This resolves the memory leak detected in pnc->nexthop creation.

Signed-off-by: Sarita Patra <saritap@vmware.com>
6 years agoMerge pull request #2852 from donaldsharp/bgp_clean
Russ White [Thu, 16 Aug 2018 15:30:03 +0000 (11:30 -0400)]
Merge pull request #2852 from donaldsharp/bgp_clean

Bgp clean

6 years agoMerge pull request #2810 from chiragshah6/evpn_dev1
Russ White [Thu, 16 Aug 2018 15:29:28 +0000 (11:29 -0400)]
Merge pull request #2810 from chiragshah6/evpn_dev1

bgpd: print evpn nd ext community in route

6 years agoMerge pull request #2448 from qlyoung/error-reference-cards
David Lamparter [Thu, 16 Aug 2018 14:39:40 +0000 (16:39 +0200)]
Merge pull request #2448 from qlyoung/error-reference-cards

Error Reference Cards

6 years agobgpd: zlog_warn to assert for code that must be executed first
Donald Sharp [Thu, 16 Aug 2018 00:44:31 +0000 (20:44 -0400)]
bgpd: zlog_warn to assert for code that must be executed first

In bgp_keepalives.c, it was noticed that we were
ensuring that we called an intialization function first,
but this is a development escape in that once this
was fixed we never see it.  So if a developer moves
this assumption around, let's crash the program and
lead them to this spot instead of silently ignoring
the problem.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Convert warn to debug
Donald Sharp [Thu, 16 Aug 2018 00:37:45 +0000 (20:37 -0400)]
bgpd: Convert warn to debug

There exists a few places where actual debugs were being
displayed as warns.  Convert them over to debugs and
guard as appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulsunetworks.com>
6 years agobgpd: Modify warn to info for deprecated commands
Donald Sharp [Thu, 16 Aug 2018 00:32:36 +0000 (20:32 -0400)]
bgpd: Modify warn to info for deprecated commands

Modify zlog_warn to zlog_info commands for notification of
deprecated commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agosharpd, staticd: Add access_list_init
Donald Sharp [Thu, 16 Aug 2018 00:14:22 +0000 (20:14 -0400)]
sharpd, staticd: Add access_list_init

Add ability for sharpd and staticd to ignore access_list cli
for the moment.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Trust backet->data
Donald Sharp [Wed, 15 Aug 2018 19:56:53 +0000 (15:56 -0400)]
zebra: Trust backet->data

The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Trust backet->data
Donald Sharp [Wed, 15 Aug 2018 19:56:10 +0000 (15:56 -0400)]
pimd: Trust backet->data

The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: trust backet->data
Donald Sharp [Wed, 15 Aug 2018 19:55:24 +0000 (15:55 -0400)]
ospfd: trust backet->data

The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Trust backet->data in bgp_evpn.c
Donald Sharp [Wed, 15 Aug 2018 19:27:01 +0000 (15:27 -0400)]
bgpd: Trust backet->data in bgp_evpn.c

backet->data must be non-NULL( look at hash_get ) as such
we do not need to check for NULL values for this when
we retrieve data from the backet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: routemap.c trust backet->data
Donald Sharp [Wed, 15 Aug 2018 19:54:14 +0000 (15:54 -0400)]
lib: routemap.c trust backet->data

The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Update hash.h documentation
Donald Sharp [Wed, 15 Aug 2018 19:50:30 +0000 (15:50 -0400)]
lib: Update hash.h documentation

The hash_get function when called and the alloc_func returns
a NULL value, we do not create a backet nor do we insert
anything into the hash.  As such backet->data must always
be non-NULL.

Modify the description in hash_get to inform of this.
Additionally indicate that hash_walk and hash_iterate
cannot have a NULL backet->data value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2845 from donaldsharp/cmsg_foolishness
David Lamparter [Wed, 15 Aug 2018 20:10:56 +0000 (22:10 +0200)]
Merge pull request #2845 from donaldsharp/cmsg_foolishness

lib, ripngd, zebra: Remove pre-solaris 9 special cased code

6 years agobfdd: improve docs
Rafael Zalamena [Wed, 15 Aug 2018 19:04:13 +0000 (16:04 -0300)]
bfdd: improve docs

Improvements:
* Show command line as code, to avoid confusion about single dash (`-`)
  and double dash;
* Tell the user where the BGP BFD commands can be found;
* Document OSPF/OSPF6/PIM BFD commands;
* Document JSON commands;
* Tell about session counters;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: add new counters and command to show them
Rafael Zalamena [Mon, 13 Aug 2018 20:47:21 +0000 (17:47 -0300)]
bfdd: add new counters and command to show them

Added 3 new counters to BFD sessions:
* Session up events count;
* Session down events count;
* Zebra notifications count;

In addition to previosly available counters:
* Count of received control packets;
* Count of transmitted control packets;
* Count of received echo packets;
* Count of transmitted echo packets;

With this count we are able to visualize the BFD activity, bandwidth
usage, interface/network flapping and excess of zebra notifications.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: turn repeatable code into functions
Rafael Zalamena [Mon, 13 Aug 2018 18:28:17 +0000 (15:28 -0300)]
bfdd: turn repeatable code into functions

Turn some code that will be repeated in the next commits into functions
so we avoid that.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoMerge pull request #2838 from opensourcerouting/bfd-alpine
Donald Sharp [Wed, 15 Aug 2018 19:30:26 +0000 (15:30 -0400)]
Merge pull request #2838 from opensourcerouting/bfd-alpine

bfdd: fix alpine build

6 years agolib, ripngd, zebra: Remove pre-solaris 9 special cased code
Donald Sharp [Wed, 15 Aug 2018 19:06:53 +0000 (15:06 -0400)]
lib, ripngd, zebra: Remove pre-solaris 9 special cased code

The CMSG_FIRSTHDR was broken on solaris pre version 9.  Version 9
was released in May of 2002 and EOL'ed in 2014.  Version 8 EOL'ed
in 2012.  Remove special case code for a little used platform
that has not seen the light of day in a very long time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2844 from donaldsharp/unused
Rafael Zalamena [Wed, 15 Aug 2018 18:49:05 +0000 (15:49 -0300)]
Merge pull request #2844 from donaldsharp/unused

bfdd: Fix `don't assign to value to ourself` compiler warning

6 years agobfdd: Fix `don't assign to value to ourself` compiler warning
Donald Sharp [Wed, 15 Aug 2018 17:48:09 +0000 (13:48 -0400)]
bfdd: Fix `don't assign to value to ourself` compiler warning

We were attempting to get around a unused value by setting
a variable to itself, but it runs afoul of a different
compiler and a message about not setting a variable to
itself.  So let's mark the ttl value as unused.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2837 from ppmathis/cidr-style
Quentin Young [Wed, 15 Aug 2018 16:37:58 +0000 (12:37 -0400)]
Merge pull request #2837 from ppmathis/cidr-style

bgpd: Always show CIDR mask when displaying routes

6 years agoMerge pull request #2840 from opensourcerouting/snap-bfdd
Donald Sharp [Wed, 15 Aug 2018 11:54:50 +0000 (07:54 -0400)]
Merge pull request #2840 from opensourcerouting/snap-bfdd

snapcraft: Add bfdd to snap package

6 years agoMerge pull request #2843 from LabNConsulting/working/lb/doc-solo
Donald Sharp [Wed, 15 Aug 2018 11:54:08 +0000 (07:54 -0400)]
Merge pull request #2843 from LabNConsulting/working/lb/doc-solo

bgpd: document how to avoid reflecting advertised information back to originator

6 years agouser: document neighbor ... solo config
Lou Berger [Wed, 15 Aug 2018 03:58:25 +0000 (23:58 -0400)]
user: document neighbor ... solo config

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobfdd: fix alpine build
Rafael Zalamena [Tue, 14 Aug 2018 18:10:25 +0000 (15:10 -0300)]
bfdd: fix alpine build

Move `recvmsg` parameter option initialization to function, initialize
the parameter struct with zeroes and access field by name.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: fix downtime display
Rafael Zalamena [Mon, 13 Aug 2018 13:26:55 +0000 (10:26 -0300)]
bfdd: fix downtime display

BFD peer status show command was using the wrong variable to display the
downtime counter.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agosnapcraft: Add bfdd to snap package
Martin Winter [Tue, 14 Aug 2018 20:31:54 +0000 (13:31 -0700)]
snapcraft: Add bfdd to snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoospf6d: sanity check refcount correctness
Quentin Young [Tue, 14 Aug 2018 20:08:50 +0000 (20:08 +0000)]
ospf6d: sanity check refcount correctness

Coverity warns about a possible double free; add an assert to make sure
we never hit it, and hopefully silence Coverity.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: frr_elevate_privs whitespace fixes
David Lamparter [Mon, 13 Aug 2018 17:52:57 +0000 (19:52 +0200)]
*: frr_elevate_privs whitespace fixes

(... and one superfluous variable removed)

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agozebra: fix warnings from frr_elevate_privs()
David Lamparter [Fri, 10 Aug 2018 17:55:51 +0000 (19:55 +0200)]
zebra: fix warnings from frr_elevate_privs()

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years ago*: use frr_elevate_privs() (2/2: manual)
David Lamparter [Fri, 10 Aug 2018 16:46:07 +0000 (18:46 +0200)]
*: use frr_elevate_privs() (2/2: manual)

Signed-off-by: David Lamparter <equinox@diac24.net>