]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2726 from sworleys/Netlink-Filter-AFI
Renato Westphal [Mon, 6 Aug 2018 23:26:46 +0000 (20:26 -0300)]
Merge pull request #2726 from sworleys/Netlink-Filter-AFI

zebra: Ignore AF_ETHERNET and AF_MPLS in route change as well

5 years agoMerge pull request #2777 from qlyoung/fix-checkpatch-sh-greps
Lou Berger [Mon, 6 Aug 2018 19:59:35 +0000 (15:59 -0400)]
Merge pull request #2777 from qlyoung/fix-checkpatch-sh-greps

tools: improve checkpatch slicing

5 years agoMerge pull request #2793 from pacovn/Coverity_1472232_1472234_Unchecked_return_value
Quentin Young [Mon, 6 Aug 2018 19:42:49 +0000 (15:42 -0400)]
Merge pull request #2793 from pacovn/Coverity_1472232_1472234_Unchecked_return_value

bgpd pimd: return check (Coverity 1472232 1472234)

5 years agobgpd pimd: return check (Coverity 1472232 1472234)
F. Aragon [Mon, 6 Aug 2018 16:17:39 +0000 (18:17 +0200)]
bgpd pimd: return check (Coverity 1472232 1472234)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2775 from donaldsharp/stream_speedup
Rafael Zalamena [Sat, 4 Aug 2018 17:17:25 +0000 (14:17 -0300)]
Merge pull request #2775 from donaldsharp/stream_speedup

lib: Increase stream allocation speed.

5 years agoMerge pull request #2758 from donaldsharp/pim_join
Russ White [Sat, 4 Aug 2018 15:46:45 +0000 (11:46 -0400)]
Merge pull request #2758 from donaldsharp/pim_join

lib and pim silliness

5 years agoMerge pull request #2773 from donaldsharp/pim_ordering
Russ White [Sat, 4 Aug 2018 15:43:38 +0000 (11:43 -0400)]
Merge pull request #2773 from donaldsharp/pim_ordering

Pim ordering

5 years agoMerge pull request #2778 from donaldsharp/pim_leaks_and_invalids
Russ White [Sat, 4 Aug 2018 15:30:15 +0000 (11:30 -0400)]
Merge pull request #2778 from donaldsharp/pim_leaks_and_invalids

Pim leaks and invalids

5 years agoMerge pull request #2684 from netravnen/feature/bgpd/well-known-communities
Russ White [Sat, 4 Aug 2018 13:57:32 +0000 (09:57 -0400)]
Merge pull request #2684 from netravnen/feature/bgpd/well-known-communities

Add missing bgp well-known communities

5 years agoMerge pull request #2731 from chiragshah6/mdev
Lou Berger [Fri, 3 Aug 2018 18:12:21 +0000 (14:12 -0400)]
Merge pull request #2731 from chiragshah6/mdev

bgpd: route detail output local pref display

5 years agotools: improve checkpatch slicing
Quentin Young [Thu, 2 Aug 2018 18:34:37 +0000 (18:34 +0000)]
tools: improve checkpatch slicing

checkpatch cuts from the diff between the outputs of pre-patch and
post-patch runs of `checkpatch.pl`, but fixed-length greps sometimes
don't cut correctly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2782 from pacovn/Coverity_1472236_Improper_use_of_negative_value
Quentin Young [Fri, 3 Aug 2018 17:19:13 +0000 (13:19 -0400)]
Merge pull request #2782 from pacovn/Coverity_1472236_Improper_use_of_negative_value

zebra: socket fd check (Coverity 1472236)

5 years agozebra: socket fd check (Coverity 1472236)
F. Aragon [Fri, 3 Aug 2018 13:37:02 +0000 (15:37 +0200)]
zebra: socket fd check (Coverity 1472236)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2783 from pacovn/Coverity_1472229_variable_scope
Quentin Young [Fri, 3 Aug 2018 16:07:19 +0000 (12:07 -0400)]
Merge pull request #2783 from pacovn/Coverity_1472229_variable_scope

bgpd: variable scope (Coverity 1472229)

