]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #2248 from ppmathis/enhancement/bgp-adjacent-routes
Jafar Al-Gharaibeh [Sun, 27 May 2018 16:53:33 +0000 (12:53 -0400)]
Merge pull request #2248 from ppmathis/enhancement/bgp-adjacent-routes

bgpd: Improve show commands for adjacent routes (advertised/received-routes)

6 years agoMerge pull request #2283 from donaldsharp/ignore_some_more
Russ White [Sun, 27 May 2018 15:02:15 +0000 (11:02 -0400)]
Merge pull request #2283 from donaldsharp/ignore_some_more

zebra: netlink cleanups

6 years agoMerge pull request #2291 from qlyoung/top-cleanup
Russ White [Sun, 27 May 2018 15:00:28 +0000 (11:00 -0400)]
Merge pull request #2291 from qlyoung/top-cleanup

*: remove update-autotools

6 years agoMerge pull request #2295 from qlyoung/sort-vni
Russ White [Sun, 27 May 2018 14:59:19 +0000 (10:59 -0400)]
Merge pull request #2295 from qlyoung/sort-vni

sort vni's

6 years agoMerge pull request #2289 from qlyoung/list-sort
Russ White [Sun, 27 May 2018 14:56:57 +0000 (10:56 -0400)]
Merge pull request #2289 from qlyoung/list-sort

linklist sorting + hash table -> linklist

6 years agoMerge pull request #2301 from LabNConsulting/working/master/bgpd-issue-2263-no-label...
Russ White [Sun, 27 May 2018 14:51:43 +0000 (10:51 -0400)]
Merge pull request #2301 from LabNConsulting/working/master/bgpd-issue-2263-no-label-auto

bgpd: issue 2263: fix "no label vpn export auto"

6 years agobgpd: issue 2263: fix "no label vpn export auto"
G. Paul Ziemba [Sat, 26 May 2018 14:05:42 +0000 (07:05 -0700)]
bgpd: issue 2263: fix "no label vpn export auto"

This command should unset the label (instead of wrongly
setting to "auto")

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agozebra: Add a breadcrumb for when we ignore a route
Donald Sharp [Fri, 25 May 2018 18:45:16 +0000 (14:45 -0400)]
zebra: Add a breadcrumb for when we ignore a route

When we receive a route that we think we own and we
are not in startup conditions, then add a small debug
to help debug the issue when this happens, instead
of silently just ignoring the route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agotools, zebra: Use different protocol value for our statics
Donald Sharp [Fri, 25 May 2018 18:36:12 +0000 (14:36 -0400)]
tools, zebra: Use different protocol value for our statics

The re-use of RTPROT_STATIC has caused too many collisions
where other legitimate route sources are causing us to
believe we are the originator of the route.  Modify
the code so that if another protocol inserts RTPROT_STATIC
we will assume it's a Kernel Route.

Fixes: #2293
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2300 from ajones-rvbd/ajones-issue-2299
Donald Sharp [Fri, 25 May 2018 22:44:40 +0000 (18:44 -0400)]
Merge pull request #2300 from ajones-rvbd/ajones-issue-2299

zebra/if_netlink: trivial cleanup of IFLA_WIRELESS

6 years agozebra/if_netlink: trivial cleanup of IFLA_WIRELESS
Arthur Jones [Fri, 25 May 2018 21:34:32 +0000 (14:34 -0700)]
zebra/if_netlink: trivial cleanup of IFLA_WIRELESS

With:
commit ba7773964c87019308e65a15b509e9889f7edc49
Author: Renato Westphal <renato@opensourcerouting.org>
Date:   Wed Sep 20 22:12:56 2017 -0300

We added our own copy of if_link.h (among others).  This
file unconditionally defines IFLA_WIRELESS, so we don't need
the conditional defines in the if_netlink.c code...

Issue: https://github.com/FRRouting/frr/issues/2299
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
6 years agoMerge pull request #2272 from msablic/vtysh_reconnect
Quentin Young [Fri, 25 May 2018 18:09:44 +0000 (14:09 -0400)]
Merge pull request #2272 from msablic/vtysh_reconnect

