]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years ago*: fix GCC 7 warnings/issues
David Lamparter [Fri, 14 Jul 2017 14:48:41 +0000 (16:48 +0200)]
*: fix GCC 7 warnings/issues

The label initializer & nhrpd variable are just to shut up GCC 7,
the other two are actual bugs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: fix GCC 7 switch/case fallthrough warnings
David Lamparter [Fri, 14 Jul 2017 14:48:01 +0000 (16:48 +0200)]
*: fix GCC 7 switch/case fallthrough warnings

Need a comment on these.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #803 from opensourcerouting/redhat-doc-fixes-master
Donald Sharp [Fri, 14 Jul 2017 14:59:31 +0000 (10:59 -0400)]
Merge pull request #803 from opensourcerouting/redhat-doc-fixes-master

Redhat doc fixes for master branch

6 years agoMerge pull request #809 from donaldsharp/evpn_plus_struct_attr
Russ White [Fri, 14 Jul 2017 13:36:31 +0000 (09:36 -0400)]
Merge pull request #809 from donaldsharp/evpn_plus_struct_attr

Evpn plus struct attr

6 years agobgpd, zebra: Cleanup warnings from new code
Donald Sharp [Fri, 14 Jul 2017 12:52:45 +0000 (08:52 -0400)]
bgpd, zebra: Cleanup warnings from new code

1) Clean up VTY_NEWLINE -> \n
2) Remove usages of VTY_GET_INTEGER

Signed-off-by: Donald Sharp
6 years agoMerge remote-tracking branch 'origin/master' into evpn_plus_struct_attr
Donald Sharp [Fri, 14 Jul 2017 12:24:46 +0000 (08:24 -0400)]
Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr

6 years agoMerge remote-tracking branch 'origin/master' into evpn_plus_struct_attr
Donald Sharp [Fri, 14 Jul 2017 12:11:05 +0000 (08:11 -0400)]
Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr

6 years agobgpd: Disable new EVPN CLI
Donald Sharp [Fri, 14 Jul 2017 12:08:52 +0000 (08:08 -0400)]
bgpd: Disable new EVPN CLI

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #813 from opensourcerouting/newline-redux
Russ White [Fri, 14 Jul 2017 12:00:43 +0000 (08:00 -0400)]
Merge pull request #813 from opensourcerouting/newline-redux

newline redux

6 years agoMerge pull request #762 from bingen/mutiple_nh_recursive_levels
Donald Sharp [Fri, 14 Jul 2017 11:44:02 +0000 (07:44 -0400)]
Merge pull request #762 from bingen/mutiple_nh_recursive_levels

Allow for more than 1 NH recursion level

6 years agoMerge pull request #804 from opensourcerouting/fixes/tests/prng
Donald Sharp [Fri, 14 Jul 2017 11:43:40 +0000 (07:43 -0400)]
Merge pull request #804 from opensourcerouting/fixes/tests/prng

tests: update prng to return better pseudo random numbers

6 years agolib, vtysh: remove now-useless newline arg
David Lamparter [Fri, 14 Jul 2017 11:18:14 +0000 (13:18 +0200)]
lib, vtysh: remove now-useless newline arg

It's always \n now, hooray.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge remote-tracking branch 'frr/master' into newline-redux
David Lamparter [Fri, 14 Jul 2017 11:15:55 +0000 (13:15 +0200)]
Merge remote-tracking branch 'frr/master' into newline-redux

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #799 from dwalton76/bgpd-show-labeled-unicast
Russ White [Fri, 14 Jul 2017 11:12:02 +0000 (07:12 -0400)]
Merge pull request #799 from dwalton76/bgpd-show-labeled-unicast

bgpd: show bgp ipv4 label-unicast does not provide any output

6 years agoMerge pull request #808 from qlyoung/vtysh-termcols
Russ White [Fri, 14 Jul 2017 11:10:13 +0000 (07:10 -0400)]
Merge pull request #808 from qlyoung/vtysh-termcols

lib, vtysh: pretty-print variable autocompletions

6 years ago*: remove vty_outln again
David Lamparter [Fri, 14 Jul 2017 11:09:47 +0000 (13:09 +0200)]
*: remove vty_outln again