5 years agoMerge pull request #2781 from pacovn/Coverity_1472237_null_check
Rafael Zalamena [Fri, 3 Aug 2018 16:01:11 +0000 (13:01 -0300)]
Merge pull request #2781 from pacovn/Coverity_1472237_null_check

bgpd: null check (Coverity 1472237)

5 years agoMerge pull request #2780 from pacovn/Coverity_1472238_dead_code
Rafael Zalamena [Fri, 3 Aug 2018 15:25:59 +0000 (12:25 -0300)]
Merge pull request #2780 from pacovn/Coverity_1472238_dead_code

bgpd: dead code (Coverity 1472230 1472231 1472238)

5 years agoMerge pull request #2784 from pacovn/Coverity_1472227_dead_code
Rafael Zalamena [Fri, 3 Aug 2018 15:18:58 +0000 (12:18 -0300)]
Merge pull request #2784 from pacovn/Coverity_1472227_dead_code

ospfd: dead code (Coverity 1472227)

5 years agobgpd: null check (Coverity 1472237)
F. Aragon [Fri, 3 Aug 2018 13:23:26 +0000 (15:23 +0200)]
bgpd: null check (Coverity 1472237)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: dead code (Coverity 1472230 1472231 1472238)
F. Aragon [Fri, 3 Aug 2018 13:14:58 +0000 (15:14 +0200)]
bgpd: dead code (Coverity 1472230 1472231 1472238)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2779 from pacovn/Coverity_1472226_1472228_1472239
Rafael Zalamena [Fri, 3 Aug 2018 14:15:32 +0000 (11:15 -0300)]
Merge pull request #2779 from pacovn/Coverity_1472226_1472228_1472239

bgpd: rsc leak (Coverity 1472226 1472228 1472239)

5 years agoospfd: dead code (Coverity 1472227)
F. Aragon [Fri, 3 Aug 2018 13:51:05 +0000 (15:51 +0200)]
ospfd: dead code (Coverity 1472227)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: variable scope (Coverity 1472229)
F. Aragon [Fri, 3 Aug 2018 13:47:03 +0000 (15:47 +0200)]
bgpd: variable scope (Coverity 1472229)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: rsc leak (Coverity 1472226 1472228 1472239)
F. Aragon [Fri, 3 Aug 2018 12:55:10 +0000 (14:55 +0200)]
bgpd: rsc leak (Coverity 1472226 1472228 1472239)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agolib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more
Donald Sharp [Fri, 3 Aug 2018 12:18:11 +0000 (08:18 -0400)]
lib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more

When calling route_map_finish, every place that we do we must
first set the deletion event to NULL, or we will create an infinite
loop, if we are using the delayed route-map application code.
As such we might as well just make the route_map_finish code
do this work, as that there is really no viable alternative here
and route_map_finish should only be called on shutdown.

This fixes an infinite loop in zebra on shutdown when there
are route-maps.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: On shutdown ensure wheel exists
Donald Sharp [Fri, 3 Aug 2018 03:31:53 +0000 (23:31 -0400)]
pimd: On shutdown ensure wheel exists

On shutdown and cleaning up pim_upstream ensure that the
upstream_sg_wheel still exists to remove item from.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Cleanup msdp.mg on shutdown
Donald Sharp [Fri, 3 Aug 2018 03:07:08 +0000 (23:07 -0400)]
pimd: Cleanup msdp.mg on shutdown

When shutting down PIM, ensure that hte pim->msdp.mg is cleaned up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Cleanup bfd memory on shutdown
Donald Sharp [Fri, 3 Aug 2018 02:56:55 +0000 (22:56 -0400)]
pimd: Cleanup bfd memory on shutdown

When shutting down pim, ensure that we cleanup bfd memory

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Fix crash on shutdown in oil
Donald Sharp [Fri, 3 Aug 2018 00:27:53 +0000 (20:27 -0400)]
pimd: Fix crash on shutdown in oil

When shutting down, do not free oil information after
interface information since we use the data there to
do so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Don't leak wheel memory
Donald Sharp [Fri, 3 Aug 2018 00:25:41 +0000 (20:25 -0400)]
pimd: Don't leak wheel memory

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Properly cleanup ssm
Donald Sharp [Fri, 3 Aug 2018 00:06:15 +0000 (20:06 -0400)]
pimd: Properly cleanup ssm

