]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agobgpd: Fix attribute handling for type-5 routes
vivek [Sat, 9 Dec 2017 00:36:27 +0000 (16:36 -0800)]
bgpd: Fix attribute handling for type-5 routes

When a EVPN type-5 route is formed by using the source IP route's AS-path,
the AS-path is not locally generated and should not be "uninterned" (i.e.,
have its reference count incorrectly updated). An incorrect update of the
reference count can lead to asserts or crashes at a later stage.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-19121
Reviewed By: CCR-7028
Testing Done:
1. Manual testing by Vivek and Anitha
2. No automation run since this area has no coverage yet

6 years ago*: Reintroduce JSON keywords for EVPN
vivek [Thu, 7 Dec 2017 16:28:04 +0000 (08:28 -0800)]
*: Reintroduce JSON keywords for EVPN

Bring back "numVnis" and "originatorIp" for backwards compatibility.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-19119
Reviewed By: Trivial
Testing Done: Manual, evpn_tests.py

6 years agolib: Display configured VRFs
vivek [Tue, 5 Dec 2017 04:05:15 +0000 (20:05 -0800)]
lib: Display configured VRFs

Ensure that configured VRFs are displayed in the running configuration.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Mitesh Kanjariya <mkanjariya@cumulusnetworks.com>
Ticket: CM-10139
Reviewed By: CCR-7012
Testing Done: Verify failed test scenario

6 years agolib: Handle configured VRFs at termination
vivek [Mon, 4 Dec 2017 21:10:09 +0000 (13:10 -0800)]
lib: Handle configured VRFs at termination

When shutting down, ensure that all VRFs including "configured" ones are
cleaned up properly.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-19069
Reviewed By: CCR-7011
Testing Done: Manual verification of failed scenario

6 years agobgpd: Use source route's path attributes for type-5 routes
vivek [Mon, 4 Dec 2017 17:52:54 +0000 (09:52 -0800)]
bgpd: Use source route's path attributes for type-5 routes

When an IPv4 or IPv6 unicast route is injected into EVPN as a type-5 route
(upon user configuration), ensure that the source route (best path)'s path
attributes are used to build the EVPN type-5 route. This will result in
correct AS_PATH and ORIGIN attributes for the type-5 route so that it doesn't
appear that all type-5 routes are locally sourced. This is necessary to
ensure that external paths (IPv4 or IPv6 from EBGP peer) are preferred over
internal EVPN paths, if both exist.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-19051
Reviewed By: CCR-7009
Testing Done: Verify failed scenario

6 years agobgpd: filter for prefix route in route rd commands
Mitesh Kanjariya [Sun, 3 Dec 2017 00:53:59 +0000 (16:53 -0800)]
bgpd: filter for prefix route in route rd commands

Ticket: CM-19000
Review: crr-7008
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: provide filter for ip prefix route in bgp l2vpn evpn route cmd
Mitesh Kanjariya [Sun, 3 Dec 2017 00:27:29 +0000 (16:27 -0800)]
bgpd: provide filter for ip prefix route in bgp l2vpn evpn route cmd

Ticket: CM-19000
Review: ccr-7008
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: Fix check when uninstalling remote next hops
vivek [Sat, 2 Dec 2017 07:31:22 +0000 (23:31 -0800)]
zebra: Fix check when uninstalling remote next hops

Only check on L3-VNI SVI status when uninstalling remote next hops.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-19036
Reviewed By: None
Testing Done:
1. Networking restart
2. VxLAN interface disable/enable
3. VRF delete and readd

6 years agoRevert "zebra: Do not check for l3vni oper up in nh uninstall"
vivek [Sat, 2 Dec 2017 06:29:47 +0000 (22:29 -0800)]
Revert "zebra: Do not check for l3vni oper up in nh uninstall"

This reverts commit d8f5884846ead8fc78f36c68db5ed52e758b6e87.

6 years ago*: Handle VRF configuration when VRF gets inactivated and activated
vivek [Sat, 2 Dec 2017 01:36:37 +0000 (17:36 -0800)]
*: Handle VRF configuration when VRF gets inactivated and activated

A VRF is active only when the corresponding VRF device is present in the
kernel. However, when the kernel VRF device is removed, the VRF container in
FRR should go away only if there is no user configuration for it. Otherwise,
when the VRF device is created again so that the VRF becomes active, FRR
cannot take the correct actions. Example configuration for the VRF includes
static routes and EVPN L3 VNI.

Note that a VRF is currently considered to be "configured" as soon as the
operator has issued the "vrf <name>" command in FRR. Such a configured VRF
is not deleted upon VRF device removal, it is only made inactive. A VRF that
is "configured" can be deleted only upon operator action and only if the VRF
has been deactivated i.e., the VRF device removed from the kernel. This is
an existing restriction.

