]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agobgpd: remove unnecessary #include "vty.h"
Quentin Young [Thu, 2 Mar 2017 02:08:01 +0000 (02:08 +0000)]
bgpd: remove unnecessary #include "vty.h"

Per previous commit, these are no longer necessary.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: add vty.h to bgpd.h
Quentin Young [Thu, 2 Mar 2017 01:45:55 +0000 (01:45 +0000)]
bgpd: add vty.h to bgpd.h

`struct vty` referenced in body of bgpd.h, so it should be #include'd.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: add stream.h, vty.h, zebra.h to plist.h
Quentin Young [Thu, 2 Mar 2017 02:02:52 +0000 (02:02 +0000)]
lib: add stream.h, vty.h, zebra.h to plist.h

Since `afi_t` and `struct vty` are used in plist.h, the appropriate
headers for them should be included.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #230 from qlyoung/remove-quagga_clkid
Russ White [Wed, 1 Mar 2017 14:52:50 +0000 (09:52 -0500)]
Merge pull request #230 from qlyoung/remove-quagga_clkid

lib: remove unused quagga_clkid

7 years agoMerge pull request #224 from donaldsharp/pim_patches_feb
Russ White [Wed, 1 Mar 2017 14:52:24 +0000 (09:52 -0500)]
Merge pull request #224 from donaldsharp/pim_patches_feb

Pim patches feb

7 years agoMerge pull request #231 from qlyoung/monotime-retab
Russ White [Wed, 1 Mar 2017 14:48:51 +0000 (09:48 -0500)]
Merge pull request #231 from qlyoung/monotime-retab

lib: monotime.h tabs -> spaces

7 years agoMerge pull request #234 from donaldsharp/v6_multipath_rework1
Russ White [Wed, 1 Mar 2017 14:48:04 +0000 (09:48 -0500)]
Merge pull request #234 from donaldsharp/v6_multipath_rework1

V6 multipath rework1

7 years agoMerge pull request #235 from donaldsharp/coverity1
Russ White [Wed, 1 Mar 2017 14:46:21 +0000 (09:46 -0500)]
Merge pull request #235 from donaldsharp/coverity1

Coverity

7 years agobgpd: Cleanup grabbag of coverity scan issues found
Donald Sharp [Wed, 1 Mar 2017 12:47:37 +0000 (07:47 -0500)]
bgpd: Cleanup grabbag of coverity scan issues found

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoisisd: Clean up leaked memory
Donald Sharp [Wed, 1 Mar 2017 12:46:42 +0000 (07:46 -0500)]
isisd: Clean up leaked memory

When in error path clean up the route table
created.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospf6d: Fix write beyond data structure
Donald Sharp [Wed, 1 Mar 2017 12:45:21 +0000 (07:45 -0500)]
ospf6d: Fix write beyond data structure

Converting a 'struct prefix6' to a 'struct prefix'
and then doing a memcpy of the contents writes
beyond the end of the data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix use of value after free
Donald Sharp [Wed, 1 Mar 2017 12:44:13 +0000 (07:44 -0500)]
pimd: Fix use of value after free

Fix the usage of source after it has
been explicitly free'd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow multiple rib deletes from linux kernel
Donald Sharp [Thu, 16 Feb 2017 21:59:20 +0000 (16:59 -0500)]
zebra: Allow multiple rib deletes from linux kernel

The kernel can send a DELROUTE with a individual
nexthop.  Technically this is meant to delete that
individual nexthop from the route but zebra
has no way to do this currently.  So we just delete
the route.

V4 -> Never sends a DELROUTE with multiple nexthops
as a way to modify the rib.  It sends a a NEWROUTE
with RTM_REPLACE with the new appropriate route.

V6 -> Sends a DELROUTE with multiple nexthops
which is supposed to be interpreted as a
subtraction from the route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Add multipath parsing to V6
Donald Sharp [Mon, 30 Jan 2017 19:50:06 +0000 (14:50 -0500)]
zebra: Add multipath parsing to V6