Properly cleanup the ssm data structure on termination.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Cleanup rp_info->plist
Donald Sharp [Fri, 3 Aug 2018 00:02:13 +0000 (20:02 -0400)]
pimd: Cleanup rp_info->plist

PIM is leaking the plist data structure in some shutdown
cases.  Additionally trust XFREE

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopim: Clean up some data on shutdown in msdp
Donald Sharp [Thu, 2 Aug 2018 23:58:24 +0000 (19:58 -0400)]
pim: Clean up some data on shutdown in msdp

We were leaking some msdp hash backets and a msdp stream
data pointer on shutdown.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: No need to call zprivs_terminate 2 times
Donald Sharp [Thu, 2 Aug 2018 23:52:15 +0000 (19:52 -0400)]
pimd: No need to call zprivs_terminate 2 times

frr_fini and pim_free both call zprivs_terminate.  There is
no need for pim_free to call this function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Increase stream allocation speed.
Donald Sharp [Thu, 2 Aug 2018 17:42:15 +0000 (13:42 -0400)]
lib: Increase stream allocation speed.

Modify stream_new in this way:

1) ALLOC allocations do not fail, they cause a crash so remove
if tests for it.

2) Modify usage of XCALLOC to XMALLOC and then hand set all the
relevant data in the stream pointer.

With this modification stream allocation of 10000000 streams at
10k bytes each reduced from on average 1.43 seconds to 0.65 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agovtysh: Respect order dependancy of some pim commands
Donald Sharp [Thu, 2 Aug 2018 14:36:59 +0000 (10:36 -0400)]
vtysh: Respect order dependancy of some pim commands

If `ip igmp query-max-respone-time ` is specified allow it
to show up before `ip igmp query-interval ` since there
are order dependancies that may show up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
5 years agopimd: Modify order of command output for vty output
Donald Sharp [Thu, 2 Aug 2018 14:35:14 +0000 (10:35 -0400)]
pimd: Modify order of command output for vty output

If `ip igmp query-max-response-time` is set move it to
display first as that this command has order dependencies
on `ip igmp query-interval`.

Ticket: CM-21598
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Fix vrf check output to only have 1 line
Donald Sharp [Tue, 31 Jul 2018 19:28:04 +0000 (15:28 -0400)]
lib: Fix vrf check output to only have 1 line

When we issue this command, we are getting:

robot# show ip route vrf green json
{}
% VRF green not found
robot# show ip route vrf green
% VRF green not found
% VRF green not found
robot#

Fix the command so it only displays one line of output
for json or non-json output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Only need 1 return from a function
Donald Sharp [Tue, 31 Jul 2018 19:19:47 +0000 (15:19 -0400)]
pimd: Only need 1 return from a function

When there is a return at the end of a function, there
is no need for another one immediately after it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: pim_socket_join_source is only called from one place
Donald Sharp [Tue, 31 Jul 2018 19:11:42 +0000 (15:11 -0400)]
pimd: pim_socket_join_source is only called from one place

The pim_socket_join_source function only ever calls
pim_igmp_join_source and pim_socket_join_source is only
called from 1 place.  Skip the level of indirection.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2760 from donaldsharp/bgp_patch_from_dev
Russ White [Thu, 2 Aug 2018 12:15:29 +0000 (08:15 -0400)]
Merge pull request #2760 from donaldsharp/bgp_patch_from_dev

bgpd: Fix show ip bgp summary json command for dynamicPeers

5 years agoMerge pull request #2761 from donaldsharp/rip_memory
Russ White [Thu, 2 Aug 2018 12:14:39 +0000 (08:14 -0400)]
Merge pull request #2761 from donaldsharp/rip_memory

ripd: Use memory management for interface commands in RIP

5 years agoMerge pull request #2771 from qlyoung/fix-zserv-shutdown-crash-3
Russ White [Thu, 2 Aug 2018 12:07:43 +0000 (08:07 -0400)]
Merge pull request #2771 from qlyoung/fix-zserv-shutdown-crash-3

zebra: don't close client socket from I/O pthread mc crasherson mc crashy crash bandicoot