To implement this change, the VRF disable and delete actions have been modified.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Mitesh Kanjariya <mkanjariya@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-18553, CM-18918, CM-10139
Reviewed By: CCR-7022
Testing Done:
1. vrf and pim-vrf automation tests
2. Multiple VRF delete and readd (ifdown, ifup-with-depends)
3. FRR stop, start, restart
4. Networking restart
5. Configuration delete and readd

Some of the above tests run in different sequences (manually).

6 years agobgpd: fix show bgp l2vpn evpn vni command
Mitesh Kanjariya [Thu, 30 Nov 2017 01:50:42 +0000 (17:50 -0800)]
bgpd: fix show bgp l2vpn evpn vni command

We bail in the command if no l2vnis are present.
This is incorrect as we now print both l2 and l3 vnis together.

Ticket: CM-19022
Review: Trivial
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: Do not check for l3vni oper up in nh uninstall
Mitesh Kanjariya [Thu, 30 Nov 2017 00:24:07 +0000 (16:24 -0800)]
zebra: Do not check for l3vni oper up in nh uninstall

We shouldnt check for l3vni oper up while uninstalling the next-hop.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: re-add remote RMAC if needed
Mitesh Kanjariya [Wed, 29 Nov 2017 10:25:35 +0000 (02:25 -0800)]
zebra: re-add remote RMAC if needed

Kernel can delete a frr installed remote RMAC on a L3-VNI.
We should re-add if such a siatuation occurs
as we are the owner of the RMAC.
This behavor is same for remote MACs as well and was missing for RMACs.

Ticket: CM-18762
Review: CCR-6992
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: write vni to config in default vrf
Mitesh Kanjariya [Tue, 28 Nov 2017 23:43:42 +0000 (15:43 -0800)]
zebra: write vni to config in default vrf

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd/zebra: show command enhancements for EVPN symmetric routing
Mitesh Kanjariya [Wed, 15 Nov 2017 09:01:00 +0000 (01:01 -0800)]
bgpd/zebra: show command enhancements for EVPN symmetric routing

0. move all global EVPN details to 'show evpn [json]' command
1. change "VRF" to "Tenant VRF" in 'show evpn vni'
2. change 'show vrf vni' command to tabular form
   and add l3-vni related params to the output
3. show evpn rmac should show refcount only in detailed output
4. show evpn next-hop should show refcount only in detailed output
5. move VRF in 'show evpn l3vni' to the end
6. add num rmacs and num nexthops to show evpn l3vni
7. remove "info" from 'show bgp vrf <> l3vni info'
8. show evpn vni <vni> should show l2vni details or l3 vni details
9. show evpn vni should show both L2 and L3 VNIs
10. show bgp l2vpn evpn - shows all global bgp l2vpn evpn details
11. show bgp l2vpn evpn vni - will show both l2 and l3 vnis
12. show bgp l2vpn evpn vni - should show both l2 and l3 vnis
13. follow camel notation for all json keys

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: advertise VNI subnet
Mitesh Kanjariya [Mon, 20 Nov 2017 05:47:04 +0000 (21:47 -0800)]
bgpd: advertise VNI subnet

In EVPN symmetric routing, not all subnets are presents everywhere.
We have multiple scenarios where a host might not get learned locally.
1. GARP miss
2. SVI down/up
3. Silent host

We need a mechanism to resolve such hosts. In order to achieve this,
we will be advertising a subnet route from a box and that box will help
in resolving the ARP to such hosts.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: carry two MPLS labels in EVPN NLRIs
Mitesh Kanjariya [Tue, 21 Nov 2017 10:42:05 +0000 (02:42 -0800)]
bgpd: carry two MPLS labels in EVPN NLRIs

When doing symmetric routing,
EVPN type-2 (MACIP) routes need to be advertised with two labels (VNIs)
the first being the L2 VNI (identifying the VLAN) and
the second being the L3 VNI (identifying the VRF).
The receive processing needs to handle one or two labels too.

Ticket: CM-18489
Review: CCR-6949
Testing: manual and bgp/evpn/mpls smoke

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agobgpd: bgpd crash in update all type2 routes
Mitesh Kanjariya [Tue, 21 Nov 2017 02:54:02 +0000 (18:54 -0800)]
bgpd: bgpd crash in update all type2 routes

