Commit Graph

12582 Commits

Author SHA1 Message Date
Donald Sharp
164ab8625e
Merge pull request #2874 from opensourcerouting/fix-doc-bfdd-index
doc: address multiple warnings related to bfdd's docs
2018-08-20 19:39:27 -04:00
Rafael Zalamena
e36ff3f3a8 bfdd: fix documentation warnings
* Extend dashes on 'OSPF BFD Configuration' title;
* Add JSON output code indentation;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-20 23:22:16 +02:00
Don Slice
6ce24e5247 bgpd: fix additional issue with bgp route-leak json commit
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-08-20 21:05:57 +00:00
Christian Franke
3b12dd8204 doc: bfdd manpage should be included in the manpage index
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-20 22:44:56 +02:00
Don Slice
04c9077f81 bgpd: fix issues with bgp route-leak json commit
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-08-20 19:36:11 +00:00
David Lamparter
919925782c
Merge pull request #2872 from donaldsharp/tcp_zebra
doc, debianpkg: Cleanup tcp-zebra configure options
2018-08-20 20:53:26 +02:00
Donald Sharp
1491ad1ec4 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>
2018-08-20 13:17:34 -04:00
David Lamparter
a55a8b4538
Merge pull request #2814 from qlyoung/fix-ospf6d-lsa-uaf-test
ospf6d: fix use after free on LSA
2018-08-20 18:16:46 +02:00
Anuradha Karuppiah
de6058ab91 bgpd: unregister VNI learning from zebra on default instance delete
The code for this was always there but was not kicking in because of an
incorrect dependency on is_evpn_enabled. This API attempts to locate the
default instance from bgp_master's instance list. Only the instance
currently being deleted has already been removed from the instance list
by the time bgp_delete->bgp_zebra_instance_deregister is executed.

Symptom of this bug used to show up when a default instance is deleted
and created again. In that case bgp_zebra_instance_register would not be
effective as zebra ignores the register as dup (dereg didn't happen in the
first place) so bgpd wouldn't reload already configured L2-VNIs.
root@cel-sea-03:~# net show bgp l2vpn evpn vni |grep 1000
* 1000       L2   169.253.0.11:9   6646:1000  6646:1000 vrf1
root@cel-sea-03:~# grep "router bgp"  /etc/frr/frr.conf
router bgp 6646
root@cel-sea-03:~# sed -i 's/6646/6656/' /etc/frr/frr.conf
root@cel-sea-03:~# grep "router bgp"  /etc/frr/frr.conf
router bgp 6656
root@cel-sea-03:~# systemctl reload frr
root@cel-sea-03:~# net show bgp l2vpn evpn vni |grep 1000
root@cel-sea-03:~#

Fix simply changes the order of dereg to make
bgp_zebra_instance_deregister actually happen (by doing it before the
default instance is removed from the master list).