vtysh: reconnect to daemons when connection lost

6 years agobgpd: sort vni's in running config
Quentin Young [Fri, 25 May 2018 16:39:38 +0000 (16:39 +0000)]
bgpd: sort vni's in running config

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add proper doc comments for hash & linklist
Quentin Young [Thu, 24 May 2018 18:43:57 +0000 (18:43 +0000)]
lib: add proper doc comments for hash & linklist

* Remove references to ospf source files from linklist.[ch]
* Remove documentation comments from hash.c and linklist.c
* Add comprehensive documentation comments to linklist.h and hash.h

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add hash_to_list()
Quentin Young [Thu, 24 May 2018 15:44:54 +0000 (15:44 +0000)]
lib: add hash_to_list()

Convenience function to convert hash table to an unsorted linked list.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add list_sort(), list_dup()
Quentin Young [Thu, 24 May 2018 07:04:48 +0000 (07:04 +0000)]
lib: add list_sort(), list_dup()

* list_dup(): duplicates a linked list
* list_sort(): in-place sort of linked list w/ ascending quicksort

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2282 from dslicenc/cm20939-nbr-msg
Renato Westphal [Fri, 25 May 2018 13:20:39 +0000 (10:20 -0300)]
Merge pull request #2282 from dslicenc/cm20939-nbr-msg

bgpd: improve error message for neighbor not found

6 years ago*: remove update-autotools
Quentin Young [Thu, 24 May 2018 22:45:49 +0000 (22:45 +0000)]
*: remove update-autotools

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: additional neighbor message improvement
Don Slice [Thu, 24 May 2018 14:58:37 +0000 (10:58 -0400)]
bgpd: additional neighbor message improvement

Added improved error message text to other places that could also
encounter the same condition.  In testing found that in certain
case, duplicate error messages were previously issued.  This fix
also removes the duplicates.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agobgpd: improve error message for neighbor not found
Don Slice [Wed, 23 May 2018 12:09:59 +0000 (08:09 -0400)]
bgpd: improve error message for neighbor not found

Problem reported due to tab completion showing all possible peers
in every vrf, but when neighbor in wrong vrf entered "no such
neighbor" is the error message.  Making it slightly more clear
with "no such neighbor in the view/vrf" to clue the user that they
may have specified the wrong vrf.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agozebra: Fix RULE notification netlink messages
Donald Sharp [Thu, 24 May 2018 13:03:11 +0000 (09:03 -0400)]
zebra: Fix RULE notification netlink messages

Fix the code so that we would actually start receiving
RULE netlink notifications.

The Kernel expects the long long to be a bit field
value, while the newer netlink message types are
an enum.  So we need to convert the message type
number to a bit position and set that value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Remove unnecessary function parameter
Donald Sharp [Wed, 23 May 2018 13:37:06 +0000 (09:37 -0400)]
zebra: Remove unnecessary function parameter

The snl variable is no longer needed to be passed around, so
remove it from the calling path.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move where we check for non-kernel netlink messages
Donald Sharp [Wed, 23 May 2018 13:24:12 +0000 (09:24 -0400)]
zebra: Move where we check for non-kernel netlink messages

Move where we check for non-kernel netlink messages to
a slightly earlier spot.  This will allow in subsuquent
commits the removal of an extra parameter that needs to
be passed around.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Ignore most netlink notifications from ourselves
Donald Sharp [Wed, 23 May 2018 12:25:51 +0000 (08:25 -0400)]
zebra: Ignore most netlink notifications from ourselves

The BPF filter was an exclusion list of netlink messages
we did not want to receive from our self.  The problem
with this is that the exclusion list was and will be
ever growing.  So switch the test around to an inclusion
list since it is shorter and not growing.  Right
now this is RTM_NEWADDR and RTM_DELADDR.