In the near future it will be possible to recieve v6 multipath netlink
messages.  This code change is in prep for it.  In the meantime the
v6 code path will continue to work as per normal.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Refactor netlink_route_change and netlink_route_change_read_unicast
Donald Sharp [Mon, 30 Jan 2017 19:40:14 +0000 (14:40 -0500)]
zebra: Refactor netlink_route_change and netlink_route_change_read_unicast

These two functions were basically the same.  Refactor to be
one function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Add knowledge of whether or not we are acting under startup conditions
Donald Sharp [Fri, 27 Jan 2017 18:33:08 +0000 (13:33 -0500)]
zebra: Add knowledge of whether or not we are acting under startup conditions

The reading if unicast routes from the kernel acts subtly differently
between reading in the routes from the kernel on startup and
reading a new route or getting a response for a route.

Add startup flag(currently ignored) so that we can start
consolidating the functionality.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #226 from donaldsharp/evpn_fix
Russ White [Tue, 28 Feb 2017 13:57:13 +0000 (08:57 -0500)]
Merge pull request #226 from donaldsharp/evpn_fix

bgpd: Fix help strings for new command

7 years agoMerge pull request #229 from ChairmanTubeAmp/martinb-lower-frr.conf
Donald Sharp [Mon, 27 Feb 2017 20:49:15 +0000 (15:49 -0500)]
Merge pull request #229 from ChairmanTubeAmp/martinb-lower-frr.conf

Lowercase frr.conf

7 years agolib: remove unused quagga_clkid
Quentin Young [Mon, 27 Feb 2017 19:40:33 +0000 (19:40 +0000)]
lib: remove unused quagga_clkid

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: monotime.h tabs -> spaces
Quentin Young [Mon, 27 Feb 2017 18:50:51 +0000 (18:50 +0000)]
lib: monotime.h tabs -> spaces

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoLowercase frr.conf
Martín Beauchamp [Mon, 27 Feb 2017 18:26:20 +0000 (13:26 -0500)]
Lowercase frr.conf

7 years agobgpd: Fix help strings for new command
Donald Sharp [Fri, 24 Feb 2017 20:08:48 +0000 (15:08 -0500)]
bgpd: Fix help strings for new command

Fix the help strings to be correct.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Get Static mroutes displaying again
Donald Sharp [Fri, 24 Feb 2017 15:29:15 +0000 (10:29 -0500)]
pimd: Get Static mroutes displaying again

The static mroutes were making the assumption that the vif index
and the ifindex were the same.  This is not necessarily the case.

Additionally if we are displaying a *,G route only display
the G.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #219 from opensourcerouting/feature/isis-draft-ietf-rtgwg-backoff...
Donald Sharp [Fri, 24 Feb 2017 15:09:19 +0000 (10:09 -0500)]
Merge pull request #219 from opensourcerouting/feature/isis-draft-ietf-rtgwg-backoff-algo

Add support for draft-ietf-rtgwg-backoff-algo to IS-IS

7 years agopimd: Move group handling to it's own function for J/P message
Donald Sharp [Wed, 15 Feb 2017 02:32:16 +0000 (21:32 -0500)]
pimd: Move group handling to it's own function for J/P message

When we are handling a J/P message, move the group handling
to it's own function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add hash lookup for igmp group's
Donald Sharp [Wed, 15 Feb 2017 01:45:31 +0000 (20:45 -0500)]
pimd: Add hash lookup for igmp group's

When we receive a group in a IGMP report
let's look it up based upon a hash
instead of a list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Intelligently drop wrvifwhole packets in some cases
Donald Sharp [Wed, 15 Feb 2017 01:03:18 +0000 (20:03 -0500)]
pimd: Intelligently drop wrvifwhole packets in some cases

Suppose we have this

(*,G) IIF = swp1  OIL: swp3
(S,G) IIF = swp2  OIL: swp3 swp4