(PRs merged to master added another few vty_outln() calls)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge remote-tracking branch 'frr/master' into newline-redux
David Lamparter [Fri, 14 Jul 2017 11:07:30 +0000 (13:07 +0200)]
Merge remote-tracking branch 'frr/master' into newline-redux

Lots of conflicts from CMD_WARNING_CONFIG_FAILED...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #800 from qlyoung/fix-old-vpn-commands
Russ White [Fri, 14 Jul 2017 10:53:34 +0000 (06:53 -0400)]
Merge pull request #800 from qlyoung/fix-old-vpn-commands

bgpd: fix old-style vpn commands

6 years agoMerge pull request #815 from dwalton76/CMD_WARNING_take2
Russ White [Fri, 14 Jul 2017 10:24:01 +0000 (06:24 -0400)]
Merge pull request #815 from dwalton76/CMD_WARNING_take2

vtysh: return non-zero for configuration failures

6 years agoMerge pull request #817 from donaldsharp/babel_redist
Russ White [Fri, 14 Jul 2017 10:20:54 +0000 (06:20 -0400)]
Merge pull request #817 from donaldsharp/babel_redist

babeld: Allow babel to redistribute v6 routes

6 years agoMerge pull request #814 from qlyoung/vtysh-password-commands
David Lamparter [Fri, 14 Jul 2017 08:24:22 +0000 (10:24 +0200)]
Merge pull request #814 from qlyoung/vtysh-password-commands

vtysh: fixup password commands

6 years ago*: remove VTYNL, part 6 of 6
David Lamparter [Thu, 13 Jul 2017 18:17:06 +0000 (20:17 +0200)]
*: remove VTYNL, part 6 of 6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove VTYNL, part 5 of 6
David Lamparter [Thu, 13 Jul 2017 17:50:33 +0000 (19:50 +0200)]
*: remove VTYNL, part 5 of 6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove VTYNL, part 4 of 6
David Lamparter [Thu, 13 Jul 2017 17:42:42 +0000 (19:42 +0200)]
*: remove VTYNL, part 4 of 6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove VTYNL, part 3 of 6
David Lamparter [Thu, 13 Jul 2017 17:20:20 +0000 (19:20 +0200)]
*: remove VTYNL, part 3 of 6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove VTYNL, part 2 of 6
David Lamparter [Thu, 13 Jul 2017 17:12:39 +0000 (19:12 +0200)]
*: remove VTYNL, part 2 of 6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove VTYNL, part 1 of 6
David Lamparter [Thu, 13 Jul 2017 17:04:25 +0000 (19:04 +0200)]
*: remove VTYNL, part 1 of 6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoospf6d: VNL -> VTYNL
David Lamparter [Thu, 13 Jul 2017 17:06:52 +0000 (19:06 +0200)]
ospf6d: VNL -> VTYNL

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: ditch vty_outln(), part 2 of 2
David Lamparter [Thu, 13 Jul 2017 16:50:29 +0000 (18:50 +0200)]
*: ditch vty_outln(), part 2 of 2

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobabeld: Allow babel to redistribute v6 routes
Donald Sharp [Thu, 13 Jul 2017 21:35:29 +0000 (17:35 -0400)]
babeld: Allow babel to redistribute v6 routes

Turn on the ability in babel to receive v6 routes when requested.

robot# show babel route
192.168.201.0/24 metric 0 (exported)
2606:a000:111d:803e::/64 metric 0 (exported)
robot# conf t
robot(config)# int enp3s0
robot(config-if)# ipv6 addr 2404:4000:991d:804c:c32:ee94:742c:4d5/73
robot(config-if)# end
robot# show babel route
192.168.201.0/24 metric 0 (exported)
2606:a000:111d:803e::/64 metric 0 (exported)
2404:4000:991d:804c:c00::/73 metric 0 (exported)
robot#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agovtysh: return non-zero for configuration failures
Daniel Walton [Thu, 13 Jul 2017 19:56:08 +0000 (19:56 +0000)]
vtysh: return non-zero for configuration failures

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.