5 years agoMerge pull request #2767 from donaldsharp/bgp_timers
Russ White [Thu, 2 Aug 2018 00:14:35 +0000 (20:14 -0400)]
Merge pull request #2767 from donaldsharp/bgp_timers

bgpd: Intentionally stop some timers on instance removal

5 years agolib: Ensure read/write fd's are in range
Donald Sharp [Wed, 1 Aug 2018 19:07:07 +0000 (15:07 -0400)]
lib: Ensure read/write fd's are in range

Ensure that we can properly handle a passed in read/write
fd for using in poll.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: don't close client socket from I/O pthread
Quentin Young [Wed, 1 Aug 2018 19:27:13 +0000 (19:27 +0000)]
zebra: don't close client socket from I/O pthread

The client socket value can only be modified by the main thread.
Modifying the client socket from within the client I/O pthread
introduces race conditions.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: ensure cleanup of rib on client close
Quentin Young [Wed, 1 Aug 2018 19:38:41 +0000 (19:38 +0000)]
zebra: ensure cleanup of rib on client close

Socket should be closed in zserv_client_free() and nowhere else.

Credit to Mark Stapp for catching this one.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2769 from ajones-rvbd/ajones-frr-reload
Donald Sharp [Wed, 1 Aug 2018 18:09:24 +0000 (14:09 -0400)]
Merge pull request #2769 from ajones-rvbd/ajones-frr-reload

tools/frr: make frr reload error message clearer on missing frr-reload.py

5 years agotools/frr: make frr reload error message clearer on missing frr-reload.py
Arthur Jones [Wed, 1 Aug 2018 16:22:52 +0000 (09:22 -0700)]
tools/frr: make frr reload error message clearer on missing frr-reload.py

Only frr-reload.py pulls in a python depenedency for frr, we can
reduce the size of the base frr package by a lot if we separate
out frr-pythontools.  When we do this, we get a somewhat cryptic
error message when frr-reload.py is missing on frr reload.

Here, we pull the error message from frr-reload script, which is
much clearer.

Testing done:

frr reload both with and without the frr-reload.py script, see
the frr-reload message when missing and it runs frr-reload.py when
not missing.

Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
5 years agoMerge pull request #2766 from lyq140/branch1
Donald Sharp [Wed, 1 Aug 2018 14:42:52 +0000 (10:42 -0400)]
Merge pull request #2766 from lyq140/branch1

ripd: null check key

5 years agoMerge pull request #2765 from opensourcerouting/fix-getsockoptdata
Donald Sharp [Wed, 1 Aug 2018 14:17:30 +0000 (10:17 -0400)]
Merge pull request #2765 from opensourcerouting/fix-getsockoptdata

lib: fix getsockopt_cmsg_data retrieval

5 years agobgpd: Intentionally stop some timers on instance removal
Donald Sharp [Wed, 1 Aug 2018 13:29:43 +0000 (09:29 -0400)]
bgpd: Intentionally stop some timers on instance removal

When a bgp instance is stopped, with a `no router bgp..`
make sure any timers associated with the instance are stopped
as well.

This issue was discovered when a customer issued a `no router bgp`
while a maxmed timer was operative.  The max-med timer used the
`struct bgp *` as the passed in value for the thread.  The
thread eventually popped after the cleanup and attempted to use
data off in lala land and crashed

Ticket: CM-21895
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripd: null check key
lyq140 [Wed, 1 Aug 2018 12:48:36 +0000 (20:48 +0800)]
ripd: null check key

Fix ripd crash of null pointer.
when authenticate a rip packet,
the key pointer or the key string pointer may be null,
the code have to return then.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
5 years agolib: fix getsockopt_cmsg_data retrieval
Rafael Zalamena [Wed, 30 May 2018 20:04:57 +0000 (17:04 -0300)]
lib: fix getsockopt_cmsg_data retrieval

The `type` parameter was not being compared with `cmsg_type`, so the
result of this function was always a pointer to the first header
matching the level.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #2763 from lyq140/master
Donald Sharp [Wed, 1 Aug 2018 11:56:50 +0000 (07:56 -0400)]
Merge pull request #2763 from lyq140/master

ripd: null check the key string

