]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 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 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 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 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>
6 years agoChange 'Install required packages' to 'Install dependencies'
Jarad Olson [Tue, 15 May 2018 17:51:14 +0000 (11:51 -0600)]
Change 'Install required packages' to 'Install dependencies'

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoChange style of required packages list
Jarad Olson [Tue, 15 May 2018 17:50:34 +0000 (11:50 -0600)]
Change style of required packages list

The required packages list should be easier to parse. Updated the style so it's more similar to the ``./configure`` style later in the document.

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoMPLS kernel module name change
Jarad Olson [Tue, 15 May 2018 17:50:00 +0000 (11:50 -0600)]
MPLS kernel module name change

Names of the MPLS kernel modules changed slightly in recent kernel. Uses underscore instead of dash.

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agoChange order of MPLS configuration
Jarad Olson [Tue, 15 May 2018 17:49:18 +0000 (11:49 -0600)]
Change order of MPLS configuration

MPLS kernel modules should be initialized *before* enabling forwarding. Otherwise, errors.

Signed-off-by: Jarad Olson <brotherdust+github@gmail.com>
6 years agobgpd: Improve route-map matching for INET(6) AF
Pascal Mathis [Tue, 15 May 2018 17:22:25 +0000 (19:22 +0200)]
bgpd: Improve route-map matching for INET(6) AF

While the current implementation does pay attention to the AF
(inet/inet6) when comparing the IPv4/v6 address against an address-list
/ prefix-list inside a route-map, the AF check is being done rather
late, which leads to CPU cycles being wasted due to unnecessary list
lookups / address matching.

This commit checks the address family of a prefix right inside the
`route_match_ip(v6)_` functions before looking up any address- and/or
prefix-list, which should improve performance.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoMerge pull request #2101 from qlyoung/stream-fifo-safe
Rafael Zalamena [Tue, 15 May 2018 15:29:45 +0000 (12:29 -0300)]
Merge pull request #2101 from qlyoung/stream-fifo-safe

lib: add mt-safe variants for stream_fifo ops

6 years agoMerge pull request #2229 from qlyoung/fix-readme-typo
Renato Westphal [Tue, 15 May 2018 14:58:27 +0000 (11:58 -0300)]
Merge pull request #2229 from qlyoung/fix-readme-typo

frr: fix typo in README

6 years agoMerge pull request #2133 from Fredi-raspall/fix_label_manager
Renato Westphal [Tue, 15 May 2018 13:00:12 +0000 (10:00 -0300)]
Merge pull request #2133 from Fredi-raspall/fix_label_manager

Fix broken label manager (proxy-mode) and improve of proxy function

6 years agobgpd: Respect AFI/SAFI when hard-clearing a peer
Pascal Mathis [Mon, 14 May 2018 20:52:31 +0000 (22:52 +0200)]
bgpd: Respect AFI/SAFI when hard-clearing a peer

The current implementation does not respect the AFI+SAFI combination of
a peer when executing a non-soft (hard) clear. An example would be the
command `clear bgp ipv4 unicast *`, which will clear all BGP peers, even
those that do not have IPv4-Unicast activated.

This commit fixes that behavior by applying the same rules to both soft
and hard clear commands, so that peers without a matching AFI+SAFI
combination will be no longer modified.

Additionally, this commit adds warning messages to all `clear bgp
[<afi>] [<safi>] <target>` commands when no matching peers with the given
AFI+SAFI combination could be found.

Both existing and new warning messages have been extended to also
mention the AFI+SAFI combination that is missing, which is more helpful
to the user than a generic expression 'No peer configured'.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agofrr: fix typo in README
Quentin Young [Mon, 14 May 2018 15:06:27 +0000 (11:06 -0400)]
frr: fix typo in README

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2223 from ppmathis/fix/no-password-warnings
Quentin Young [Mon, 14 May 2018 15:01:19 +0000 (11:01 -0400)]
Merge pull request #2223 from ppmathis/fix/no-password-warnings

lib: Improved warnings for 'no (enable) password'

6 years agobgpd: Improve JSON support for large communities
Pascal Mathis [Sun, 13 May 2018 00:29:40 +0000 (02:29 +0200)]
bgpd: Improve JSON support for large communities

The current implementation of building JSON output is greatly different
for large communities compared to standard communities. This is mainly
noticeable by the missing 'list' attribute, which usually offers an
array of all communities present on a BGP route.