6 years agovtysh: fixup password commands
Quentin Young [Thu, 13 Jul 2017 19:28:41 +0000 (15:28 -0400)]
vtysh: fixup password commands

`password` and `enable password` commands got a bit broken in an earlier
commit, fix 'em up.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: ditch vty_outln(), part 1 of 2
David Lamparter [Thu, 13 Jul 2017 15:49:13 +0000 (17:49 +0200)]
*: ditch vty_outln(), part 1 of 2

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: move \n vs. \r\n handling into vty code
David Lamparter [Thu, 13 Jul 2017 15:34:08 +0000 (17:34 +0200)]
lib: move \n vs. \r\n handling into vty code

Instead of having an ?: expression embedded in every single caller of
vty_out, just expand \n to \r\n in the vty code if neccessary.

(Deprecation warnings will be enabled in the next commits which will do
the search-and-replace over the codebase.)

[This reverts commit 4d5f445 "lib: add vty_outln()"]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: vty: warn when using compatibility macros
David Lamparter [Wed, 12 Jul 2017 14:23:40 +0000 (16:23 +0200)]
lib: vty: warn when using compatibility macros

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: COMMUNITY.md: compatibility foo & deprecation
David Lamparter [Thu, 13 Jul 2017 15:36:03 +0000 (17:36 +0200)]
*: COMMUNITY.md: compatibility foo & deprecation

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobgpd: show bgp ipv4 label-unicast does not provide any output
Daniel Walton [Thu, 13 Jul 2017 15:17:15 +0000 (15:17 +0000)]
bgpd: show bgp ipv4 label-unicast does not provide any output

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agolib, vtysh: pretty-print variable autocompletions
Quentin Young [Wed, 12 Jul 2017 18:40:18 +0000 (14:40 -0400)]
lib, vtysh: pretty-print variable autocompletions

Pretty-prints variable autocompletions by breaking them up into multiple
lines, indenting them consistently and respecting the column width of
the terminal.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #807 from Jafaral/qua2frr
Donald Sharp [Thu, 13 Jul 2017 14:00:19 +0000 (10:00 -0400)]
Merge pull request #807 from Jafaral/qua2frr

Find/Replace Quagga/FRR

6 years agozebra: Fix compilation warning
ßingen [Thu, 13 Jul 2017 13:09:38 +0000 (15:09 +0200)]
zebra: Fix compilation warning

Signed-off-by: ßingen <bingen@voltanet.io>
6 years agolib, test: Add test case for ALL_NEXTHOPS_RO
ßingen [Thu, 13 Jul 2017 13:07:12 +0000 (15:07 +0200)]
lib, test: Add test case for ALL_NEXTHOPS_RO

Without it, tests were passing before commit 9fb47c0, so a case was
missing (the one which that commit fixes).

Signed-off-by: ßingen <bingen@voltanet.io>
6 years agoMerge pull request #798 from dwalton76/CMD_RANGE_STR
David Lamparter [Thu, 13 Jul 2017 12:58:52 +0000 (14:58 +0200)]
Merge pull request #798 from dwalton76/CMD_RANGE_STR

bgpd: --enable-multipath=256 setting is ignored

6 years agoMerge pull request #796 from qlyoung/fix-hash-stats
David Lamparter [Thu, 13 Jul 2017 12:57:44 +0000 (14:57 +0200)]
Merge pull request #796 from qlyoung/fix-hash-stats

lib: use 32-bit atomics, s/pow/mul

6 years agobgpd: Refactor 'struct attr_extra' into 'struct attr'
Donald Sharp [Tue, 6 Jun 2017 17:20:38 +0000 (13:20 -0400)]
bgpd: Refactor 'struct attr_extra' into 'struct attr'

Most of the attributes in 'struct attr_extra' allow for
the more interesting cases of using bgp.  The extra
overhead of managing it will induce errors as we add
more attributes and the extra memory overhead is
negligible on anything but full bgp feeds.

Additionally this greatly simplifies the code for
the handling of data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Fix missing label set

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Fix some defines for older platforms
Donald Sharp [Fri, 26 May 2017 15:59:05 +0000 (11:59 -0400)]
lib: Fix some defines for older platforms

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: On cleanup make sure pointers exist
Donald Sharp [Fri, 26 May 2017 15:54:07 +0000 (11:54 -0400)]
bgpd: On cleanup make sure pointers exist