5 years agoripd: null check the key string
lyq140 [Wed, 1 Aug 2018 04:03:24 +0000 (12:03 +0800)]
ripd: null check the key string

This fix a crash of  null pointer.
when we don't add a key string or delete it,
the key is not null but key string is null,
so the code have to return.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
5 years agoMerge pull request #2759 from donaldsharp/pim_duplicate
Russ White [Wed, 1 Aug 2018 01:11:28 +0000 (21:11 -0400)]
Merge pull request #2759 from donaldsharp/pim_duplicate

Pim duplicate

5 years agoMerge pull request #2755 from ton31337/feature/default-originate_apply_route-maps
Russ White [Wed, 1 Aug 2018 01:09:06 +0000 (21:09 -0400)]
Merge pull request #2755 from ton31337/feature/default-originate_apply_route-maps

bgpd: Make sure default-originate works without route-map as well

5 years agoMerge pull request #2752 from qlyoung/doc-fix-rpki-index-error
Russ White [Wed, 1 Aug 2018 01:06:33 +0000 (21:06 -0400)]
Merge pull request #2752 from qlyoung/doc-fix-rpki-index-error

Fix various rpki.rst errors (again)

5 years agoripd: Use memory management for interface commands in RIP
Donald Sharp [Tue, 31 Jul 2018 23:31:09 +0000 (19:31 -0400)]
ripd: Use memory management for interface commands in RIP

During code inspection it was noticed that rip is not fully
using FRR memory code as it should.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix show ip bgp summary json command for dynamicPeers
Dongling Duan [Tue, 31 Jul 2018 23:00:31 +0000 (19:00 -0400)]
bgpd: Fix show ip bgp summary json command for dynamicPeers

The dn_count for dynamic Peers was not being updated when
using json output.

Signed-off-by: Dongling Duan <dlduan@amazon.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Abstract a RPF change for upstream handling
Donald Sharp [Tue, 31 Jul 2018 22:27:54 +0000 (18:27 -0400)]
pimd: Abstract a RPF change for upstream handling

Abstract the RPF change for upstream handling code so
that we do not have two copies of the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Abstract sending of data to peers
Donald Sharp [Tue, 31 Jul 2018 21:40:37 +0000 (17:40 -0400)]
pimd: Abstract sending of data to peers

After we have decided what has changed as part of a update
we need to send the j/p messages to our peers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2753 from qlyoung/fix-zebra-shutdown-crash-2
Jafar Al-Gharaibeh [Tue, 31 Jul 2018 15:31:55 +0000 (10:31 -0500)]
Merge pull request #2753 from qlyoung/fix-zebra-shutdown-crash-2

Fix zebra shutdown crash: Round 3

5 years agobgpd: Make sure default-originate works without route-map as well
Donatas Abraitis [Tue, 31 Jul 2018 07:15:51 +0000 (10:15 +0300)]
bgpd: Make sure default-originate works without route-map as well

5 years agozebra: dont delete pthreads from under themselves
Quentin Young [Thu, 26 Jul 2018 00:27:40 +0000 (00:27 +0000)]
zebra: dont delete pthreads from under themselves

* Rename some things to be less confusing
* Convert client close function to take a client struct rather than a
  task
* Extern client close function and use it when handling SIGTERM

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: remove unknown option role from rpki.rst
Quentin Young [Mon, 30 Jul 2018 18:58:38 +0000 (18:58 +0000)]
doc: remove unknown option role from rpki.rst

Options must be documented before they can be cross-referenced, and the
scope for configure options is not present in rpki.rst. Remove the
option role tag from the `-M` option to remove the build warning.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: unindent index block content in rpki.rst
Quentin Young [Mon, 30 Jul 2018 18:55:48 +0000 (18:55 +0000)]
doc: unindent index block content in rpki.rst

Index directives cannot contain content.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoUpdate bgp_clist.c
Christoffer Hansen [Sun, 29 Jul 2018 14:57:12 +0000 (16:57 +0200)]
Update bgp_clist.c

5 years agobgpd: Add missing bgp well-known communities
Christoffer [Thu, 19 Jul 2018 11:29:11 +0000 (13:29 +0200)]
bgpd: Add missing bgp well-known communities

