]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agobgpd: add missing ecommunity flowspec to display
Philippe Guibert [Thu, 17 May 2018 07:30:28 +0000 (09:30 +0200)]
bgpd: add missing ecommunity flowspec to display

On some cases, the ecommunity flowspec for redirect vrf is not displayed
in all cases. On top of that, display the values if ecom can no be
decoded.
Also, sub_type and type are changed from int to u_int8_t, because the
values contains match the type and sub type of extended communities.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: update comment when calling pbr southbound interface
Philippe Guibert [Thu, 3 May 2018 06:56:42 +0000 (08:56 +0200)]
zebra: update comment when calling pbr southbound interface

Some documentation is updated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: improve flowspec update of route to NH/VRF
Philippe Guibert [Mon, 21 May 2018 16:35:38 +0000 (18:35 +0200)]
bgpd: improve flowspec update of route to NH/VRF

The debugging message in charge of showing if the route is added or
witdrawn is changed accordingly to reflect this status.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add notify value in zlog notification message for pbr
Philippe Guibert [Mon, 30 Apr 2018 08:35:10 +0000 (10:35 +0200)]
bgpd: add notify value in zlog notification message for pbr

notifications values from zebra related to pbr are dumped.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: handle iptable list of interfaces
Philippe Guibert [Wed, 25 Apr 2018 16:34:27 +0000 (18:34 +0200)]
zebra: handle iptable list of interfaces

Upon reception of an iptable_add or iptable_del, a list of interface
indexes may be passed in the zapi interface. The list is converted in
interface name so that it is ready to be passed to be programmed to the
underlying system.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: add 3 fields to ipset_entry : src,dst port, and proto
Philippe Guibert [Fri, 30 Mar 2018 11:01:39 +0000 (13:01 +0200)]
zebra: add 3 fields to ipset_entry : src,dst port, and proto

Those 3 fields are read and written between zebra and bgpd.
This permits extending the ipset_entry structure.
Combinatories will be possible:
- filtering with one of the src/dst port.
- filtering with one of the range src/ range dst port
usage of src or dst is exclusive in a FS entry.
- filtering a port or a port range based on either src or dst port.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: pbr vty show command for ipset and iptables
Philippe Guibert [Mon, 23 Apr 2018 13:17:19 +0000 (15:17 +0200)]
zebra: pbr vty show command for ipset and iptables

Two new vty show functions available:
show pbr ipset <NAME>
show pbr iptables <NAME>

Those function dump the underlying "kernel" contexts. It relies on the
zebra pbr contexts. This helps then to know which zebra pbr
context has been configured since those contexts are mainly configured
by BGP Flowspec.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: add netlink rule support for fwmark option
Philippe Guibert [Fri, 27 Apr 2018 14:32:51 +0000 (16:32 +0200)]
zebra: add netlink rule support for fwmark option

When a mark is set, incoming traffic having that mark set can be
redirected to a specific table identifier. This work is done through
netlink.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: handle notification in case pbr ipset, or iptables is removed
Philippe Guibert [Mon, 23 Apr 2018 13:31:04 +0000 (15:31 +0200)]
zebra: handle notification in case pbr ipset, or iptables is removed

In cast the removal of an iptable or an ipset pbr context is done,
then a notification is sent back to the relevant daemon that sent the
message.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: cleanup zebra policy context
Philippe Guibert [Wed, 21 Mar 2018 16:52:41 +0000 (17:52 +0100)]
zebra: cleanup zebra policy context

Upon the remote daemon leaving, some contexts may have to be flushed.
This commit does the change. IPset and IPSet Entries and iptables are
flushed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: ipset and ipset entry deletion remove entry from hash list too
Philippe Guibert [Thu, 26 Apr 2018 11:31:16 +0000 (13:31 +0200)]
zebra: ipset and ipset entry deletion remove entry from hash list too

This commit is a fix that removes the structure from the hash list,
instead of just removing that structure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: rework pbr ipset entry
Philippe Guibert [Tue, 27 Mar 2018 09:27:10 +0000 (11:27 +0200)]
zebra: rework pbr ipset entry

Add ns_id into zebra_pbr ipset
This is important so that each ipset entry knows on which NETNS the
ipset entry must be inkected

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.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 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 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 ago*: convert tabs to spaces
Lou Berger [Mon, 14 May 2018 21:08:39 +0000 (17:08 -0400)]
*: convert tabs to spaces

Signed-off-by: Lou Berger <lberger@labn.net>
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 ago*: fix compile with -enable-address-sanitizer configured
Lou Berger [Sat, 12 May 2018 15:08:02 +0000 (11:08 -0400)]
*: fix compile with -enable-address-sanitizer configured

Signed-off-by: Lou Berger <lberger@labn.net>
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