This commit adds the missing functionality of properly returning a
'list' attribute in JSON output and also tries a similar approach like
the standard communities are using to implement this feature.

Additionally, the 'format' specifier has been completely removed from
large communities string/JSON rendering, as the official RFC8092 specifies that
there is only one canonical representation:

> The canonical representation of BGP Large Communities is three
> separate unsigned integers in decimal notation in the following
> order: Global Administrator, Local Data 1, Local Data 2. Numbers
> MUST NOT contain leading zeros; a zero value MUST be represented with
> a single zero. Each number is separated from the next by a single
> colon. For example: 64496:4294967295:2, 64496:0:0.

As the 'format' specifier has not been used/checked and only one
canonical representation exists per today, there was no reason to keep
the 'format' parameter in the function signature.

Last but not least, the struct attribute 'community_entry.config' is no
longer being used for large communities and instead 'lcommunity_str' is
being called to maintain a similar approach to standard communities.

As a side effect, this also fixed a memory leak inside 'community_entry_free'
which did not free the allocated memory for the 'config' attribute when
dealing with a large community.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoMerge pull request #2225 from xdel/master
Donald Sharp [Sun, 13 May 2018 17:14:22 +0000 (13:14 -0400)]
Merge pull request #2225 from xdel/master

Fix compilation against rtrlib with ssh

6 years agolib: Moved no-password warnings into header file
Pascal Mathis [Sun, 13 May 2018 17:11:43 +0000 (19:11 +0200)]
lib: Moved no-password warnings into header file

The warning string which appears when the users executes 'no (enable)
password' was moved into command.h and declared as a constant named
'NO_PASSWD_CMD_WARNING'.

This avoids duplicate code and makes it easy to change the warning
message in all places at once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoFix compilation against rtrlib with ssh
Andrey Korolyov [Sun, 13 May 2018 10:36:50 +0000 (13:36 +0300)]
Fix compilation against rtrlib with ssh

Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
6 years agovtysh: Extending vtysh to allow question-mark cmds
Rodny Molina [Fri, 11 May 2018 05:15:48 +0000 (22:15 -0700)]
vtysh: Extending vtysh to allow question-mark cmds

Currently, "vtysh -c" interface does not provide a logic to parse
commands ending with '?' character. In consequence, the following behavior
is observed:

$ vtysh -c "show bgp ?"
 % Unknown command.

With these changes, i'm extending FRR's parser to be able to handle
these commands, which allow a more friendly interaction with users
that rely on "vtysh -c" interface. The typical use-case here is for
scenarios in which the final users relie on external/their-own CLI and
require a friendly interface to FRR's vtysh cli.

$ vtysh -c "show bgp ?"
  <cr>
   A.B.C.D               Network in the BGP routing table to
   display
   A.B.C.D/M             IPv4 prefix
   X:X::X:X              Network in the BGP routing table to display
   X:X::X:X/M            IPv6 prefix
   attribute-info        List all bgp attribute information
   cidr-only             Display only routes with non-natural netmasks
   community             Display routes matching the communities
   community-info        List all bgp community information
 ...

Signed-off-by: Rodny Molina <rmolina@linkedin.com>
6 years agolib: Improved warnings for 'no (enable) password'
Pascal Mathis [Sat, 12 May 2018 18:19:49 +0000 (20:19 +0200)]
lib: Improved warnings for 'no (enable) password'

When the user executes one of the commands 'no password' or 'no enable
password', a warning message gets shown to inform the user of the
security implications.

While the current implementation works, a warning message gets printed
once for each daemon, which can lead to seeing the same message many
times. This does not affect functionality, but looks like an error to
the user as it can be seen within issue #1432.

This commit only prints the warning message inside lib when vtysh
dispatch is not being used. Additionally, the warning message was copied
into the vtysh command handlers, so that they get printed exactly once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoMerge pull request #2217 from donaldsharp/pim_threads
Russ White [Sat, 12 May 2018 10:41:27 +0000 (06:41 -0400)]
Merge pull request #2217 from donaldsharp/pim_threads

Pim cleanup when networking restarts under itself

6 years agoMerge pull request #2216 from qlyoung/fix-doc-warnings
Russ White [Sat, 12 May 2018 10:40:14 +0000 (06:40 -0400)]
Merge pull request #2216 from qlyoung/fix-doc-warnings

doc: cleanup zebra vrf docs

6 years agoMerge pull request #2215 from qlyoung/docuser-building-openbsd6
Russ White [Sat, 12 May 2018 10:39:29 +0000 (06:39 -0400)]
Merge pull request #2215 from qlyoung/docuser-building-openbsd6