Updated the list with listed well-known communities from document IANA's https://www.iana.org/assignments/bgp-well-known-communities/bgp-well-known-communities.txt with last update date as of 2018-03-07.

- GRACEFUL_SHUTDOWN moved to 2nd entry in all lists in touched code.
- Added ACCEPT_OWN - [RFC7611]
- Added ROUTE_FILTER_TRANSLATED_v4 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_v4 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_TRANSLATED_v6 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_v6 - currently [draft-l3vpn-legacy-rtc]
- Added LLGR_STALE - currently [draft-uttaro-idr-bgp-persistence]
- Added NO_LLGR - currently [draft-uttaro-idr-bgp-persistence]
- Added accept-own-nexthop - currently [draft-agrewal-idr-accept-own-nexthop]
- Added BLACKHOLE - [RFC7999]
- Added NOPEER - [RFC3765]

5 years agoMerge pull request #2696 from sworleys/Netlink-Fuzz
Russ White [Sun, 29 Jul 2018 12:33:43 +0000 (08:33 -0400)]
Merge pull request #2696 from sworleys/Netlink-Fuzz

zebra: Add code for fuzzing netlink

5 years agoMerge pull request #2700 from sworleys/Netlink-Prefix-Len-Check
Russ White [Sun, 29 Jul 2018 12:32:14 +0000 (08:32 -0400)]
Merge pull request #2700 from sworleys/Netlink-Prefix-Len-Check

zebra: Add check for prefix length from kernel messages

5 years agoMerge pull request #2728 from donaldsharp/table_cleanup
Russ White [Sun, 29 Jul 2018 12:24:38 +0000 (08:24 -0400)]
Merge pull request #2728 from donaldsharp/table_cleanup

lib: Add parameter names as a hint of what is expected.

5 years agoMerge pull request #2735 from sworleys/Netlink-Next-Fault
Russ White [Sun, 29 Jul 2018 11:58:01 +0000 (07:58 -0400)]
Merge pull request #2735 from sworleys/Netlink-Next-Fault

zebra: Check for netlink message next fault

5 years agoMerge pull request #2748 from chiragshah6/evpn_dev
Russ White [Sun, 29 Jul 2018 11:53:31 +0000 (07:53 -0400)]
Merge pull request #2748 from chiragshah6/evpn_dev

zebra: display consistant mac count

5 years agozebra: display consistant mac count
Chirag Shah [Sat, 28 Jul 2018 18:23:10 +0000 (11:23 -0700)]
zebra: display consistant mac count

show evpn mac vni all
show evpn mac vni x
does not display local svi and anycast mac into count.

Ticket:CM-20456
Testing Done:

Before:

TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 4
MAC               Type   Intf/Remote VTEP      VLAN
44:38:39:00:6b:4c local  vlan1008              1008
00:02:00:00:00:04 local  hostbond5             1008
00:02:00:00:00:02 local  hostbond4             1008
00:00:5e:00:01:01 local  vlan1008-v0           1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15
dell-s6000-07#

After:

TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 6
MAC               Type   Intf/Remote VTEP      VLAN
44:38:39:00:6b:4c local  vlan1008              1008
00:02:00:00:00:04 local  hostbond5             1008
00:02:00:00:00:02 local  hostbond4             1008
00:00:5e:00:01:01 local  vlan1008-v0           1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #2719 from pguibert6WIND/fix_tableno_vrf
Lou Berger [Sat, 28 Jul 2018 14:42:07 +0000 (10:42 -0400)]
Merge pull request #2719 from pguibert6WIND/fix_tableno_vrf

zebra: fix missing table identifier passed for ip route vrf commands

5 years agoMerge pull request #2742 from vangheem/master
Lou Berger [Sat, 28 Jul 2018 14:29:10 +0000 (10:29 -0400)]
Merge pull request #2742 from vangheem/master

fix json output when vrf not active

5 years agoMerge pull request #2746 from chiragshah6/mdev1
Lou Berger [Sat, 28 Jul 2018 14:18:12 +0000 (10:18 -0400)]
Merge pull request #2746 from chiragshah6/mdev1

bgpd: add keepalive thread name