Test cases create fake bgp structure that is passed to
cleanup.  The new evpn code assumed ( and probably rightly so)
that if the bgp structure was created it actually initialized
all useful data structures.  Just make the evpn cleanup
functions be smart about attempting to free memory never
allocated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Ensure EVPN next hops are not overriden
vivek [Fri, 26 May 2017 06:06:38 +0000 (23:06 -0700)]
bgpd: Ensure EVPN next hops are not overriden

Updates: bgpd: Fix next hop setting for EVPN
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: Handle change to router id for EVPN
vivek [Mon, 15 May 2017 22:02:33 +0000 (15:02 -0700)]
bgpd: Handle change to router id for EVPN

When the BGP router-id changes, EVPN routes need to be processed due
to potential change to their RD.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: Additional configuration for EVPN
vivek [Mon, 15 May 2017 22:01:57 +0000 (15:01 -0700)]
bgpd: Additional configuration for EVPN

Implement configuration options for EVPN. The configuration options include
VNI configuration with RD and Import and Export Route Targets. Also, display
the EVPN configuration.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agobgpd: Display (show) commands for EVPN
vivek [Mon, 15 May 2017 21:53:31 +0000 (14:53 -0700)]
bgpd: Display (show) commands for EVPN

Implement various operational/display commands for EVPN:
- show bgp evpn summary
- show bgp evpn vni [<vni>]
- show bgp evpn route [type <macip|multicast>]
- show bgp evpn route [rd <rd> [type <macip|multicast>]]
- show bgp evpn route [rd <rd> [mac <mac> [ip <ip>]]]
- show bgp evpn route vni <vni> [type <macip|multicast> | vtep <ip>]
- show bgp evpn route vni <vni> [mac <mac> [ip <ip>]]]
- show bgp evpn route vni <vni> [multicast <ip>]
- show bgp evpn route vni all [vtep <ip>]
- show bgp evpn import-rt

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: Debug logging updates for EVPN
vivek [Mon, 15 May 2017 21:52:17 +0000 (14:52 -0700)]
bgpd: Debug logging updates for EVPN

Ensure VNI and EVPN nexthops are logged in debug logs.

Updates: "bgpd: labeled unicast processing"
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: MAC Mobility extended community string conversion
vivek [Mon, 15 May 2017 21:50:21 +0000 (14:50 -0700)]
bgpd: MAC Mobility extended community string conversion

Updates: d5b9da8a79cbf2acf287bda2600e86a5a3243c64
Updates: 749513cc9d7bf571b3049931057d544b4111c39d

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agobgpd, zebra: Support for sticky MACs
vivek [Mon, 15 May 2017 21:42:57 +0000 (14:42 -0700)]
bgpd, zebra: Support for sticky MACs

Implement support for sticky (static) MACs. This includes the following:

- Recognize MAC is static (using NUD_NOARP flag) and inform BGP
- Construct MAC mobility extended community for sticky MACs as per
RFC 7432 section 15.2
- Inform to zebra that remote MAC is sticky, where appropriate
- Install sticky MACs into the kernel with the right flag
- Appropriate handling in route selection

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: EVPN route handling
vivek [Mon, 15 May 2017 21:34:04 +0000 (14:34 -0700)]
bgpd: EVPN route handling

Core EVPN route handling functionality. This includes support for the
following:
- interface with zebra to learn about local VNIs and MACIPs as well as
to install remote VTEPs (per VNI) and remote MACIPs
- create/update/delete EVPN type-2 and type-3 routes
- attribute creation, route selection and install
- route handling per VNI and for the global routing table
- parsing of received EVPN routes and handling by route type
- encoding attributes for EVPN routes and EVPN prefix creation (for
Updates)

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agodoc: update a few places to say FRR
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 18:36:25 +0000 (13:36 -0500)]
doc: update a few places to say FRR

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agozebra: rename to frrconfdir
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 18:31:13 +0000 (13:31 -0500)]
zebra: rename to frrconfdir

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agotools: update to use FRR name
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 18:26:22 +0000 (13:26 -0500)]
tools: update to use FRR name

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agogitignore: update references to FRR
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 16:55:04 +0000 (11:55 -0500)]
gitignore: update references to FRR

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agobgpd: Additional check on presence of tag/label
vivek [Thu, 25 May 2017 00:50:29 +0000 (17:50 -0700)]
bgpd: Additional check on presence of tag/label