doc: update pkg version for automake on openbsd6

6 years agoMerge pull request #2214 from donaldsharp/pointer_counting
Russ White [Sat, 12 May 2018 10:38:57 +0000 (06:38 -0400)]
Merge pull request #2214 from donaldsharp/pointer_counting

More bgp fixes

6 years agoMerge pull request #2213 from donaldsharp/errno
Russ White [Sat, 12 May 2018 10:38:02 +0000 (06:38 -0400)]
Merge pull request #2213 from donaldsharp/errno

some small bgp issues

6 years agoMerge pull request #2211 from chiragshah6/ospf_vrf_dev
Russ White [Sat, 12 May 2018 10:37:00 +0000 (06:37 -0400)]
Merge pull request #2211 from chiragshah6/ospf_vrf_dev

ospfd: packet fifo init in interface create

6 years agoMerge pull request #2197 from qlyoung/docuser-debianpkg
Russ White [Sat, 12 May 2018 10:27:26 +0000 (06:27 -0400)]
Merge pull request #2197 from qlyoung/docuser-debianpkg

doc: move Debian packaging docs to dev docs

6 years agoMerge pull request #2196 from LabNConsulting/working/master/bgpd-shutdown-race
Russ White [Sat, 12 May 2018 10:27:00 +0000 (06:27 -0400)]
Merge pull request #2196 from LabNConsulting/working/master/bgpd-shutdown-race

BGP: Preclude race condition between listener thread and core during shutdown

6 years agoMerge pull request #2189 from qlyoung/move-bug-reports-to-docs
Russ White [Sat, 12 May 2018 10:25:48 +0000 (06:25 -0400)]
Merge pull request #2189 from qlyoung/move-bug-reports-to-docs

doc: move REPORTING-BUGS to user docs

6 years agoMerge pull request #2187 from qlyoung/remove-netbsd
Russ White [Sat, 12 May 2018 10:25:17 +0000 (06:25 -0400)]
Merge pull request #2187 from qlyoung/remove-netbsd

frr: remove README.NetBSD

6 years agoMerge pull request #2171 from pguibert6WIND/misc_crashes_moving_ifp_from_netns
Russ White [Sat, 12 May 2018 10:24:45 +0000 (06:24 -0400)]
Merge pull request #2171 from pguibert6WIND/misc_crashes_moving_ifp_from_netns

Misc crashes moving ifp from netns

6 years agoMerge pull request #2162 from qlyoung/fix-vpath-build
Russ White [Sat, 12 May 2018 10:23:03 +0000 (06:23 -0400)]
Merge pull request #2162 from qlyoung/fix-vpath-build

doc: support VPATH builds

6 years agoMerge pull request #2132 from donaldsharp/missed_stuff
Russ White [Sat, 12 May 2018 10:18:15 +0000 (06:18 -0400)]
Merge pull request #2132 from donaldsharp/missed_stuff

Missed stuff

6 years agoMerge pull request #2124 from donaldsharp/missed
Russ White [Sat, 12 May 2018 10:16:02 +0000 (06:16 -0400)]
Merge pull request #2124 from donaldsharp/missed

bgpd, zebra: Handle EVPN router MAC per next hop

6 years agopimd: Clean up rpf_hash *after* upstream cleanup
Donald Sharp [Fri, 11 May 2018 22:39:09 +0000 (18:39 -0400)]
pimd: Clean up rpf_hash *after* upstream cleanup

Cleanup the pim->rpf_hash after upstream cleanup is done
since upstream cleanup uses the rpf_hash to cleanup itself.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Allow interface to move in and out of vrfs
Donald Sharp [Fri, 11 May 2018 19:04:10 +0000 (15:04 -0400)]
pimd: Allow interface to move in and out of vrfs

When we get an interface move event track the correct
pim instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup all pim_ifp pointers on termination
Donald Sharp [Fri, 11 May 2018 18:34:20 +0000 (14:34 -0400)]
pimd: Cleanup all pim_ifp pointers on termination

Properly cleanup pim_ifp pointers on termination

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup ifchannel deletion
Donald Sharp [Fri, 11 May 2018 18:07:53 +0000 (14:07 -0400)]
pimd: Cleanup ifchannel deletion

When we are being told to go away, cleanup ifchannel deletion
a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup msdp shutdown
Donald Sharp [Fri, 11 May 2018 17:57:13 +0000 (13:57 -0400)]
pimd: Cleanup msdp shutdown