Change some of the debug messages to error messages
so that when something slips through and it is unexpected
during development we will see the problem.

Also try to improve the documentation about what
the filter is doing and leave some breadcrumbs for
future developers to know where to change code
when new functionality is added.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2279 from donaldsharp/evpn_moo_moo
Renato Westphal [Thu, 24 May 2018 02:17:02 +0000 (23:17 -0300)]
Merge pull request #2279 from donaldsharp/evpn_moo_moo

Evpn SA/CI issues found

6 years agoMerge pull request #2278 from donaldsharp/uninited_variable
Renato Westphal [Thu, 24 May 2018 01:58:52 +0000 (22:58 -0300)]
Merge pull request #2278 from donaldsharp/uninited_variable

bgpd: Fix use of uninitialized variable

6 years agoMerge pull request #2254 from qlyoung/fixup-vtysh-comments
Rafael Zalamena [Wed, 23 May 2018 17:00:15 +0000 (14:00 -0300)]
Merge pull request #2254 from qlyoung/fixup-vtysh-comments

misc cleanup for comments + docs

6 years agodoc: remove duplicated packages from dep list
Quentin Young [Wed, 23 May 2018 15:35:41 +0000 (15:35 +0000)]
doc: remove duplicated packages from dep list

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: make `frr` a system group
Quentin Young [Tue, 22 May 2018 21:23:37 +0000 (21:23 +0000)]
doc: make `frr` a system group

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: add install-info build dependency
Quentin Young [Tue, 22 May 2018 21:19:28 +0000 (21:19 +0000)]
doc: add install-info build dependency

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: remove recommendation against integrated conf
Quentin Young [Thu, 17 May 2018 21:07:32 +0000 (21:07 +0000)]
doc: remove recommendation against integrated conf

Missed this in code review

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: clean up 18.04 build doc
Quentin Young [Thu, 17 May 2018 21:06:32 +0000 (21:06 +0000)]
doc: clean up 18.04 build doc

Some excess underlines, 4-space indents and typos cleaned up.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agovtysh: rewrap comments
Quentin Young [Thu, 17 May 2018 17:04:57 +0000 (17:04 +0000)]
vtysh: rewrap comments

fixup comments for vtysh

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2280 from qlyoung/docuser
Renato Westphal [Tue, 22 May 2018 18:52:27 +0000 (15:52 -0300)]
Merge pull request #2280 from qlyoung/docuser

doc: move -r option docs to zebra only

6 years agoMerge pull request #2277 from pguibert6WIND/fix_case_zclient_broken
Donald Sharp [Tue, 22 May 2018 18:44:31 +0000 (14:44 -0400)]
Merge pull request #2277 from pguibert6WIND/fix_case_zclient_broken

zebra: upon zclient breaking, flush PBR entries

6 years agodoc: move -r option docs to zebra only
Quentin Young [Tue, 22 May 2018 17:50:30 +0000 (17:50 +0000)]
doc: move -r option docs to zebra only

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2268 from opensourcerouting/rpki-spec-fix
Donald Sharp [Tue, 22 May 2018 17:11:21 +0000 (13:11 -0400)]
Merge pull request #2268 from opensourcerouting/rpki-spec-fix

redhat: Fix RPKI RPM build option (Master Branch)

6 years agoMerge pull request #2273 from qlyoung/remove-retain-mode
Renato Westphal [Tue, 22 May 2018 15:49:24 +0000 (12:49 -0300)]
Merge pull request #2273 from qlyoung/remove-retain-mode

*: remove -r from daemons except zebra

6 years agozebra: upon zclient breaking, flush PBR entries
Philippe Guibert [Tue, 22 May 2018 10:22:08 +0000 (12:22 +0200)]
zebra: upon zclient breaking, flush PBR entries

In case, the BGP or PBR daemon leaves, the PBR contexts created by this
daemon are flushed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #2257 from donaldsharp/evpn_fixes
Lou Berger [Tue, 22 May 2018 15:33:01 +0000 (11:33 -0400)]
Merge pull request #2257 from donaldsharp/evpn_fixes