In the case of EVPN, not all EVPN routes will necessarily have a tag/label.
Do an additional check on presence of tag, where needed.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agotests: update prng to return better pseudo random numbers
Christian Franke [Wed, 12 Jul 2017 16:44:44 +0000 (18:44 +0200)]
tests: update prng to return better pseudo random numbers

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib: fix error message to reference FRR
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 16:42:25 +0000 (11:42 -0500)]
lib: fix error message to reference FRR

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agolib: Define handlers for VNI and MACIP
vivek [Mon, 15 May 2017 21:32:38 +0000 (14:32 -0700)]
lib: Define handlers for VNI and MACIP

Define client handlers for processing add or delete of local VNIs
and local MACIPs.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: Install or remove only relevant routes from zebra
vivek [Mon, 15 May 2017 21:31:57 +0000 (14:31 -0700)]
bgpd: Install or remove only relevant routes from zebra

Ensure that the AFI/SAFI is relevant to the FIB before attempting to install
or remove the route from zebra.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agolib: Change comment to reference watchfrr
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 16:36:47 +0000 (11:36 -0500)]
lib: Change comment to reference watchfrr

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agobgpd: Implement EVPN enable/disable
vivek [Mon, 15 May 2017 21:30:19 +0000 (14:30 -0700)]
bgpd: Implement EVPN enable/disable

Implement the command 'advertise-all-vni' under the EVPN address-family
in order to allow the local system to learn about local VNIs (and MACs
and Neighbors corresponding to those VNIs) and exchange with other EVPN
speakers.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
6 years agobgpd: EVPN initialization and cleanup
vivek [Mon, 15 May 2017 21:27:51 +0000 (14:27 -0700)]
bgpd: EVPN initialization and cleanup

Define the EVPN (EVI) hash table and related structures and initialize
and cleanup.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: EVPN definitions
vivek [Mon, 15 May 2017 21:27:09 +0000 (14:27 -0700)]
bgpd: EVPN definitions

Define the EVPN (EVI) hash table and objects for mapping route targets to EVIs.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agobgpd: Fix next hop setting for EVPN
vivek [Wed, 24 May 2017 21:57:34 +0000 (14:57 -0700)]
bgpd: Fix next hop setting for EVPN

The next hop for EVPN routes must be an IPv4 or IPv6 address as per
RFC 7432. Ensure this is correctly handled. Also, ensure there
are correct checks for AFI_L2VPN and nexthop AFI is not AFI_L2VPN.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: Fix check for martian next hops
vivek [Mon, 15 May 2017 20:48:18 +0000 (13:48 -0700)]
bgpd: Fix check for martian next hops

Ensure that the check for martian next hop is correct, including for MP
nexthops, if IPv4.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Function to encode Encapsulation type extended community
vivek [Mon, 15 May 2017 20:47:36 +0000 (13:47 -0700)]
bgpd: Function to encode Encapsulation type extended community

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: Display extended communities in debug log
vivek [Mon, 15 May 2017 19:35:15 +0000 (12:35 -0700)]
bgpd: Display extended communities in debug log

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Separate out RD handling functions
vivek [Mon, 15 May 2017 19:33:59 +0000 (12:33 -0700)]
bgpd: Separate out RD handling functions

BGP Route Distinguisher (RD) handling is common for different flavors
of BGP VPNs such as BGP/MPLS IP VPNs (RFC 4364) and BGP EVPNs (RFC 7432).
Separate out the RD handling functions into its own files.

Note: No functional change introduced with this commit.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agowatchfrr: fix error message
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 16:31:11 +0000 (11:31 -0500)]
watchfrr: fix error message

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agobgpd: Refine extended community handling
vivek [Mon, 15 May 2017 19:31:01 +0000 (12:31 -0700)]
bgpd: Refine extended community handling