Shutdown pim msdp code a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup the deletion event a tiny bit
Donald Sharp [Fri, 11 May 2018 17:46:59 +0000 (13:46 -0400)]
pimd: Cleanup the deletion event a tiny bit

The pim_upstream_free command was leaving slag by
not deleting data associated with the upstream
data structure.  Modify the code to explicitly free
all data associated with an upstream on a pim instance
deletion event.  Additionally the end result is that
the pim_upstream_free command is not needed anymore

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: cleanup zebra vrf docs
Quentin Young [Fri, 11 May 2018 19:53:07 +0000 (15:53 -0400)]
doc: cleanup zebra vrf docs

* Fix missing references
* Fix displaced reference target
* Fix miscellaneous typos
* Remove duplicate CLI documentation
* Rewrap lines to 80 characters

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: update pkg version for automake on openbsd6
Quentin Young [Fri, 11 May 2018 20:04:15 +0000 (16:04 -0400)]
doc: update pkg version for automake on openbsd6

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2172 from msablic/pim_igmp_stats
Donald Sharp [Fri, 11 May 2018 17:48:31 +0000 (13:48 -0400)]
Merge pull request #2172 from msablic/pim_igmp_stats

pimd: show ip igmp statistics command

6 years agoMerge pull request #2207 from ppmathis/fix/bgpd-snmp-peer-lookup
Donald Sharp [Fri, 11 May 2018 13:32:08 +0000 (09:32 -0400)]
Merge pull request #2207 from ppmathis/fix/bgpd-snmp-peer-lookup

bgpd: fix and improve snmp peer lookups

6 years agoMerge pull request #2202 from dslicenc/bgp-neigh-auto-complete
Lou Berger [Fri, 11 May 2018 12:49:17 +0000 (08:49 -0400)]
Merge pull request #2202 from dslicenc/bgp-neigh-auto-complete

bgpd: fix auto-completion for neighbors and peer-groups

6 years agoMerge pull request #2208 from ppmathis/fix/debianpkg-env-pager
Donald Sharp [Fri, 11 May 2018 12:08:47 +0000 (08:08 -0400)]
Merge pull request #2208 from ppmathis/fix/debianpkg-env-pager

debianpkg: improve VTYSH_PAGER environment check

6 years agoMerge pull request #2212 from ppmathis/feature/implement-no-password-cmd
Donald Sharp [Fri, 11 May 2018 12:07:18 +0000 (08:07 -0400)]
Merge pull request #2212 from ppmathis/feature/implement-no-password-cmd

lib: Ported 'no (enable) password' from stable/3.0

6 years agobgpd: Set NEXT_HOP attribute for EVPN imported routes
vivek [Mon, 7 May 2018 19:04:26 +0000 (12:04 -0700)]
bgpd: Set NEXT_HOP attribute for EVPN imported routes

Ensure that when EVPN routes are imported into a VRF as IPv4 routes,
the NEXT_HOP attribute is set. In the absence of this, this attribute
is currently not generated when advertising the route to peers in the
VRF. It is to be noted that the source route (the EVPN route) will only
have the MP_REACH_NLRI attribute that contains the next hop in it.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
6 years agobgpd: Update parent entry's refcount for imported routes
vivek [Wed, 9 May 2018 05:16:04 +0000 (22:16 -0700)]
bgpd: Update parent entry's refcount for imported routes

Imported routes in a VRF routing table have a reference to their parent
route entry which resides in the EVPN or IPVPN routing table. Ensure that
this reference uses appropriate locking so that the parent entry doesn't
get freed prematurely.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 13cb6b22ba9d558b1b4a1e8752f63f13242462a7)

Conflicts:
bgpd/bgp_mplsvpn.c

Ticket: CM-20471
Testing Done:
a) Ran vrf_route_leak tests without fix and hit crash, ran twice with fix
and did not see the crash.
b) Ran evpn-smoke and ensured there were no new failures.

6 years agobgpd: fix and improve snmp peer lookups
Pascal Mathis [Thu, 10 May 2018 21:35:37 +0000 (23:35 +0200)]
bgpd: fix and improve snmp peer lookups

The previous implementation of bgp_peer_lookup_next did not consider the
internal ordering of peers when using peer groups, which led to all
standalone peers being skipped that had a lower IP address than the
highest IP address of a peer belonging to a group.