Ticket: CM-18924
Review: Trivial
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: unblock l2vpn evpn for non default vrf
Mitesh Kanjariya [Tue, 21 Nov 2017 00:47:55 +0000 (16:47 -0800)]
bgpd: unblock l2vpn evpn for non default vrf

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: vrf/vni mapping command for default instance
Mitesh Kanjariya [Sat, 18 Nov 2017 08:50:46 +0000 (00:50 -0800)]
bgpd: vrf/vni mapping command for default instance

Ticket: CM-18906
Review: CCR-6946
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd/zebra/lib: Add Default Gateway extended community
Mitesh Kanjariya [Mon, 13 Nov 2017 11:19:52 +0000 (03:19 -0800)]
bgpd/zebra/lib: Add Default Gateway extended community

1. Added default gw extended community
2. code modification to handle sticky-mac/default-gw-mac as they go together
3. show command support for newly added extended community
4. State in zebra to reflect if a mac/neigh is default gateway
5. show command enhancement to refelect the same in zebra commands

Ticket: CM-17428
Review: CCR-6580
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoMerge pull request #1618 from donaldsharp/zebra_startup_ordering
Philippe Guibert [Tue, 23 Jan 2018 07:25:01 +0000 (08:25 +0100)]
Merge pull request #1618 from donaldsharp/zebra_startup_ordering

zebra route-leaking for static routes

6 years agoMerge pull request #1655 from LabNConsulting/working/master/consistent_count
Quentin Young [Mon, 22 Jan 2018 23:53:19 +0000 (18:53 -0500)]
Merge pull request #1655 from LabNConsulting/working/master/consistent_count

bgpd: update last_update whenever obuf sent

6 years agobgpd: update last_update whenever obuf sent
Lou Berger [Sun, 7 Jan 2018 14:41:53 +0000 (09:41 -0500)]
bgpd: update last_update whenever obuf sent
      (to be consistent with last_write updates)

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1663 from donaldsharp/mpls
Renato Westphal [Mon, 22 Jan 2018 19:43:10 +0000 (17:43 -0200)]
Merge pull request #1663 from donaldsharp/mpls

Mpls

6 years agoMerge pull request #1656 from ak503/bgp
Renato Westphal [Mon, 22 Jan 2018 19:03:58 +0000 (17:03 -0200)]
Merge pull request #1656 from ak503/bgp

bgp: small fix for write to 'address-family l2vpn evpn' configuration

6 years agozebra: implement recursive MPLS labels
Renato Westphal [Wed, 20 Sep 2017 03:05:25 +0000 (00:05 -0300)]
zebra: implement recursive MPLS labels

When a nexthop is resolved via a label based nexthop, copy
the labels into the newly created recursive nexthop.

Please note that this does not fix the case where we
have a label based nexthop that is recursively resolved
through *another* nexthop that is also label based.
In this case we need to create a new label stack
for those routes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: use zclient_create_header
Donald Sharp [Mon, 22 Jan 2018 13:16:27 +0000 (08:16 -0500)]
zebra: use zclient_create_header

The function zserv_create_header was exactly the same
as zclient_create_header.  Let's just have one in the
system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib, zebra: Rename and place appropriately the label stack
Donald Sharp [Sun, 21 Jan 2018 21:11:50 +0000 (16:11 -0500)]
lib, zebra: Rename and place appropriately the label stack

Fix and rename the label stack to be better named.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1651 from donaldsharp/redhat_build_fpm
Russ White [Mon, 22 Jan 2018 14:16:21 +0000 (09:16 -0500)]
Merge pull request #1651 from donaldsharp/redhat_build_fpm

redhat: Build with FPM

6 years agoMerge pull request #1658 from Orange-OpenSource/TE
Russ White [Mon, 22 Jan 2018 14:01:39 +0000 (09:01 -0500)]
Merge pull request #1658 from Orange-OpenSource/TE

Doc: Update OSPF-TE and ISIS-TE example

6 years agoMerge pull request #1587 from pguibert6WIND/issue_385_step23
Russ White [Mon, 22 Jan 2018 14:01:01 +0000 (09:01 -0500)]
Merge pull request #1587 from pguibert6WIND/issue_385_step23

Netns Support / passing vrf_id_t to 32 bit work

6 years agozebra: replace 0 value on zebra with NS_DEFAULT
Philippe Guibert [Mon, 22 Jan 2018 08:55:26 +0000 (09:55 +0100)]
zebra: replace 0 value on zebra with NS_DEFAULT

On some places, macro NS_DEFAULT was not used. This commit is replacind
on some identified places where 0 can be replaced with NS_DEFAULT macro.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: replace 0 value on zebra with VRF_DEFAULT
Philippe Guibert [Mon, 22 Jan 2018 08:38:45 +0000 (09:38 +0100)]
zebra: replace 0 value on zebra with VRF_DEFAULT