bgpd: Lock the parent rn as well

6 years agoMerge pull request #2220 from LabNConsulting/working/master/fix-asan
Quentin Young [Tue, 22 May 2018 15:15:28 +0000 (11:15 -0400)]
Merge pull request #2220 from LabNConsulting/working/master/fix-asan

*: fix compile with -enable-address-sanitizer configured

6 years agobgpd: Ensure virt->vrfs is valid
Donald Sharp [Tue, 22 May 2018 14:54:20 +0000 (10:54 -0400)]
bgpd: Ensure virt->vrfs is valid

Move the list_delete_and_null of the virt->vrfs code to
the actual deletion function to ensure proper lifecycle.
This assumption allows us to know that irt->vrfs is always
true so remove the NULL check on it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Free vni list on actual deletion
Donald Sharp [Tue, 22 May 2018 14:50:53 +0000 (10:50 -0400)]
bgpd: Free vni list on actual deletion

The irt->vnis list was being freed on going down,
but actually delete it from the deletion function.  Then
we can know that the irt->vnis is a valid list anywhere
we have a irt pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Ensure we don't dereference a non-valid pointer
Donald Sharp [Tue, 22 May 2018 14:44:32 +0000 (10:44 -0400)]
bgpd: Ensure we don't dereference a non-valid pointer

The attr->ecommunity may be null coming into the function
at this point.  Ensure that it is.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix use of uninitialized variable
Donald Sharp [Tue, 22 May 2018 13:53:01 +0000 (09:53 -0400)]
bgpd: Fix use of uninitialized variable

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2262 from donaldsharp/v6_replace_semantics
Renato Westphal [Tue, 22 May 2018 12:05:06 +0000 (09:05 -0300)]
Merge pull request #2262 from donaldsharp/v6_replace_semantics

V6 replace semantics

6 years ago*: remove -r from daemons except zebra
Quentin Young [Wed, 16 May 2018 21:07:54 +0000 (21:07 +0000)]
*: remove -r from daemons except zebra

This option is only implemented by 4 daemons:
- BGPD
- RIPD
- RIPNGD
- Zebra

Manpages and documentation say that the option causes routes to not be
uninstalled from zebra when the daemon terminates. This is true for RIPD
and RIPNGD. This is not true for BGPD; in that daemon it only prevents
transmission of Cease / Peer Unconfig NOTIFICATION messages to peers.

Moreover, when any daemon disconnects from Zebra, all of its routes are
uninstalled from Zebra and the kernel regardless of this option,
rendering the option largely vestigial.

It is still useful in Zebra, where it prevents all routes from being
uninstalled when Zebra shuts down, so it is left there.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agovtysh: reconnect to daemons when connection lost
Mladen Sablic [Mon, 21 May 2018 18:00:51 +0000 (20:00 +0200)]
vtysh: reconnect to daemons when connection lost

Functionality to let vtysh attempt to reconnect to daemons when
connection is lost (e.g. crash or restart).

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
6 years agoMerge pull request #2267 from donaldsharp/flim_flam
Renato Westphal [Mon, 21 May 2018 12:49:45 +0000 (09:49 -0300)]
Merge pull request #2267 from donaldsharp/flim_flam

zebra: Cleanup some nits from Review Comments

6 years agozebra: Cleanup some nits from Review Comments
Donald Sharp [Mon, 21 May 2018 11:18:18 +0000 (07:18 -0400)]
zebra: Cleanup some nits from Review Comments

1) Small formating mistake fixed
2) Rename of a variable to give it a slightly better name

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2256 from donaldsharp/zebra_vxlan_flim_flam
Philippe Guibert [Mon, 21 May 2018 07:10:21 +0000 (09:10 +0200)]
Merge pull request #2256 from donaldsharp/zebra_vxlan_flim_flam

Zebra performance improvements at scale for vxlan code