5 years agoMerge pull request #2745 from adharkar/frr-filtered_route
Lou Berger [Sat, 28 Jul 2018 14:16:20 +0000 (10:16 -0400)]
Merge pull request #2745 from adharkar/frr-filtered_route

bgpd: Show routes filtered by prefix-list in filter-routes command

5 years agobgpd: add keepalive thread name
Chirag Shah [Thu, 26 Jul 2018 21:20:54 +0000 (14:20 -0700)]
bgpd: add keepalive thread name

Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: route detail output local pref display
Chirag Shah [Thu, 26 Jul 2018 04:57:54 +0000 (21:57 -0700)]
bgpd: route detail output local pref display

Avoid displaying default configured local preference as
part of bgp route's detail output.
Local preference is for iBGP learnt route's. The value could be
default (100) or configured value (via routemap or local pref config cmd).
show bgp afi safi (brief output) does not display,
if the local pref attribute is not set.
Similarly, show bgp afi safi detail route output should display
if the the attribute is set, and should not display configured value.
This way both output would be consistent.
The configured local preference can be seen via running-config.

Ticket:CM-12769
Reviewed By:
Testing Done:

eBGP output:
show bgp ipv4 45.0.3.0/24
BGP routing table entry for 45.0.3.0/24
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Local
    0.0.0.0 from 0.0.0.0 (27.0.0.9)
      Origin incomplete, metric 0, weight 32768, valid,sourced, bestpath-from-AS Local, best
      AddPath ID: RX 0, TX 7
      Last update: Thu Jul 26 02:10:02 2018

iBGP output:

show bgp ipv4 unicast 6.0.0.16/32
BGP routing table entry for 6.0.0.16/32
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    6.0.0.16 (metric 20) from tor-12(6.0.0.16) (6.0.0.16)
      Origin incomplete, metric 0, localpref 100, valid, internal, bestpath-from-AS Local, best
      AddPath ID: RX 0, TX 13
      Last update: Thu Jul 26 05:26:18 2018

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: Show routes filtered by prefix-list in filter-routes command
Ameya Dharkar [Fri, 27 Jul 2018 18:23:32 +0000 (11:23 -0700)]
bgpd: Show routes filtered by prefix-list in filter-routes command
Update:Addressed review comments

Changed "show bgp ipv4 neighbor filtered-routes"
to show routes filtered by prefx lists, distribute lists and filter lists

Closes: #2653
Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agoMerge pull request #2743 from donaldsharp/bgp_null_stuff
Lou Berger [Fri, 27 Jul 2018 16:45:08 +0000 (12:45 -0400)]
Merge pull request #2743 from donaldsharp/bgp_null_stuff

Put back some removed Code

5 years agolib,zebra: fix json output when vrf1 when not active
Nathan Van Gheem [Fri, 27 Jul 2018 14:09:38 +0000 (10:09 -0400)]
lib,zebra: fix json output when vrf1 when not active

When I did a show ip route with `json` on a vrf when it didn't exist,
frr would output invalid json.

Signed-off-by: Nathan Van Gheem <nathan@cumulusnetworks.com>
5 years agobgpd: Notice when we unlock if we should NULL pointer
Donald Sharp [Fri, 27 Jul 2018 14:02:34 +0000 (10:02 -0400)]
bgpd: Notice when we unlock if we should NULL pointer

The bi->net pointer that is being unlocked had a commit
that removed the `bi->net = NULL;` recently.  This code
was preventing a use after free crash being experienced
in other code paths.  While commit 37e679629f9 was fixing
a different code path crash.

Make the parent->net pointer aware it may be locked/freed
from multiple places and to not NULL the pointer to it
unless we have actually freed the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Modify route unlock code to return appropriate pointer
Donald Sharp [Fri, 27 Jul 2018 13:54:39 +0000 (09:54 -0400)]
lib: Modify route unlock code to return appropriate pointer

Modify the unlock code for a route_node to return NULL on
pointer freed or to return the node itself again.

We'll need to go through the code and fix this pattern,
but this is a problem for another day.  Get this fix in
place and we can make it a low hanging problem to fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2708 from ton31337/feature/default-originate_apply_route-maps
Russ White [Fri, 27 Jul 2018 13:05:43 +0000 (09:05 -0400)]
Merge pull request #2708 from ton31337/feature/default-originate_apply_route-maps