On some places of code, the VRF_DEFAULT define was not used. This commit
is ensuring that the macros is well used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: bgp_redist_lookup param handles instances, not vrfs
Philippe Guibert [Thu, 11 Jan 2018 08:11:36 +0000 (09:11 +0100)]
bgpd: bgp_redist_lookup param handles instances, not vrfs

The VRF_DEFAULT parameter is incorrectly used. The 0 value for the bgp
instance is passed instead.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
fixup bgpd: fix compilation issue with bgpd

6 years agopim: fix compilation issue with pim
Philippe Guibert [Mon, 18 Dec 2017 11:42:12 +0000 (12:42 +0100)]
pim: fix compilation issue with pim

The change of vrf_id_t from 16 bit to 32 bit needs some changes in pim
daemon.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: fix compilation issue with bgpd
Philippe Guibert [Mon, 18 Dec 2017 11:33:29 +0000 (12:33 +0100)]
bgpd: fix compilation issue with bgpd

Changes due to the change of vrf_id_t moved from 16 bits to 32 bits.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoospfd: fix compilation issue with ospfd
Philippe Guibert [Mon, 18 Dec 2017 11:07:22 +0000 (12:07 +0100)]
ospfd: fix compilation issue with ospfd

the change of vrf_id field from 16 bit to 32 bit leads to some changes
in other daemon.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: ns_id_t changed to 32 bit
Philippe Guibert [Wed, 10 Jan 2018 13:13:50 +0000 (14:13 +0100)]
lib: ns_id_t changed to 32 bit

Because the VRF_ID is mapped into 32 bit, and because when NETNS will be
the backend of VRF, then the NS identifier must also be encoded as 32
bit.
Also, the NS_UNKNOWN value is changed accordingly to UINT32_MAX.
Also, the NS_UNKNOWN and NS_DEFAULT values are removed from zebra_ns.h
and kept on ns.h header file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: vrf_bitmap_groups increased from 8 to 1024
Philippe Guibert [Thu, 4 Jan 2018 13:30:28 +0000 (14:30 +0100)]
lib: vrf_bitmap_groups increased from 8 to 1024

The number of vrf bitmap groups is increased so as to avoid consuming
too much memory. This fix is related to a fork memory that occured when
running pimd as daemon.
A check on memory consumed shows that the memory consumed goes from
33480ko to 46888ko with that change. This is less compared to if the
value of the bitmap groups is increased to 16 ( 852776ko).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: increase vrf_id from 16 bit to 32 bit identifier
Philippe Guibert [Thu, 14 Dec 2017 15:01:36 +0000 (16:01 +0100)]
lib: increase vrf_id from 16 bit to 32 bit  identifier

This is a preparatory work for configuring vrf/frr over netns
vrf structure is being changed to 32 bit, and the VRF will have the
possibility to have a backend made up of NETNS.

Let's put some history.
Initially the 32 bit was because one wanted to map on vrf_id both the
VRFLITE and the NSID.
Initially, one would have liked to make zebra configure at the same time
both vrf lite and vrf from netns in a flat way. From the show
running perspective, one would have had both kind of vrfs, thatone
would configure on the same way.
however, it leads to inconsistencies in concepts, because it mixes vrf
vrf with vrf, and vrf is not always mapped with netns.
For instance, logical-router could also be used with netns. In that
case, it would not be possible to map vrf with netns.
There was an other reason why 32 bit is proposed. this is because
some systems handle NSID to 32 bits. As vrf lite exists only on
Linux, there are other systems that would like to use an other vrf
backend than vrf lite. The netns backend for vrf will be used for that
too. for instance, for windows or freebsd, some similar
netns concept exists; so it will be easier to reuse netns
backend for vrf, than reusing vrflite backend for vrf.

This commit is here to extend vrf_id to 32 bits. Following commits in a
second step will help in enable a VRF backend.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #1661 from donaldsharp/connected
Renato Westphal [Mon, 22 Jan 2018 11:47:04 +0000 (09:47 -0200)]
Merge pull request #1661 from donaldsharp/connected

zebra: Install connected routes during VRF change only if interface i…

6 years agozebra: Install connected routes during VRF change only if interface is up
vivek [Sat, 20 Jan 2018 21:21:05 +0000 (13:21 -0800)]
zebra: Install connected routes during VRF change only if interface is up

During VRF change handling, the connected route for the interface should be
installed only if the interface is up. Otherwise, we end up with duplicate
connected routes which can lead to other problems.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-19364
Reviewed By: CCR-7099
Testing Done: Manual verification