6 years agoredhat: Fix RPKI RPM build option
Martin Winter [Sun, 20 May 2018 14:13:02 +0000 (07:13 -0700)]
redhat: Fix RPKI RPM build option

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #2260 from qlyoung/fix-docs-distclean
Rafael Zalamena [Sun, 20 May 2018 01:30:18 +0000 (22:30 -0300)]
Merge pull request #2260 from qlyoung/fix-docs-distclean

doc: fix distclean

6 years agoMerge pull request #2261 from qlyoung/fix-missing-doc
Renato Westphal [Sat, 19 May 2018 13:30:32 +0000 (10:30 -0300)]
Merge pull request #2261 from qlyoung/fix-missing-doc

Fix missing dist files

6 years agobgpd: Fix crash on shutdown
Donald Sharp [Fri, 18 May 2018 01:32:21 +0000 (21:32 -0400)]
bgpd: Fix crash on shutdown

There exists code paths where the rn was being used after free.
This eliminates these code paths.

Fixes: CM-21019
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Add --v6-rr-semantics option to zebra doc
Donald Sharp [Fri, 18 May 2018 19:46:56 +0000 (15:46 -0400)]
doc: Add --v6-rr-semantics option to zebra doc

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agotests: add missing file to Makefile.am
Quentin Young [Fri, 18 May 2018 19:45:10 +0000 (19:45 +0000)]
tests: add missing file to Makefile.am

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: add missing file to Makefile.am
Quentin Young [Fri, 18 May 2018 19:44:58 +0000 (19:44 +0000)]
doc: add missing file to Makefile.am

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agozebra: Allow runtime determination of v6 RR semantics
Donald Sharp [Fri, 18 May 2018 19:41:46 +0000 (15:41 -0400)]
zebra: Allow runtime determination of v6 RR semantics

The linux kernel is getting the same Route Replace semantics
for v6 that v4 uses.  Allow the end-user to know if their
kernel has this ability and if so to specify it so zebra
can take advantage of this.

Why not do auto-detection?  Because you would have to write
code in zebra to add a route then add the same route again
with different nexthops to see if which semantics it is using.
It sure is easier to just add a cli that allows the user to
do it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: fix distclean
Quentin Young [Fri, 18 May 2018 19:10:31 +0000 (19:10 +0000)]
doc: fix distclean

Apparently Automake has some undocumented logic somewhere that makes it
so any Makefile generated from an Automake Makefile.am is removed from
its secret list of things to delete that it deletes when performing a
recursive distclean before actually performing the recursive distclean
and since the secret list is automatically generated from the list of
things that Autoconf should generate in configure.ac we can't remove the
Makefile from that list or it will break Automake's list of things to
automatically generate that it generates from Autoconf's list of things
to automatically generate.

Thus, to prevent Automake from deleting Makefiles and then immediately
trying to use the Makefiles it just deleted to delete said Makefiles, we
must remove ourselves from the secret list, which is accomplished by
changing the file extension to '.am' instead of '.in'.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2198 from LabNConsulting/working/master/bgpd-nht-crash
Donald Sharp [Fri, 18 May 2018 11:51:06 +0000 (07:51 -0400)]
Merge pull request #2198 from LabNConsulting/working/master/bgpd-nht-crash

bgpd: fix NHT free when nht_info is null (fixes crash)

6 years agoMerge pull request #2231 from ppmathis/fix/clear-bgp-afi
Russ White [Fri, 18 May 2018 06:48:59 +0000 (02:48 -0400)]
Merge pull request #2231 from ppmathis/fix/clear-bgp-afi

bgpd: Respect AFI/SAFI when hard-clearing a peer

6 years agoMerge pull request #2252 from donaldsharp/instance_rm_match
Russ White [Fri, 18 May 2018 06:41:23 +0000 (02:41 -0400)]
Merge pull request #2252 from donaldsharp/instance_rm_match

Instance routemap match

6 years agoMerge pull request #2253 from chiragshah6/ospfv3_dev
Russ White [Fri, 18 May 2018 06:39:28 +0000 (02:39 -0400)]
Merge pull request #2253 from chiragshah6/ospfv3_dev