Define helper functions to form different kinds of route targets. Also,
refine functions that encode extended communities as well as generate
a string from an extended community.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: EVPN/VxLAN UI definitions and handling
vivek [Mon, 15 May 2017 05:45:55 +0000 (22:45 -0700)]
zebra: EVPN/VxLAN UI definitions and handling

Implement various UI (vty) commands for EVPN/VxLAN.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: MAC and Neighbor (ARP/ND) handling
vivek [Mon, 15 May 2017 05:44:13 +0000 (22:44 -0700)]
zebra: MAC and Neighbor (ARP/ND) handling

Implement handling of MACs and Neighbors (ARP/ND entries) in zebra:
- MAC and Neighbor database handlers
- Read MACs and Neighbors from the kernel, when needed and create
entries in zebra's MAC and Neighbor databases.
- Handle add/update/delete notifications from the kernel for MACs and
Neighbors and update zebra's database appropriately
- Inform locally learnt MACs and Neighbors to client
- Handle MACIP add/delete from client and install appriporiate entries
into the kernel
- Since Neighbor entries will be installed on an SVI, implement the
needed mappings

NOTE: kernel interface is only implemented for Linux/netlink

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: prettier format for multilevel-recursive routes
Christian Franke [Wed, 12 Jul 2017 16:28:40 +0000 (18:28 +0200)]
zebra: prettier format for multilevel-recursive routes

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agozebra: use copy_nexthops in route_entry_copy_nexthops
Christian Franke [Wed, 12 Jul 2017 16:28:05 +0000 (18:28 +0200)]
zebra: use copy_nexthops in route_entry_copy_nexthops

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib: copy rmap_src too in copy_nexthops
Christian Franke [Wed, 12 Jul 2017 16:28:03 +0000 (18:28 +0200)]
lib: copy rmap_src too in copy_nexthops

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib,zebra: Fix ALL_NEXTHOPS iterator
Christian Franke [Wed, 12 Jul 2017 16:27:55 +0000 (18:27 +0200)]
lib,zebra: Fix ALL_NEXTHOPS iterator

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agozebra: MAC and Neighbor hash table definition
vivek [Mon, 15 May 2017 05:41:04 +0000 (22:41 -0700)]
zebra: MAC and Neighbor hash table definition

Define the MAC and Neighbor (ARP/ND) data structures. These are maintained
as hash tables against the VNI. Also, define context structures used for
performing various operations on these two tables.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: VNI and VTEP handling
vivek [Mon, 15 May 2017 05:38:26 +0000 (22:38 -0700)]
zebra: VNI and VTEP handling

Implement fundamental handling for VNIs and VTEPs:
- Handle EVPN enable/disable by client (advertise-all-vni)
- Create/update/delete VNIs based on VxLAN interface events and inform
client
- Handle VTEP add/delete from client and install into kernel
- New debug command for VxLAN/EVPN
- kernel interface (Linux/netlink only)

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoconfig: switch a few references to say FRR
Jafar Al-Gharaibeh [Wed, 12 Jul 2017 16:25:33 +0000 (11:25 -0500)]
config: switch a few references to say FRR

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agozebra: VNI and VTEP definition
vivek [Mon, 15 May 2017 05:37:42 +0000 (22:37 -0700)]
zebra: VNI and VTEP definition

Define the base data structures for a VxLAN Network Identifier (VNI) and
VxLAN Tunnel End Point (VTEP). These will be used by the EVPN function.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Layer-2 interface handling
vivek [Mon, 15 May 2017 05:31:08 +0000 (22:31 -0700)]
zebra: Layer-2 interface handling

Define interface types of interest and recognize the types. Store layer-2
information (VLAN Id, VNI etc.) for interfaces, process bridge interfaces
and map bridge members to bridge. Display all the additional information
to user (through "show interface").

Note: Only implemented for the netlink interface.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #791 from LabNConsulting/working/master/patch-set/style
Donald Sharp [Wed, 12 Jul 2017 16:13:37 +0000 (12:13 -0400)]
Merge pull request #791 from LabNConsulting/working/master/patch-set/style

A couple of compatibility/style fixes