There exists situations where we can receive the mcast
packet for (S,G) on both swp1 and swp2.  In this case
the packet received on swp1 will be sent from the kernel
to us as a WRVIF and WRVIFWHOLE.

As per normal, WRVIF packet processing handles the assert
case so we know we have not received the packet on a downstream
interface, so no assert.

The WRVIFWHOLE packet processing can then check to see if
it received the packet as a result of the (*,G) mroute
from upstream.  If we have then we can safely drop
the packet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Refactor pim_joinprune_send
Donald Sharp [Tue, 14 Feb 2017 17:23:28 +0000 (12:23 -0500)]
pimd: Refactor pim_joinprune_send

Refactor pim_joinprune_send to use 'struct rpf'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Refactor pim_rpf_update to take a 'struct pim_rpf'
Donald Sharp [Tue, 14 Feb 2017 15:41:28 +0000 (10:41 -0500)]
pimd: Refactor pim_rpf_update to take a 'struct pim_rpf'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Refactor functions
Donald Sharp [Mon, 13 Feb 2017 19:18:48 +0000 (14:18 -0500)]
pimd: Refactor functions

Refactor the add and delete functions.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Make ifchannel lookup a hash lookup
Donald Sharp [Mon, 13 Feb 2017 01:16:08 +0000 (20:16 -0500)]
pimd: Make ifchannel lookup a hash lookup

When we are at scale, it is possible that
we have a very large number of ifchannels
per interface.  So make lookup for
that situation to be a hash lookup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Trust the compiler
Donald Sharp [Sat, 11 Feb 2017 11:54:56 +0000 (06:54 -0500)]
pimd: Trust the compiler

When we set a variable to NULL, there is no
need to assert on it the following line.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Narrow inheritance search down to interface we are interested in.
Donald Sharp [Sat, 11 Feb 2017 11:53:00 +0000 (06:53 -0500)]
pimd: Narrow inheritance search down to interface we are interested in.

When we are only looking at one ifchannel, for inheritance, narrow
the search down to only the interface/ifchannel we are interested in

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove unnecessary igmp check
Donald Sharp [Fri, 10 Feb 2017 20:54:23 +0000 (15:54 -0500)]
pimd: Remove unnecessary igmp check

When we receive a igmp packet, there is no need
to ensure that it is a igmp packet, as that is
what we have asked for.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove unnecessary ip header length checks on receipt.
Donald Sharp [Fri, 10 Feb 2017 20:48:42 +0000 (15:48 -0500)]
pimd: Remove unnecessary ip header length checks on receipt.

The kernel will not hand us a malformed packet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove unnecessary check in packet process path
Donald Sharp [Fri, 10 Feb 2017 20:26:41 +0000 (15:26 -0500)]
pimd: Remove unnecessary check in packet process path

When we get a packet from the network for pim, we do not
need to check to see that it is a pim packet, since that
is what we've asked to receive.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Only debug in the unusual case
Donald Sharp [Fri, 10 Feb 2017 20:14:16 +0000 (15:14 -0500)]
pimd: Only debug in the unusual case

When receiving a J/P packet, only check to see if we should
log when the J/P packet is not for us.

Very slight performance improvement additionally

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove unneeded parameter
Donald Sharp [Fri, 10 Feb 2017 20:04:17 +0000 (15:04 -0500)]
pimd: Remove unneeded parameter

pim_upstream_join_timer_decrease_to_t_override passed in
a `struct in_addr` that in all cases was part of the
upstream data structure that was passed in already.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add packed data structures for building j/p messages
Donald Sharp [Fri, 10 Feb 2017 19:05:42 +0000 (14:05 -0500)]
pimd: Add packed data structures for building j/p messages

Switch pim over to using packed data structures for building
Join/Prune messages to be sent.