As the ordering of peers can not be arbitrary due to SNMP requiring
increasing OIDs when walking an OID tree, this commit fixes the bug by
properly looping through all peers and detecting the next highest IP
address.

Additionally, this commit improved both bgp_peer_lookup_next and
peer_lookup_addr_ipv4 by using the socketunion stored within the peer
struct (peer->su) instead of calling inet_pton for each peer during
comparison.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: Respect ability to reach nexthop if available
Donald Sharp [Fri, 11 May 2018 11:40:55 +0000 (07:40 -0400)]
bgpd: Respect ability to reach nexthop if available

When bgp is thinking about opening a connection to a peer,
if we are connected to zebra, allow that to influence our
decision to start the connection.

Found Scenario:

Both bgp and zebra are started up at the same time.  Zebra is
being used to create the connected route through which bgp
will establish a peering relationship.  The machine is a
bit loaded due to other startup conditions and as such bgp
gets to the connection stage here before zebra has installed
the route.  If bgp does not respect zebra data when it does
have a connection then we will attempt to connect.  The
connect will fail because there is no route.  At that time
we will go into the connect timeout(2 minutes) and delay
connection.

What this does.  If we have established a zebra connection and
we do not have a clear path to the destination at this point
do not allow the connection to proceed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Cleanup messages from getsockopt
Donald Sharp [Fri, 11 May 2018 11:34:24 +0000 (07:34 -0400)]
bgpd: Cleanup messages from getsockopt

The handling of the return codes for getsockopt was slightly wrong.

getsockopt returns -1 on error and errno is set.
What to do with the return code at that point is dependent
on what sockopt you are asking about.  In this case
status holds the error returned for SO_ERROR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Ported 'no (enable) password' from stable/3.0
Pascal Mathis [Fri, 11 May 2018 00:54:30 +0000 (02:54 +0200)]
lib: Ported 'no (enable) password' from stable/3.0

The pull request #1545 from @donaldsharp introduced the command 'no
password' to remove an existing terminal connection password.
Additionally, warnings have been added to both 'no password' and 'no
enable password' to make the user aware of any security implications.

It seems that this specific pull request was never merged against master
and got lost. This commit is a cherry-pick of d4961273cb with fixed
conflicts and updated documentation.

Thanks to @donaldsharp and @pogojotz for the original PR.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoospfd: packet fifo init in interface create
Chirag Shah [Tue, 1 May 2018 14:36:53 +0000 (07:36 -0700)]
ospfd: packet fifo init in interface create

Currently, interface packet transmit queue is created/deleted
as part of Interface UP/Down event. This results in
a rare condition where port came up but queue
was not created. The creation of queue occupies only few bytes.

Moving fifo queue creation to interface create
would add few bytes of fifo creation but at least it guaranteed
to be available during Up/down -->Up event.

Initialize ospf packet fifo queue during ospf
interface creation.

Drain queue during interface down event.

Drained and free the queue as part of the interface
delete/cleanup.

Ticket:CM-20744
Testing Done:

Bring up ospfv2 topology with multiple neighbors.
1) Trigger multiple shut/no shut events and validate
all queues are freed.
2) configure/deconfigure router ospf and validate
all ospf instance and interface underneath are freed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agodebianpkg: improve VTYSH_PAGER environment check
Pascal Mathis [Thu, 10 May 2018 22:03:23 +0000 (00:03 +0200)]
debianpkg: improve VTYSH_PAGER environment check

The current post-installation scripts for all Debian packages execute
grep 'VTYSH_PAGER=/bin/cat' to check if the VTYSH_PAGER variable is
present within /etc/environment.

While presence of that environment variable should be checked, the
current implementation does not handle this line being a comment (and
therefor not active) or the user picking a different VTYSH_PAGER than
/bin/cat.

This commit ensures that the environment variable can be freely changed
by the user, while still guaranteeing that it is present in the file
without being a comment.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: fix auto-completion for neighbors and peer-groups
Don Slice [Thu, 10 May 2018 13:10:18 +0000 (09:10 -0400)]
bgpd: fix auto-completion for neighbors and peer-groups

Before this fix, both real neighbors and peer-groups were lumped
together in auto-completion and it didn't work at all for
peer-groups.  This fix changes that behavior to do the right
thing.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #2195 from qlyoung/docuser
Jafar Al-Gharaibeh [Thu, 10 May 2018 15:24:06 +0000 (10:24 -0500)]
Merge pull request #2195 from qlyoung/docuser

doc: update doc titles