ospf6d: Fix ECMP for asbr external routes

6 years agoMerge pull request #2255 from donaldsharp/rt_netlink_dirty_bits
Russ White [Fri, 18 May 2018 06:37:54 +0000 (02:37 -0400)]
Merge pull request #2255 from donaldsharp/rt_netlink_dirty_bits

Some Valgrind issues found

6 years agobgpd: Clean up some evpn memory leaks
Donald Sharp [Thu, 17 May 2018 22:54:25 +0000 (18:54 -0400)]
bgpd: Clean up some evpn memory leaks

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: memset buf to prevent uninited writes into kernel
Donald Sharp [Thu, 17 May 2018 22:46:14 +0000 (18:46 -0400)]
zebra: memset buf to prevent uninited writes into kernel

Setup the buf used for extra data passed into kernel such
that we are cleaning it out before writing data to it,
so we can avoid writing uninited data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospf6d: Fix ECMP for asbr external routes
Chirag Shah [Tue, 1 May 2018 23:34:31 +0000 (16:34 -0700)]
ospf6d: Fix ECMP for asbr external routes

Use brouter table to fetch nexthops for
asbr prefix (external) routes.
Change adv. router of the router's path once
the DB/FIB is updated with effective nexthops.
Cleanup of nexthop update when route's adv
router changes cost.

Ticket:CM-16139
Testing Done:
Tested ASBR external routes in CLOS topology with
multiple paths asbr originator at tor to spine.
Validated external route's nexthop within
area and inter area.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #2221 from rodnymolina/vtysh_extension
Quentin Young [Thu, 17 May 2018 17:03:11 +0000 (13:03 -0400)]
Merge pull request #2221 from rodnymolina/vtysh_extension

vtysh: Extending vtysh to allow question-mark cmds

6 years agodoc: Add some doc for source-instance
Donald Sharp [Thu, 17 May 2018 15:05:08 +0000 (11:05 -0400)]
doc: Add some doc for source-instance

Add the documentation for match source-instance.
I also noticed that 'match source-protocol' was missing
add that in too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agosharp: Allow the specification of instance when adding/deleting routes
Donald Sharp [Thu, 17 May 2018 14:56:45 +0000 (10:56 -0400)]
sharp: Allow the specification of instance when adding/deleting routes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agosharpd: Add some ability to ignore route-map commands
Donald Sharp [Thu, 17 May 2018 14:30:25 +0000 (10:30 -0400)]
sharpd: Add some ability to ignore route-map commands

Add some ability for sharpd to ignore the route-map commands
when using a integrated config.

signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

6 years agozebra: Add sharp to protocols that you can match source-protocol on
Donald Sharp [Thu, 17 May 2018 14:40:58 +0000 (10:40 -0400)]
zebra: Add sharp to protocols that you can match source-protocol on

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add 'match source-instance' to allow finer grained control
Donald Sharp [Thu, 17 May 2018 14:29:49 +0000 (10:29 -0400)]
zebra: Add 'match source-instance' to allow finer grained control

Add to zebra route-maps the ability to match on a source-instance

route-map FOO deny 55
 match source-instance 5
route-map FOO permit 60

ip protocol any route-map FOO

This will match any protocol route installation with a source-instance of 5.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: The neigh host_list is expensive too
Donald Sharp [Thu, 17 May 2018 12:18:23 +0000 (08:18 -0400)]
zebra: The neigh host_list is expensive too

The neighbor host_list is expensive as well.  Modify
the code to take advantage of a rb_tree as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Rename some functions to allow reuse
Donald Sharp [Thu, 17 May 2018 12:10:41 +0000 (08:10 -0400)]
zebra: Rename some functions to allow reuse

We are going to modify more host_list's to host_rb's
so let's rename some functions to take advantage of
what is there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Convert zrmac->host_list list to a RB Tree
Donald Sharp [Wed, 16 May 2018 23:24:22 +0000 (19:24 -0400)]
zebra: Convert zrmac->host_list list to a RB Tree