bgpd: Set attributes according route-maps if applied for default-originate

5 years agoMerge pull request #2737 from vishaldhingra/master
Russ White [Fri, 27 Jul 2018 13:05:00 +0000 (09:05 -0400)]
Merge pull request #2737 from vishaldhingra/master

bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

5 years agozebra: fix missing table identifier passed for ip route vrf commands
Philippe Guibert [Wed, 25 Jul 2018 09:32:13 +0000 (11:32 +0200)]
zebra: fix missing table identifier passed for ip route vrf commands

The parameter was missing in that vty command. Then it is being added.
Also some documentation is refreshed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #1 from vishaldhingra/bug_fix
vishaldhingra [Fri, 27 Jul 2018 04:37:33 +0000 (10:07 +0530)]
Merge pull request #1 from vishaldhingra/bug_fix

bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

5 years agobgpd: Set attributes according route-maps if applied for default-originate
Donatas Abraitis [Tue, 24 Jul 2018 13:42:53 +0000 (16:42 +0300)]
bgpd: Set attributes according route-maps if applied for default-originate

5 years agoMerge pull request #2729 from qlyoung/doc-misc-bgp-fixes
Russ White [Fri, 27 Jul 2018 02:32:40 +0000 (22:32 -0400)]
Merge pull request #2729 from qlyoung/doc-misc-bgp-fixes

doc: misc bgp.rst fixes

5 years agobgpd: Show routes filtered by prefix-list in filter-routes command
Ameya Dharkar [Thu, 26 Jul 2018 21:48:05 +0000 (14:48 -0700)]
bgpd: Show routes filtered by prefix-list in filter-routes command

Changed "show bgp ipv4 neighbor <peer> filtered-routes"
to show routes filtered by prefx lists, distribute lists and filter lists

Closes: #2653
Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agozebra: Check for netlink message next fault
Stephen Worley [Thu, 26 Jul 2018 20:12:05 +0000 (16:12 -0400)]
zebra: Check for netlink message next fault

NLMSG_NEXT decrements the buffer length (status) by
the header msg length (nlmsg_len) everytime its called.
If nlmsg_len isn't accurate and set to be larger than
what it should represent, it will cause status to
decrement passed 0. This makes NLMSG_NEXT return a
pointer that references an inaccessible address.
When that is passed to NLMSG_OK, it segfaults.

Add a check to verify that there is still something to read
before we try to.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge branch 'master' into Netlink-Prefix-Len-Check
Stephen Worley [Thu, 26 Jul 2018 19:34:56 +0000 (15:34 -0400)]
Merge branch 'master' into Netlink-Prefix-Len-Check

5 years agozebra: Make prefix length check return error
Stephen Worley [Thu, 26 Jul 2018 19:10:53 +0000 (15:10 -0400)]
zebra: Make prefix length check return error

Prefix length validation checks should be returning an error
rather than 0. Switch to that and make them error messages.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoStyle, don't initialize netlink_read flag
Stephen Worley [Thu, 26 Jul 2018 18:34:28 +0000 (14:34 -0400)]
Style, don't initialize netlink_read flag

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Make fuzzer code use default netlink socket
Stephen Worley [Thu, 26 Jul 2018 18:30:04 +0000 (14:30 -0400)]
zebra: Make fuzzer code use default netlink socket

Change the fuzzing code so that it fakes data from
the listening socket rather than using its own pseudo one.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #2727 from donaldsharp/pim_jp_lollipops
Jafar Al-Gharaibeh [Thu, 26 Jul 2018 15:18:39 +0000 (10:18 -0500)]
Merge pull request #2727 from donaldsharp/pim_jp_lollipops

pimd: RPT Prunes do not need to be figured for a *,G Prune

5 years agoMerge pull request #2607 from pguibert6WIND/complement_fs_patch3
Donald Sharp [Thu, 26 Jul 2018 13:25:35 +0000 (09:25 -0400)]
Merge pull request #2607 from pguibert6WIND/complement_fs_patch3

Complement fs patch3