6 years agoMerge pull request #1647 from chiragshah6/ospf_vrf_dev
Olivier Dugeon [Fri, 19 Jan 2018 16:40:14 +0000 (17:40 +0100)]
Merge pull request #1647 from chiragshah6/ospf_vrf_dev

ospfd: show ip ospf interface json output format

6 years agoDoc: Update OSPF-TE and ISIS-TE example
Olivier Dugeon [Fri, 19 Jan 2018 15:27:26 +0000 (16:27 +0100)]
Doc: Update OSPF-TE and ISIS-TE example

 - In ospfd and isisd documentation, Traffic Engineering examples
are referring to old interface syntax. Update both examples to
'link-param' syntax.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoMerge pull request #1630 from LabNConsulting/working/master/pr1629-no-json
Donald Sharp [Fri, 19 Jan 2018 12:59:34 +0000 (07:59 -0500)]
Merge pull request #1630 from LabNConsulting/working/master/pr1629-no-json

bgpd: fix reporting of no vpn routes (no json)

6 years agobgp: small fix for write to 'address-family l2vpn evpn' configuration
dturlupov [Fri, 19 Jan 2018 07:53:32 +0000 (10:53 +0300)]
bgp: small fix for write to 'address-family l2vpn evpn' configuration

6 years agoMerge pull request #1566 from chiragshah6/ospfv3_dev
Jafar Al-Gharaibeh [Thu, 18 Jan 2018 16:54:52 +0000 (10:54 -0600)]
Merge pull request #1566 from chiragshah6/ospfv3_dev

ospf6d: Fix External routes ECMP

6 years agoMerge pull request #1645 from qlyoung/fix-cancel-invalid-rw
Jafar Al-Gharaibeh [Thu, 18 Jan 2018 15:37:24 +0000 (09:37 -0600)]
Merge pull request #1645 from qlyoung/fix-cancel-invalid-rw

lib: avoid crash when cancelling invalid rw job

6 years agoMerge pull request #1648 from dwalton76/frr-reload
Jafar Al-Gharaibeh [Thu, 18 Jan 2018 15:32:41 +0000 (09:32 -0600)]
Merge pull request #1648 from dwalton76/frr-reload

tools: frr-reload 'vni' keyword does not always create a sub-context

6 years agoMerge pull request #1646 from qlyoung/update-readme
Jafar Al-Gharaibeh [Thu, 18 Jan 2018 15:27:48 +0000 (09:27 -0600)]
Merge pull request #1646 from qlyoung/update-readme

frr: update README

6 years agozebra: Add some more debug information on read issues in FPM
Donald Sharp [Thu, 18 Jan 2018 14:17:57 +0000 (09:17 -0500)]
zebra: Add some more debug information on read issues in FPM

When we receive a read failure in handling a FPM read
let's add a bit more information to what we think has
gone wrong, in a hope that debugging will be a bit easier.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoredhat: Build with FPM
Donald Sharp [Thu, 18 Jan 2018 14:05:36 +0000 (09:05 -0500)]
redhat: Build with FPM

Build redhat rpm's with FPM.  It's a module so not
a bad idea.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1650 from donaldsharp/hash_it_fucker
Renato Westphal [Wed, 17 Jan 2018 22:59:56 +0000 (20:59 -0200)]
Merge pull request #1650 from donaldsharp/hash_it_fucker

bgpd: Remove peer->hash as that it is unused

6 years agoMerge pull request #1649 from donaldsharp/ospfd_lsdb_loop
Renato Westphal [Wed, 17 Jan 2018 22:58:18 +0000 (20:58 -0200)]
Merge pull request #1649 from donaldsharp/ospfd_lsdb_loop

ospfd: LSDB_LOOP treat it as a loop.

6 years agobgpd: Remove peer->hash as that it is unused
Donald Sharp [Wed, 17 Jan 2018 19:17:15 +0000 (14:17 -0500)]
bgpd: Remove peer->hash as that it is unused

The peer->hash pointer is allocating a bunch of memory
but is never used.  Remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: LSDB_LOOP treat it as a loop.
Donald Sharp [Wed, 17 Jan 2018 18:28:17 +0000 (13:28 -0500)]
ospfd: LSDB_LOOP treat it as a loop.

Inform the .clang-format file about LSDB_LOOP and
put the proper indentation for this loop into the
code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agotools: frr-reload 'vni' keyword does not always create a sub-context
Daniel Walton [Wed, 17 Jan 2018 15:57:50 +0000 (15:57 +0000)]
tools: frr-reload 'vni' keyword does not always create a sub-context

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agofrr: update README
Quentin Young [Tue, 16 Jan 2018 20:44:14 +0000 (15:44 -0500)]
frr: update README