Ticket: CM-21566

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2018-08-20 07:51:34 -07:00
Martin Winter
4ed8f3f619 snapcraft: Add RPKI to snap package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-08-18 13:33:01 -07:00
Don Slice
b46dfd2022 bgpd: add json output to bgp route-leak show command
Ticket: CM-20259
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-08-18 11:43:08 +00:00
kssoman
01ba450582 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>
2018-08-17 08:53:28 -07:00
Lou Berger
e0909ff51f
Merge pull request #2829 from donaldsharp/more_upstream
bgpd: Check for L3VNI before sending RMAC/L3 RTs
2018-08-17 11:49:44 -04:00
kssoman
d5b8c21628 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>
2018-08-17 08:47:48 -07:00
Russ White
5719a7b88d
Merge pull request #2834 from dslicenc/import-vrf-fixes
bgpd: issues with vrf imports when switchd or networking restarted
2018-08-17 09:16:26 -04:00
Quentin Young
ea454ba398
Merge pull request #2858 from Jafaral/sphinx
configure.ac: emit a config  warning if sphinx-build is missing
2018-08-16 23:45:14 -04:00
Donald Sharp
018928cbaa
Merge pull request #2856 from opensourcerouting/bfd-work
bfdd: bug fixes and improvements
2018-08-16 18:48:51 -04:00
Rafael Zalamena
ad03f5ec8a
Merge pull request #2857 from donaldsharp/ptm_loves_us
zebra: When using BFD ensure that zebra thinks ptm is disabled
2018-08-16 18:34:59 -03:00
Rafael Zalamena
3bcd76c4af 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>
2018-08-16 18:33:32 -03:00
Rafael Zalamena
7efe273ae4 bfdd: fix zebra_ptm adapter memory leak
Memory leak detect with Address Sanitizer and topotests.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-16 18:33:32 -03:00
Rafael Zalamena
ae9f45a3ae 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>
2018-08-16 18:33:32 -03:00
Rafael Zalamena
ff98a58940 bfdd: fix coverity scan issues (1472630, 1472623)
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>
2018-08-16 18:32:16 -03:00
Jafar Al-Gharaibeh
410a249203 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>
2018-08-16 16:25:34 -05:00
Donald Sharp
5efdb8011d 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>
2018-08-16 16:29:08 -04:00
Russ White
12fa538096
Merge pull request #2848 from donaldsharp/more_init
sharpd, staticd: Add access_list_init
2018-08-16 11:35:52 -04:00
Russ White
4b0d7894cb
Merge pull request #2846 from donaldsharp/backet_data
Backet data
2018-08-16 11:32:41 -04:00
Russ White
783d61be04
Merge pull request #2849 from patrasar/memory_leak_nht
Fix memory leak pim nexthop creation
2018-08-16 11:31:21 -04:00
Sarita Patra
1159c202fc 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>
2018-08-16 12:15:26 -07:00
Russ White
91a4566c1c
Merge pull request #2852 from donaldsharp/bgp_clean
Bgp clean
2018-08-16 11:30:03 -04:00
Russ White
ef78628a67
Merge pull request #2810 from chiragshah6/evpn_dev1
bgpd: print evpn nd ext community in route
2018-08-16 11:29:28 -04:00
David Lamparter
55d3dad27c
Merge pull request #2448 from qlyoung/error-reference-cards
Error Reference Cards
2018-08-16 16:39:40 +02:00
Donald Sharp
68ede9c401 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>
2018-08-16 08:24:22 -04:00
Donald Sharp
deff24cad5 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>
2018-08-16 08:24:16 -04:00
Donald Sharp
b7cd3069c0 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>
2018-08-16 08:24:09 -04:00
Donald Sharp
29348bd7e7 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>
2018-08-15 20:14:22 -04:00
Donald Sharp
9ea660be3a zebra: Trust backet->data
The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 17:53:09 -04:00
Donald Sharp
7cd502014e pimd: Trust backet->data
The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 17:53:09 -04:00
Donald Sharp
c4dddf32d3 ospfd: trust backet->data
The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 17:53:09 -04:00
Donald Sharp
0a1a07cbcf 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>
2018-08-15 17:53:09 -04:00
Donald Sharp
1fae5ff24f 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>
2018-08-15 17:53:09 -04:00
Donald Sharp
d3ce24ef57 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>
2018-08-15 17:53:09 -04:00
David Lamparter
f5bffa5a74
Merge pull request #2845 from donaldsharp/cmsg_foolishness
lib, ripngd, zebra: Remove pre-solaris 9 special cased code
2018-08-15 22:10:56 +02:00
Rafael Zalamena
123582b3c3 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>
2018-08-15 17:09:54 -03:00
Rafael Zalamena
0684c9b12c 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>
2018-08-15 17:09:54 -03:00
Rafael Zalamena
89a634c1f8 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>
2018-08-15 17:09:54 -03:00
Donald Sharp
97f21f8c64
Merge pull request #2838 from opensourcerouting/bfd-alpine
bfdd: fix alpine build
2018-08-15 15:30:26 -04:00
Donald Sharp
adf0e7c6d7 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>
2018-08-15 15:06:53 -04:00
Rafael Zalamena
6bd01eebb2
Merge pull request #2844 from donaldsharp/unused
bfdd: Fix `don't assign to value to ourself` compiler warning
2018-08-15 15:49:05 -03:00
Donald Sharp
f0d2be3317 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>
2018-08-15 13:48:09 -04:00
Quentin Young
24a04145c5
Merge pull request #2837 from ppmathis/cidr-style
bgpd: Always show CIDR mask when displaying routes
2018-08-15 12:37:58 -04:00