This is a pre-cursor to the ability to handle the ability
to aggregate Join/Prune messages together.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Assume buffer size passed in is of sufficient size
Donald Sharp [Fri, 10 Feb 2017 18:46:52 +0000 (13:46 -0500)]
pimd: Assume buffer size passed in is of sufficient size

For:
pim_msg_build_header
pim_msg_addr_encode_ipv4_ucast
pim_msg_addr_encode_ipv4_group
pim_msg_addr_encode_ipv4_source

Assume that the buffer size passed in is of sufficient size
already.  This is assured already because buffer sizes
are checked for minimum lengths for the entire packet
ahead of time.  So we are double checking.

Additionally at scale we will be calling these functions
a very very large number of times.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add 'struct pim_msg_header' packed data structure.
Donald Sharp [Thu, 9 Feb 2017 18:47:42 +0000 (13:47 -0500)]
pimd: Add 'struct pim_msg_header' packed data structure.

Add the 'struct pim_msg_header' and convert
all places that encoded/decoded the message header
to use it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Document the J/P packet format a bit better.
Donald Sharp [Thu, 9 Feb 2017 18:13:07 +0000 (13:13 -0500)]
pimd: Document the J/P packet format a bit better.

Document the J/P packet format and ensure
that the smallest size packet that we
may send will actually fit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Convert sizes to #defines
Donald Sharp [Thu, 9 Feb 2017 17:53:00 +0000 (12:53 -0500)]
pimd: Convert sizes to #defines

Convert the const int size of the encoded
types to #defines so that they can be
used elsewhere.