The host_list when we attempt to use it at scale, ends
up spending a non-trivial amount of time finding and
sorting entries for the host list.  Convert to a rb tree.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2200 from qlyoung/docuser-gettingstarted
Rafael Zalamena [Wed, 16 May 2018 21:24:36 +0000 (18:24 -0300)]
Merge pull request #2200 from qlyoung/docuser-gettingstarted

doc: add "Getting Started" section

6 years agoMerge pull request #2247 from donaldsharp/sa_sa_sa
Lou Berger [Wed, 16 May 2018 20:59:50 +0000 (16:59 -0400)]
Merge pull request #2247 from donaldsharp/sa_sa_sa

3 SA issues fixed.

6 years agodoc: remove notes about ipv6 packages
Quentin Young [Wed, 16 May 2018 20:08:09 +0000 (20:08 +0000)]
doc: remove notes about ipv6 packages

Kernel 2.2 was released in 1999, I'm pretty sure everybody has it by
now. Plus these links don't even exist anymore.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: add "Getting Started" section
Quentin Young [Thu, 10 May 2018 17:51:08 +0000 (13:51 -0400)]
doc: add "Getting Started" section

While we have docs on various pieces of the build system we don't have
any docs on how to actually get FRR running once it's installed, nor do
we have comprehensive documentation on the basic procedure for building
from source. This patch remedies both of those.

Also updated the services list in the docs and removed the SERVICES file
from the project root.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: Fix memleak, adapt adv- to recv-routes code
Pascal Mathis [Wed, 16 May 2018 19:55:55 +0000 (21:55 +0200)]
bgpd: Fix memleak, adapt adv- to recv-routes code

This commit tries to adapt a similar codeflow within the `show bgp [afi]
[safi] neighbor <neighbor> advertised-routes` command compared to its
`received-routes` and `filtered-routes` opponents. Some branching code
has been restructured to achieve this.

Additionally, this commit fixes a memory leak within `received-routes`
(and `filtered-routes`, although the issue has been present before the
previous commit!) where the previous implementation forgot to
deduplicate the BGP attributes.

When a user called `<...> received-routes route-map <RM-TEST>` and that
routemap changed any AS path or community parameters, the duplicated
memory for these parameters was never freed. This has been fixed by
ensuring to call `bgp_attr_undup()` accordingly.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: Implement new adjacent route show commands
Pascal Mathis [Wed, 16 May 2018 17:17:42 +0000 (19:17 +0200)]
bgpd: Implement new adjacent route show commands

This commit changes the behavior of `show bgp [afi] [safi] neighbor
<neighbor> received-routes [json]` to return all received prefixes
instead of filtering rejected/denied prefixes.

Compared to Cisco and Juniper products, this is the usual way how this
command is supposed to work, as `show bgp [afi] [safi] neighbor
<neighbor> routes` will already return all accepted prefixes.

Additionally, the new command `show bgp [afi] [safi] neighbor <neighbor>
filtered-routes` has been added, which returns a list of all prefixes
that got filtered away, so it can be roughly described as a subset of
"received prefixes - accepted prefixes".

As the already available `filtered_count` variable inside
`show_adj_route` has not been used before, the last output line
summarizing the amount of prefixes found was extended to also mention
the amount of filtered prefixes if present.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoMerge pull request #2034 from vincentbernat/fix/rfc8365-auto-rt
Donald Sharp [Wed, 16 May 2018 16:13:04 +0000 (12:13 -0400)]
Merge pull request #2034 from vincentbernat/fix/rfc8365-auto-rt

bgpd: add an option for RT auto-derivation to use RFC 8635.

6 years agoMerge pull request #2240 from donaldsharp/ubuntu_bull
Martin Winter [Wed, 16 May 2018 15:36:21 +0000 (08:36 -0700)]
Merge pull request #2240 from donaldsharp/ubuntu_bull