* Clarify that FRR implements as well as manages protocols
* Move IS-IS out of "early support"
* Add Babel - friends don't leave friends out of READMEs!
* Add mention of further information

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospfd: show ip ospf interface json output format
Chirag Shah [Sat, 30 Dec 2017 05:01:07 +0000 (21:01 -0800)]
ospfd: show ip ospf interface json output format

Current json output does not differentiate start of
interface objects. Adding "interfaces" keyword at the
beginning of the interface list. This is useful
when displaying vrf level output along with interface list.

Ticket:CM-19115
Testing Done:
show ip ospf vrf all interface json
show ip ospf vrf all interface <specific intf> json
show ip ospf interface json
show ip ospf interface <specific intf> json

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1634 from qlyoung/vtysh-output-file
Russ White [Tue, 16 Jan 2018 20:31:50 +0000 (15:31 -0500)]
Merge pull request #1634 from qlyoung/vtysh-output-file

vtysh: add ability to output to file

6 years agoMerge pull request #1627 from qlyoung/bgp-autoshutdown
Russ White [Tue, 16 Jan 2018 20:29:17 +0000 (15:29 -0500)]
Merge pull request #1627 from qlyoung/bgp-autoshutdown

BGP auto-shutdown

6 years agolib: avoid crash when cancelling invalid rw job
Quentin Young [Fri, 1 Dec 2017 19:44:32 +0000 (14:44 -0500)]
lib: avoid crash when cancelling invalid rw job

There are some observed instances where we end up trying to cancel a rw
job based on a file descriptor that we don't have a reference on. The
specific cancel function for rw jobs assumes it's called with a file
descriptor that is valid within pollfds and will cause a segmentation
fault by buffer overrun if this is not the case.

Instead log it and move on. Since the fd does not exist this should
patch over the buggy behavior and provide additional information to help
in finding the root cause.

Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1625 from qlyoung/fix-peer-group-admin-shutdown-override
Renato Westphal [Tue, 16 Jan 2018 19:40:35 +0000 (17:40 -0200)]
Merge pull request #1625 from qlyoung/fix-peer-group-admin-shutdown-override

bgpd: preserve admin shutdown on peer-group add

6 years agoMerge pull request #1611 from qlyoung/fix-vtysh-perf
Renato Westphal [Tue, 16 Jan 2018 19:31:10 +0000 (17:31 -0200)]
Merge pull request #1611 from qlyoung/fix-vtysh-perf

vtysh: optimize printout routine

6 years agoMerge pull request #1632 from dwalton76/bgpd-localas-allowasin
Russ White [Tue, 16 Jan 2018 18:48:46 +0000 (13:48 -0500)]
Merge pull request #1632 from dwalton76/bgpd-localas-allowasin

BGP "allowas-in" should accept AS paths with "local-as"

6 years agoMerge pull request #1614 from qlyoung/imp-bgpd-pthread-startup-sync
Lou Berger [Tue, 16 Jan 2018 18:43:27 +0000 (13:43 -0500)]
Merge pull request #1614 from qlyoung/imp-bgpd-pthread-startup-sync

improve bgpd thread startup characteristics

6 years agoMerge pull request #1642 from chiragshah6/mdev1
Olivier Dugeon [Tue, 16 Jan 2018 17:02:45 +0000 (18:02 +0100)]
Merge pull request #1642 from chiragshah6/mdev1

ospfd: Speed up show ip ospf [vrf all] route json

6 years agoMerge pull request #1638 from LabNConsulting/working/master/vnc2zebra
Renato Westphal [Tue, 16 Jan 2018 12:19:57 +0000 (10:19 -0200)]
Merge pull request #1638 from LabNConsulting/working/master/vnc2zebra

bgpd: fix handling of nhp_ary when exporting vrf routes to zebra

6 years agoMerge pull request #1635 from qlyoung/bgpd-remove-options-directly-connected
Renato Westphal [Tue, 16 Jan 2018 12:11:39 +0000 (10:11 -0200)]
Merge pull request #1635 from qlyoung/bgpd-remove-options-directly-connected

bgpd: disallow invalid config at cli layer

6 years agoMerge pull request #1612 from chiragshah6/mdev
Renato Westphal [Tue, 16 Jan 2018 12:08:10 +0000 (10:08 -0200)]
Merge pull request #1612 from chiragshah6/mdev

ospf6d: Add protocol stats and show command