Return Null instead of 0.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Fri, 24 Feb 2017 14:32:47 +0000 (09:32 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

7 years agoMerge pull request #221 from LabNConsulting/working/2.0/patch/issue-218
Donald Sharp [Fri, 24 Feb 2017 01:19:39 +0000 (20:19 -0500)]
Merge pull request #221 from LabNConsulting/working/2.0/patch/issue-218

bgpd: Fix issue #218

7 years agobgpd: Fix issue #218
Lou Berger [Thu, 23 Feb 2017 22:48:47 +0000 (17:48 -0500)]
bgpd: Fix issue #218
      Wrong offset was used when using global V6 address in place of
      v6 LL.  (Introduced in earlier fix of broken RD advertisement.)

      Tested by @dslice in master.

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMerge pull request #220 from opensourcerouting/fixes/addpath_id
Donald Sharp [Thu, 23 Feb 2017 15:53:51 +0000 (10:53 -0500)]
Merge pull request #220 from opensourcerouting/fixes/addpath_id

Fix bgp_info_addpath_{rx,tx}_str if addpath info is not present

7 years agobgpd: fix bgp_info_addpath_{rx,tx}_str if addpath info is not present
Christian Franke [Thu, 23 Feb 2017 13:27:00 +0000 (14:27 +0100)]
bgpd: fix bgp_info_addpath_{rx,tx}_str if addpath info is not present

The buffer needs to be set to length 0 if nothing is written into
it, otherwise bgpd will log uninitialized memory, disclosing information
and possibly leading to a crash.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agorelease: FRR 2.0-rc2 frr-2.0-rc2
Martin Winter [Thu, 23 Feb 2017 12:47:59 +0000 (19:47 +0700)]
release: FRR 2.0-rc2

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoisisd: add support for draft-ietf-rtgwg-backoff-algo
Stephane Litkowski [Tue, 21 Feb 2017 22:52:29 +0000 (23:52 +0100)]
isisd: add support for draft-ietf-rtgwg-backoff-algo

Adds CLI command "spf-delay-ietf" to area node for configuration
and "show isis spf-delay-ietf" to enable node for displaying status.

7 years agoisisd: cleanup SPF scheduling
Stephane Litkowski [Mon, 20 Feb 2017 09:51:47 +0000 (10:51 +0100)]
isisd: cleanup SPF scheduling

 - SPF is now per level only (no more per family)
 - t_spf and pending removed from struct spftree and moved to
   spf_timer field in struct isis_area
 - show isis summary output changed to accomodate the per level SPF
 - isis_spf_schedule6 and isis_run_spf6_lx functions are removed,
   isis_run_spf_lx now calls isis_run_spf for both INET and INET6
 - lsp related functions now call isis_spf_schedule only

7 years agolib: add SPF back-off implementation
Christian Franke [Tue, 21 Feb 2017 21:32:08 +0000 (22:32 +0100)]
lib: add SPF back-off implementation

Add an implementation of draft-ietf-rtgwg-backoff-algo-04 to
libfrr.

7 years agoMerge pull request #217 from bingen/missing_desc_entry_2
Donald Sharp [Tue, 21 Feb 2017 17:40:31 +0000 (12:40 -0500)]
Merge pull request #217 from bingen/missing_desc_entry_2

Add missing DESC_ENTRY to lib/log.c

7 years agoAdd missing DESC_ENTRY to lib/log.c
ßingen [Tue, 21 Feb 2017 11:27:44 +0000 (12:27 +0100)]
Add missing DESC_ENTRY to lib/log.c

7 years agoMerge branch 'frr/pull/210' ("tools: frr-reload removes "ipv6 nd ra-interval" ...")
David Lamparter [Fri, 17 Feb 2017 20:34:48 +0000 (21:34 +0100)]
Merge branch 'frr/pull/210' ("tools: frr-reload removes "ipv6 nd ra-interval" ...")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/214' ("bgpd: use tabs in Makefile.am")
David Lamparter [Fri, 17 Feb 2017 20:33:57 +0000 (21:33 +0100)]
Merge branch 'frr/pull/214' ("bgpd: use tabs in Makefile.am")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/213' ("*: remove QUAGGA_NO_DEPRECATED_INTERFACES")
David Lamparter [Fri, 17 Feb 2017 20:33:26 +0000 (21:33 +0100)]
Merge branch 'frr/pull/213' ("*: remove QUAGGA_NO_DEPRECATED_INTERFACES")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/212' ("bgpd: remove unnecessary parens in compare")
David Lamparter [Fri, 17 Feb 2017 20:32:54 +0000 (21:32 +0100)]
Merge branch 'frr/pull/212' ("bgpd: remove unnecessary parens in compare")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/211' ("ospfd: add *.a to .gitignore")
David Lamparter [Fri, 17 Feb 2017 20:32:14 +0000 (21:32 +0100)]
Merge branch 'frr/pull/211' ("ospfd: add *.a to .gitignore")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: use tabs in Makefile.am
Quentin Young [Fri, 17 Feb 2017 18:46:42 +0000 (18:46 +0000)]
bgpd: use tabs in Makefile.am

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years ago*: remove QUAGGA_NO_DEPRECATED_INTERFACES
Quentin Young [Fri, 17 Feb 2017 18:19:27 +0000 (18:19 +0000)]
*: remove QUAGGA_NO_DEPRECATED_INTERFACES

This define is used only to guard macros in lib/linklist.h which
themselves are not used anywhere in the codebase and have been marked
deprecated since anno domini 2005

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: remove unnecessary parens in compare
Quentin Young [Fri, 17 Feb 2017 18:13:05 +0000 (18:13 +0000)]
bgpd: remove unnecessary parens in compare

For clean build under latest clang

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: add *.a to .gitignore
Quentin Young [Fri, 17 Feb 2017 17:57:59 +0000 (17:57 +0000)]
ospfd: add *.a to .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #103 from pguibert6WIND/frr_6wind_evpn_5
Lou Berger [Fri, 17 Feb 2017 17:18:08 +0000 (12:18 -0500)]
Merge pull request #103 from pguibert6WIND/frr_6wind_evpn_5

Provide EVPN basic support on master branch + EVPN Route Target 5 Support (V2)

7 years agoMerge branch 'frr/pull/205' ("Pim stuff")
David Lamparter [Fri, 17 Feb 2017 17:06:54 +0000 (18:06 +0100)]
Merge branch 'frr/pull/205' ("Pim stuff")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #209 from opensourcerouting/building-docs
Lou Berger [Fri, 17 Feb 2017 15:28:52 +0000 (10:28 -0500)]
Merge pull request #209 from opensourcerouting/building-docs

doc: Add initial set of docs on building FRR on various Distributions

7 years agotools: frr-reload removes "ipv6 nd ra-interval" and "no ipv6 nd suppress-ra"
Daniel Walton [Fri, 17 Feb 2017 14:05:56 +0000 (02:05 +1200)]
tools: frr-reload removes "ipv6 nd ra-interval" and "no ipv6 nd suppress-ra"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agobgpd: revert some RT ecom filtering to fix valgrind id'ed error and
Philippe Guibert [Fri, 17 Feb 2017 07:57:37 +0000 (08:57 +0100)]
bgpd: revert some RT ecom filtering to fix valgrind id'ed error and
potential misreporting.

This commits revert the call of ecommunity_ecom2str without filtering.

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agodoc: Fix pytest installation instructions on Ubuntu 12.04
Martin Winter [Thu, 16 Feb 2017 17:52:07 +0000 (00:52 +0700)]
doc: Fix pytest installation instructions on Ubuntu 12.04

Ubuntu 12.04 doesn't have a pytest package - needs to be installed with pip

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agobgpd: initialise ecom sub field str when setting routermac
Philippe Guibert [Thu, 16 Feb 2017 16:09:46 +0000 (17:09 +0100)]
bgpd: initialise ecom sub field str when setting routermac

In order to avoid valgrind issue, the str field is initialised.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agodoc: Fixed a few typos on Building Doc's, Changed Tab's to spaces and limited line...
Martin Winter [Thu, 16 Feb 2017 15:55:09 +0000 (22:55 +0700)]
doc: Fixed a few typos on Building Doc's, Changed Tab's to spaces and limited line length to < 80 chars where possible

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agolib: restore pre-evpn output behavior
Philippe Guibert [Thu, 16 Feb 2017 14:12:22 +0000 (15:12 +0100)]
lib: restore pre-evpn output behavior

If an EVPN entry is detected, and type is not route type 5, displays the
Ethernet MAC configured, as it was before evpn is introduced.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: restore pre-evpn output behavior
Philippe Guibert [Thu, 16 Feb 2017 14:11:04 +0000 (15:11 +0100)]
bgpd: restore pre-evpn output behavior

This commit is displaying all the ECs from one entry in rfapi code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agodoc: Add initial set of docs on building FRR on various Distributions
Martin Winter [Thu, 16 Feb 2017 09:40:09 +0000 (16:40 +0700)]
doc: Add initial set of docs on building FRR on various Distributions

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge pull request #206 from opensourcerouting/ldpd-ordered-output
Donald Sharp [Wed, 15 Feb 2017 14:39:18 +0000 (06:39 -0800)]
Merge pull request #206 from opensourcerouting/ldpd-ordered-output

ldpd: display everything in order on CLI output

7 years agoldpd: fix segfault when configuring multiple pseudowires
Renato Westphal [Wed, 14 Dec 2016 00:51:41 +0000 (22:51 -0200)]
ldpd: fix segfault when configuring multiple pseudowires

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'adj' elements
Renato Westphal [Wed, 14 Dec 2016 19:39:28 +0000 (17:39 -0200)]
ldpd: use red-black trees to store 'adj' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'l2vpn_pw' elements
Renato Westphal [Wed, 14 Dec 2016 15:53:07 +0000 (13:53 -0200)]
ldpd: use red-black trees to store 'l2vpn_pw' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'l2vpn_if' elements
Renato Westphal [Wed, 14 Dec 2016 14:34:57 +0000 (12:34 -0200)]
ldpd: use red-black trees to store 'l2vpn_if' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'l2vpn' elements
Renato Westphal [Wed, 14 Dec 2016 12:42:45 +0000 (10:42 -0200)]
ldpd: use red-black trees to store 'l2vpn' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'nbr_params' elements
Renato Westphal [Wed, 14 Dec 2016 11:14:52 +0000 (09:14 -0200)]
ldpd: use red-black trees to store 'nbr_params' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'tnbr' elements
Renato Westphal [Tue, 13 Dec 2016 18:19:15 +0000 (16:19 -0200)]
ldpd: use red-black trees to store 'tnbr' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'iface' elements
Renato Westphal [Tue, 13 Dec 2016 17:29:35 +0000 (15:29 -0200)]
ldpd: use red-black trees to store 'iface' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use red-black trees to store 'lde_map' elements
Renato Westphal [Sat, 3 Dec 2016 23:14:44 +0000 (21:14 -0200)]
ldpd: use red-black trees to store 'lde_map' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agopimd: Allow IPDEFTTL to be used for omnios
Donald Sharp [Tue, 14 Feb 2017 21:19:16 +0000 (16:19 -0500)]
pimd: Allow IPDEFTTL to be used for omnios

The omnios OS has no IPDEFTTL defined.
Add the ability to handle it for this
one case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: ifdown sequnce stale report entry
Chirag Shah [Fri, 27 Jan 2017 19:33:01 +0000 (11:33 -0800)]
pimd: ifdown sequnce stale report entry

Ticket: CM-14652
Testing Done: Tested via sending IGMP report and flap port and verified pim upstream and mroute, the entry is deleted. Run pim-smoke

Even after Report received port down event, IGMP entry alawys exists in upstream, mroute, kernel.
The entry exist because it was recreated after delete due missing check if group has no more source list,
    mode is exclude, last source address was * means (*, G) so do not trigger to create entry.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: mroute entries unresolved IIF issue
Chirag Shah [Sat, 21 Jan 2017 23:18:08 +0000 (15:18 -0800)]
pimd: mroute entries unresolved IIF issue

Ticket:CM-14056
Reviewed By:sharpd, CCR-5603
Testing Done: verified multiple ifdown/ifup event on submitter setup and dev setup with 2k s,g entries, ran pim-smoke.

1. during ifdown event, pim vif for bridge was not resetting vif_index to -1 due to errno received from
kernel during vif del sequence. It could be timing issue where kernel may have delete prior to pimd sending request.
For vif_del even kernel returns error, reset vif_index to -1 in pimd DB so next if up event VIF receives new vif_index
and reprograms in kernel.
2. during mroute del sequence reset mfcc_parent to MAXVIF.
3. during mroute add check if parent mfcc_parent is MAXVIF then do not download to kernel such mroute entry.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agopimd: messages to neighbors should have TTL = 1
Chirag Shah [Fri, 13 Jan 2017 01:15:44 +0000 (17:15 -0800)]
pimd: messages to neighbors should have TTL = 1

Ticket:CM-12924
Reviewed By:shapd
Testing Done: configure PIM neighbor, verify PIM hello packet dump for ttl to be 1.

Set TTL to 1 for outgoing multicast control packets destine to ALL-PIM-ROUTERS as oppose to unicast mcast packets.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agopimd: non-null register checksum incorrect
Chirag Shah [Thu, 12 Jan 2017 03:36:50 +0000 (19:36 -0800)]
pimd: non-null register checksum incorrect

Ticket: CM-12041
Reviewed By: sharpd, CCR-5556
Testing Done: Tested on Local setup generating PIM Register (Data/Null) and processing both Tx/Rx with correct checksum.
Provided quagga debian to submitter and checksum cases passed on submitter setup.

1. PIM Register msg checksum only accounts for 8 bytes (4 bytes for PIM header and next 4 byetes before data payload).
In PIM header checksum calculation checked PIM packet type (in this case REGISTER type) then only pass 8 bytes as length
rather than full packet length.
2. PIM Register Rx path also handled with 8 byte and full pim lenth checksum.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoFix PIM DBG message
Chirag Shah [Sat, 7 Jan 2017 00:44:49 +0000 (16:44 -0800)]
Fix PIM DBG message

Ticket: CM-13771
Reviewed By: CCR-5537
Testing Done: yes

Fix to CM-13771 where DBG message was out of order.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #149 from pguibert6WIND/frr_6wind_stringify
David Lamparter [Tue, 14 Feb 2017 16:36:38 +0000 (17:36 +0100)]
Merge pull request #149 from pguibert6WIND/frr_6wind_stringify

issue #142 / pull request to provide mac address stringification

7 years agoMerge pull request #200 from opensourcerouting/pytest-stable
Donald Sharp [Tue, 14 Feb 2017 16:27:50 +0000 (08:27 -0800)]
Merge pull request #200 from opensourcerouting/pytest-stable

pytest for stable/2.0

7 years agobgpd: set the returned buffer to '\0' in case is returns nothing
Philippe Guibert [Tue, 14 Feb 2017 11:11:29 +0000 (12:11 +0100)]
bgpd: set the returned buffer to '\0' in case is returns nothing

In the case where extended communities to str function is called with a
filtering mecanism, then the case that the returned buffer is not inited
may happen. Hence the change done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: prefix2str initialises incoming buffer in case erroneous EVPN pfx
Philippe Guibert [Tue, 14 Feb 2017 10:54:33 +0000 (11:54 +0100)]
lib: prefix2str initialises incoming buffer in case erroneous EVPN pfx

In the case, evpn prefix is requested to be transformed into string, and
if the evpn prefix is not an evpn route type 5 entry, then the prefix is
returning an initialised string that mentions the vpn prefix is unknown.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix address-family display for l2vpn evpn
Philippe Guibert [Thu, 9 Feb 2017 08:26:30 +0000 (09:26 +0100)]
bgpd: fix address-family display for l2vpn evpn

When configuring l2vpn evpn address-family, the show running indicates
that the address-family l2vpn evpn address-family has been configured,
and not evpn, as it was done before this commit. This is a bug fix.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: simplify str2esi function
Philippe Guibert [Thu, 9 Feb 2017 08:23:23 +0000 (09:23 +0100)]
bgpd: simplify str2esi function

The commit replaces the char-by-char handling function by sscanf routine
usage. This implementation is simplified and does the same.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: remove useless white space character in evpn function declaration
Philippe Guibert [Thu, 9 Feb 2017 08:12:21 +0000 (09:12 +0100)]
bgpd: remove useless white space character in evpn function declaration

Some tabulation replaces the white space used for the declaration of
this evpn function.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix overlay index comparison
Philippe Guibert [Thu, 9 Feb 2017 08:09:54 +0000 (09:09 +0100)]
bgpd: fix overlay index comparison

To know if overlay index is the same between two route information,
then the two overlay index field is compared. If both fields are set to
null, then the comparison should be equal, then return true, which was
not done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: change str2mac call api
Philippe Guibert [Thu, 9 Feb 2017 07:44:13 +0000 (08:44 +0100)]
bgpd: change str2mac call api

With the changed API, some adaptations are done in rfapi code, and in
bgpd evpn code. For evpn code, the internal storage of routermac addr is
kept as struct ethaddr structure. Also the evpn add_routermac api has as
incoming parameter a struct ethaddr param.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: simplify str2mac and use struct ethaddr structure
Philippe Guibert [Thu, 9 Feb 2017 07:42:32 +0000 (08:42 +0100)]
lib: simplify str2mac and use struct ethaddr structure

This commit simplified the string to mac conversion, since it uses
sscanf, instead of depicting each incoming character one by one, and
doing self analysis. Also,this commit changes the internal usage of the
mac address representation in mac handling function.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>