Ubuntu 18.04 fixes

6 years agobgpd: Fix memory leak of ecommunity_ecom2str
Donald Sharp [Wed, 16 May 2018 13:54:03 +0000 (09:54 -0400)]
bgpd: Fix memory leak of ecommunity_ecom2str

The creation of a temporary string for the ecommunity
was being leaked when debugging is enabled.  Write
a bit of code to prevent this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: remove unnecessary test and allocate a bit earlier
Donald Sharp [Fri, 20 Apr 2018 15:48:45 +0000 (11:48 -0400)]
bgpd: remove unnecessary test and allocate a bit earlier

The bgp_info_extra_get call gets the extra pointer, which
is also needed for the setlabels() call, so move the call
to above the setlabels.

Also remove an unnecessary test of a pointer since we
have already dereferenced it by the time we are testing
for it's existence.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agovtysh: Fix leaked memory in error case
Donald Sharp [Fri, 20 Apr 2018 15:46:19 +0000 (11:46 -0400)]
vtysh: Fix leaked memory in error case

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2226 from ppmathis/feature/bgp-lc-json
Russ White [Wed, 16 May 2018 01:05:21 +0000 (21:05 -0400)]
Merge pull request #2226 from ppmathis/feature/bgp-lc-json

bgpd: Improve JSON support for large communities

6 years agoMerge pull request #2241 from brotherdust/docdev-ubuntu-1804-build-guide
Quentin Young [Tue, 15 May 2018 21:57:08 +0000 (17:57 -0400)]
Merge pull request #2241 from brotherdust/docdev-ubuntu-1804-build-guide

docdev: Ubuntu 1804 build guide

6 years agoSuggested changes by @qlyoung
Jarad Olson [Tue, 15 May 2018 20:04:54 +0000 (14:04 -0600)]
Suggested changes by @qlyoung

- Changed hard-linked references to soft-link
- Changed configuration options from code block to ``.. option::`` blocks

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoMerge pull request #2239 from ppmathis/enhancement/bgp-routemap-afi
Donald Sharp [Tue, 15 May 2018 18:46:12 +0000 (14:46 -0400)]
Merge pull request #2239 from ppmathis/enhancement/bgp-routemap-afi

bgpd: Improve route-map matching for INET(6) AF

6 years agoAdd more detail around confiugration files
Jarad Olson [Tue, 15 May 2018 18:25:07 +0000 (12:25 -0600)]
Add more detail around confiugration files

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoRe-worded information on MPLS support in 18.04
Jarad Olson [Tue, 15 May 2018 18:04:48 +0000 (12:04 -0600)]
Re-worded information on MPLS support in 18.04

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoFixup code block formatting errors
Jarad Olson [Tue, 15 May 2018 18:01:11 +0000 (12:01 -0600)]
Fixup code block formatting errors

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agobgpd: Prevent possible uninited variable.
Donald Sharp [Tue, 15 May 2018 17:57:40 +0000 (13:57 -0400)]
bgpd: Prevent possible uninited variable.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoChanged apt-get to sudo apt-get
Jarad Olson [Tue, 15 May 2018 17:52:32 +0000 (11:52 -0600)]
Changed apt-get to sudo apt-get

Context should be unpriviliged until explicity stated.

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoSplit compile section into more granular steps
Jarad Olson [Tue, 15 May 2018 17:52:05 +0000 (11:52 -0600)]
Split compile section into more granular steps

- Added reference for additional configure options
- Added configure options for 0MQ and Protobuf

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agopbrd: Fix compilation warn -> error
Donald Sharp [Tue, 15 May 2018 17:34:52 +0000 (13:34 -0400)]
pbrd: Fix compilation warn -> error

The buffer size was insufficiently sized to hold the
entirety of the data being passed in.

Modify the nht code to use a bit bigger buffer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoAdded optional packages section
Jarad Olson [Tue, 15 May 2018 17:51:40 +0000 (11:51 -0600)]
Added optional packages section

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>