6 years agoospfd: Speed up show ip ospf [vrf all] route json
Chirag Shah [Tue, 16 Jan 2018 01:49:23 +0000 (17:49 -0800)]
ospfd: Speed up show ip ospf [vrf all] route json

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoospf6d: Add protocol stats and show command
Chirag Shah [Tue, 9 Jan 2018 00:53:53 +0000 (16:53 -0800)]
ospf6d: Add protocol stats and show command

Add OSPFv3 Protocol incoming/outgoing packets
stats.

r3# show ipv6 ospf6 interface traffic

Interface       HELLO            DB-Desc         LS-Req    LS-Update     LS-Ack
                Rx/Tx            Rx/Tx            Rx/Tx    Rx/Tx         Rx/Tx
--------------------------------------------------------------------------------------------
swp1              3/4              2/2             0/2     8/6           3/2
swp2              3/4              2/2             0/1     7/3           2/0
swp3              0/4              0/0             0/0     0/0           0/0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1623 from donaldsharp/zebra_interface_one_shot
Renato Westphal [Mon, 15 Jan 2018 12:35:39 +0000 (10:35 -0200)]
Merge pull request #1623 from donaldsharp/zebra_interface_one_shot

zebra: Add one-shot thread to recheck speed

6 years agobgpd: fix handling of nhp_ary when exporting vrf routes to zebra
Lou Berger [Sun, 14 Jan 2018 20:42:06 +0000 (15:42 -0500)]
bgpd: fix handling of nhp_ary when exporting vrf routes to zebra

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: add neighbor autoshutdown
Quentin Young [Thu, 11 Jan 2018 17:50:08 +0000 (12:50 -0500)]
bgpd: add neighbor autoshutdown

Adds ability to specify that peers should be administratively shutdown
when first configured.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: disallow invalid config at cli layer
Quentin Young [Fri, 12 Jan 2018 19:57:57 +0000 (14:57 -0500)]
bgpd: disallow invalid config at cli layer

Remove the ability to attempt to configure a couple of options on
directly connected neighbors that don't make sense for them, as well as
the soft error handling code.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agovtysh: add ability to output to file
Quentin Young [Fri, 12 Jan 2018 17:35:19 +0000 (12:35 -0500)]
vtysh: add ability to output to file

Add ability to set file destination for all vtysh output, with the
exception of tab-complete and similar meta output. This is useful for
inline recording of some information without exiting the shell.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoBGP "allowas-in" should accept AS paths with "local-as"
Daniel Walton [Fri, 12 Jan 2018 15:31:16 +0000 (15:31 +0000)]
BGP "allowas-in" should accept AS paths with "local-as"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
For issue #1548

6 years agozebra: Add ability for default vrf to route-leak
Donald Sharp [Thu, 11 Jan 2018 17:20:50 +0000 (12:20 -0500)]
zebra: Add ability for default vrf to route-leak

Allow the end user to specify static routes that leak
across vrf's in the default vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Allow static non interface based routes to leak
Donald Sharp [Thu, 11 Jan 2018 16:51:46 +0000 (11:51 -0500)]
zebra: Allow static non interface based routes to leak

Allow this to work:

vrf DONNA
  ip route 4.3.2.1/32 192.168.1.5 nexthop-vrf EVA

The static route code was not properly telling the
nexthop resolution code what vrf to use.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Encode the ifindex over netlink
Donald Sharp [Thu, 11 Jan 2018 16:47:04 +0000 (11:47 -0500)]
zebra: Encode the ifindex over netlink

In order for routes to be leaked the ifindex must be sent
down into the kernel over the netlink protocol.  So
send it( we always figure it out ) when we add the
route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move `ip route ...` generation to vrf control
Donald Sharp [Wed, 10 Jan 2018 14:48:54 +0000 (09:48 -0500)]
zebra: Move `ip route ...` generation to vrf control

Move the code that generates the 'show run' output for
'ip route' to be controlled by the vrf config generation
code.  Since it really belongs there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add vrf level 'ip route ...' commands
Donald Sharp [Wed, 10 Jan 2018 15:21:16 +0000 (10:21 -0500)]
zebra: Add vrf level 'ip route ...' commands

Add the ability to accept 'ip route ...' commands
from within a vrf context.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Cleanup vrf_config_write
Donald Sharp [Wed, 10 Jan 2018 14:32:16 +0000 (09:32 -0500)]
zebra: Cleanup vrf_config_write

Optimize vrf_config_write a tiny bit to be a bit more efficient.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add the zvrf pointer to the 'struct static_route'
Donald Sharp [Tue, 9 Jan 2018 00:11:17 +0000 (19:11 -0500)]
zebra: Add the zvrf pointer to the 'struct static_route'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add zebra_static_route_leak function
Donald Sharp [Tue, 9 Jan 2018 21:25:45 +0000 (16:25 -0500)]
zebra: Add zebra_static_route_leak function