6 years agoMerge pull request #793 from opensourcerouting/hash-double-init
Donald Sharp [Wed, 12 Jul 2017 12:27:24 +0000 (08:27 -0400)]
Merge pull request #793 from opensourcerouting/hash-double-init

lib: init & cleanup fixes

6 years agoMerge pull request #784 from Jafaral/debpkgfix
Donald Sharp [Wed, 12 Jul 2017 12:25:34 +0000 (08:25 -0400)]
Merge pull request #784 from Jafaral/debpkgfix

Debian pkg cleanup

6 years agoUpdate comments for ALL_NEXTHOPS_RO definition
ßingen [Wed, 12 Jul 2017 06:54:13 +0000 (08:54 +0200)]
Update comments for ALL_NEXTHOPS_RO definition

Signed-off-by: ßingen <bingen@voltanet.io>
6 years agodoc: Update Building Doc for RedHat-style Distro's (CentOS / Fedora)
Martin Winter [Wed, 12 Jul 2017 01:30:04 +0000 (18:30 -0700)]
doc: Update Building Doc for RedHat-style Distro's (CentOS / Fedora)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: Add missing pimd & babels to startup scripts and config
Martin Winter [Wed, 12 Jul 2017 01:29:06 +0000 (18:29 -0700)]
redhat: Add missing pimd & babels to startup scripts and config

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agobgpd: fix old-style vpn commands
Quentin Young [Tue, 11 Jul 2017 19:42:11 +0000 (15:42 -0400)]
bgpd: fix old-style vpn commands

Remove:
-------
* set vpnv4 next-hop X:X::X:X
* set vpnv6 next-hop A.B.C.D
* no set vpn next-hop <A.B.C.D|X:X::X:X>

Add:
----
* no set vpnv4 next-hop A.B.C.D
* no set vpnv6 next-hop X:X::X:X

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: show bgp ipv4 label-unicast does not provide any output
Daniel Walton [Tue, 11 Jul 2017 18:59:03 +0000 (18:59 +0000)]
bgpd: show bgp ipv4 label-unicast does not provide any output

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
labeled-unicast routes are installed in the unicast table, to make
troubleshooting easier we need "show bgp ipv4 labeled-unicast x.x.x.x"
to show the x.x.x.x route in the unicast table.

6 years agodoc: add Backwards Compatibility section to COMMUNITY.md
Lou Berger [Tue, 11 Jul 2017 18:58:03 +0000 (14:58 -0400)]
doc: add Backwards Compatibility section to COMMUNITY.md

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agolib: use 32-bit atomics, s/pow/mul
Quentin Young [Tue, 11 Jul 2017 15:14:09 +0000 (11:14 -0400)]
lib: use 32-bit atomics, s/pow/mul

Some platforms don't support 64-bit atomics, missed converting a
floating point pow() to an integral mul when changing SD algo.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agovty: add some more defines for backwards compatibility
Lou Berger [Tue, 11 Jul 2017 18:41:44 +0000 (14:41 -0400)]
vty: add some more defines for backwards compatibility

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: --enable-multipath=256 setting is ignored
Daniel Walton [Tue, 11 Jul 2017 18:41:08 +0000 (18:41 +0000)]
bgpd: --enable-multipath=256 setting is ignored

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Restoring some code that was unintentionally removed when we were
migrating to Quentin's parser.

6 years agoMerge pull request #795 from opensourcerouting/build-fix-openbsd-tree-path
Quentin Young [Tue, 11 Jul 2017 14:52:54 +0000 (10:52 -0400)]
Merge pull request #795 from opensourcerouting/build-fix-openbsd-tree-path

minor build-fixes

6 years agolib: grammar_sandbox: don't pre-setup nodegraph
David Lamparter [Tue, 11 Jul 2017 14:07:41 +0000 (16:07 +0200)]
lib: grammar_sandbox: don't pre-setup nodegraph

This shows up as still reachable allocation on exit, which is somewhat
misleading.  Note this only affects --enable-dev-build.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: drop off "masters" list on master_free()
David Lamparter [Tue, 11 Jul 2017 14:08:54 +0000 (16:08 +0200)]
lib: drop off "masters" list on master_free()

Don't leave a dangling leaked reference.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>