Add a function to handle the route leaking of a static
route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move NS/VRF initialization earlier
Donald Sharp [Tue, 9 Jan 2018 19:47:11 +0000 (14:47 -0500)]
zebra: Move NS/VRF initialization earlier

Move the NS/VRF initialization code for zebra to an earlier
point in startup.  In the future we will have code that
will want to install_element into a VRF_NODE from zebra_vty.c

Signed-off-by: Donald Sharp <sahrpd@cumulusnetworks.com>
6 years agolib: Increment zapi version number
Donald Sharp [Mon, 8 Jan 2018 21:09:07 +0000 (16:09 -0500)]
lib: Increment zapi version number

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years ago*: Send/receive the nexthop vrf_id
Donald Sharp [Mon, 8 Jan 2018 16:17:02 +0000 (11:17 -0500)]
*: Send/receive the nexthop vrf_id

Modify the code to send and receive to/from zebra
the nexthops vrf_id.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: When displaying nexthop information show correct vrf
Donald Sharp [Mon, 8 Jan 2018 15:43:07 +0000 (10:43 -0500)]
zebra: When displaying nexthop information show correct vrf

If the vrf for the nexthop is different than the vrf the
route is in, display the nexthops vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: When handling nexthops use the correct vrf
Donald Sharp [Mon, 8 Jan 2018 15:34:48 +0000 (10:34 -0500)]
zebra: When handling nexthops use the correct vrf

When we are handling nexthops in zebra, use the appropriate
vrf to figure out if the nexthops are active or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add nh_vrf_id to rib_add
Donald Sharp [Mon, 8 Jan 2018 15:21:09 +0000 (10:21 -0500)]
zebra: Add nh_vrf_id to rib_add

Add to the rib_add function the ability to pass in the nexthops
vrf.

Additionally when we decode the netlink message from the linux
kernel, properly figure out the nexthops vrf_id.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Use the correct vrf id to lookup the ifp pointer
Donald Sharp [Mon, 8 Jan 2018 14:56:08 +0000 (09:56 -0500)]
zebra: Use the correct vrf id to lookup the ifp pointer

Use the nexthop vrf_id to properly lookup the ifp pointer
for display purposes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add nh_vrf_id to 'struct route_entry`
Donald Sharp [Fri, 12 Jan 2018 14:20:30 +0000 (09:20 -0500)]
zebra: Add nh_vrf_id to 'struct route_entry`

With VRF route-leaking we need to know what vrf
the nexthops are in compared to this vrf.  This
code adds the nh_vrf_id to the route entry and
sets it up correctly for the non-route-leaking
case.

The assumption here is that future commits
will make the nh_vrf_id *different* than
the vrf_id.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Allow interface lookup by VRF_UNKNOWN
Donald Sharp [Fri, 5 Jan 2018 14:21:55 +0000 (09:21 -0500)]
lib: Allow interface lookup by VRF_UNKNOWN

Modify if_lookup_by_index to accept a VRF_UNKNOWN
as a vrf_id.  This will cause it to look in all
vrf's for the interface pointer.

Subsequently all if_XXXX functions that call this function
will also get this behavior.

VRF_UNKNOWN *should* not be used for interface creation
as that this will break some core assumptions.

This work is part of allowing vrf route leaking.  Currently
it is possible to create a route in the linux kernel that has
a nexthop across vrf boundaries.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Add notice of when we can remove some deprecated code.
Donald Sharp [Mon, 8 Jan 2018 13:57:44 +0000 (08:57 -0500)]
lib: Add notice of when we can remove some deprecated code.

The zapi_ipv4_route, zapi_ipv6_route and zapi_ipv4_route_ipv6_nexthop
functions are deprecated.  Add notice of when we can remove the
deprecated code from the system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1626 from LabNConsulting/working/master/vnc-config
Donald Sharp [Fri, 12 Jan 2018 13:54:36 +0000 (08:54 -0500)]
Merge pull request #1626 from LabNConsulting/working/master/vnc-config

bgp: don't show vnc response-lifetime config line when set to default…

6 years agobgpd: fix summary line reporting routes with RDs (no json case)
Lou Berger [Fri, 12 Jan 2018 02:33:34 +0000 (21:33 -0500)]
bgpd: fix summary line reporting routes with RDs (no json case)

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1455 from mkanjari/evpn-symmetric-routing
Philippe Guibert [Fri, 12 Jan 2018 07:27:37 +0000 (08:27 +0100)]
Merge pull request #1455 from mkanjari/evpn-symmetric-routing

Support for Evpn symmetric routing + EVPN Prefix route