]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #1664 from chiragshah6/ospfv3_dev
Russ White [Wed, 24 Jan 2018 00:20:43 +0000 (19:20 -0500)]
Merge pull request #1664 from chiragshah6/ospfv3_dev

ospf6d: SPF calculation w/ multiple Router LSAs originated from given Adv Router

6 years agoMerge pull request #1665 from donaldsharp/nexthop_labels
Russ White [Wed, 24 Jan 2018 00:09:08 +0000 (19:09 -0500)]
Merge pull request #1665 from donaldsharp/nexthop_labels

Cleanup some zclient code

6 years agoMerge pull request #1667 from Orange-OpenSource/master
Russ White [Wed, 24 Jan 2018 00:05:05 +0000 (19:05 -0500)]
Merge pull request #1667 from Orange-OpenSource/master

OSPFD: Solve Issue #1652

6 years agoOSPFD: Solve Issue #1652
Olivier Dugeon [Tue, 23 Jan 2018 15:15:58 +0000 (16:15 +0100)]
OSPFD: Solve Issue #1652

Issue 1652 was related to OSPF Crash on termination when ospf is
configured to flood self Opaque LSA e.g TE or RI Opaque LSA.

Analysis:
The problem resides in free_opaque_info_per_type() line 576 of
ospf_opaque.c. Once LSA flush, the function removes by calling
listnode_delete() function the opaque_info_per_type data structure.
However, this is also performed at the upper level function
ospf_opaque_type10lsa_term() which call list_delete_and_null() function.
This result into a double free pointer exception.

Solution:
Remove call to listnode_delete() calls in free_opaque_info_per_type()
function as it is done by list_delete_and_null(). Delete lines 592 - 615.
Remove also second call to ospf_opaque_type10lsa_term() in ospfd.c line 848.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.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 agoospf6d: spf calculation w/ multiple router lsas
Chirag Shah [Wed, 17 Jan 2018 18:55:46 +0000 (10:55 -0800)]
ospf6d: spf calculation w/ multiple router lsas

An OSPFv3 enabled Router can originate or receive
multiple Link State-IDs for Router LSAs.
As per RFC 5340 A 4.3, more than one Router LSAs,
from given Vertex is considered (as concatenated)
single large Router LSA.

Created hidden show command to simulate concatenated
large LSA from advertising/self Router LSAs.

Ticket:CM-19329
Reviewed By:
Testing Done:
Simulate 160 subinterfaces between R1 === R2--R3,
This triggers R1 and R2 to generate multiple link state
IDs for Router LSAs. During SPF calculation only aggregated
single router LSA processed and SPF tree formed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd, lib, pimd: Abstract commands for nexthop tracking
Donald Sharp [Mon, 22 Jan 2018 23:36:03 +0000 (18:36 -0500)]
bgpd, lib, pimd: Abstract commands for nexthop tracking

Abstract the code that sends the zapi message into zebra
for the turn on/off of nexthop tracking for a prefix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: No need to assert on the redist_default
Donald Sharp [Mon, 22 Jan 2018 23:22:09 +0000 (18:22 -0500)]
pimd: No need to assert on the redist_default

zclient_init sets the redist_default to the appropriate
value, testing it with an assert doesn't really provide
us with much of anything useful.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Unset bitmap when not using it
Donald Sharp [Mon, 22 Jan 2018 23:18:38 +0000 (18:18 -0500)]
lib: Unset bitmap when not using it

The zclient->redist bitmap for vrf's was being set again
for the zclient_send_dereg_requests function.  This should
be a unset on tear down.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Cleanup some zclient clutter.
Donald Sharp [Mon, 22 Jan 2018 23:16:59 +0000 (18:16 -0500)]
lib: Cleanup some zclient clutter.

The zclient code can be cleaned up a tiny bit and hopefully
improve it's indentation some.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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

6 years agoMerge pull request #1624 from qlyoung/fix-cmd-argc-max-usage
Renato Westphal [Fri, 12 Jan 2018 02:15:09 +0000 (00:15 -0200)]
Merge pull request #1624 from qlyoung/fix-cmd-argc-max-usage

lib, bgpd: fixup use of of CMD_ARGC_MAX

6 years agobgp: don't show vnc response-lifetime config line when set to default value
Lou Berger [Thu, 11 Jan 2018 22:09:26 +0000 (17:09 -0500)]
bgp: don't show vnc response-lifetime config line when set to default value

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: preserve admin shutdown on peer-group add
Quentin Young [Thu, 11 Jan 2018 22:07:07 +0000 (17:07 -0500)]
bgpd: preserve admin shutdown on peer-group add

When a peer configured with administrative shutdown is added to a peer
group, the administrative shutdown status is discarded and the peer will
enter the BGP FSM. This is not what we want. Preserve the flag instead.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge branch 'master' into evpn-symmetric-routing
Mitesh Kanjariya [Thu, 11 Jan 2018 17:57:47 +0000 (09:57 -0800)]
Merge branch 'master' into evpn-symmetric-routing

6 years agoMerge branch 'master' into evpn-symmetric-routing
Mitesh Kanjariya [Thu, 11 Jan 2018 17:00:23 +0000 (09:00 -0800)]
Merge branch 'master' into evpn-symmetric-routing

6 years agolib, bgpd: fixup use of of CMD_ARGC_MAX
Quentin Young [Thu, 11 Jan 2018 16:31:45 +0000 (11:31 -0500)]
lib, bgpd: fixup use of of CMD_ARGC_MAX

The constant to limit # of allowed cli tokens on any one line was
defined in multiple places, all inconsistent with each other. Fix.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agozebra: Add one-shot thread to recheck speed
Donald Sharp [Thu, 11 Jan 2018 00:01:57 +0000 (19:01 -0500)]
zebra: Add one-shot thread to recheck speed

There are certain interfaces that when brought up and we receive
the netlink notification about it, the speed of the interface is
not set correctly.  This creates a one-shot thread that will
wait 15 seconds and then requery the speed and if it is different
it will renotify the running daemons.

The kernel should notify us on speed changes, unfortunately this
is not done currently via a netlink message as you would think.
As I understand it there is some in-fighting about the proper
way to approach this issue and due to the way the kernel release
cycle works we are a ways off from getting this fixed.  This
is a `hack` to make us work correctly while we wait for the
true answer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1609 from dwalton76/ospf-reconfigure-area
Russ White [Thu, 11 Jan 2018 01:12:19 +0000 (20:12 -0500)]
Merge pull request #1609 from dwalton76/ospf-reconfigure-area

ospfd: do not complain if same area is reconfigured

6 years agoMerge pull request #1616 from qlyoung/sharpd-gitignore
Russ White [Thu, 11 Jan 2018 01:10:09 +0000 (20:10 -0500)]
Merge pull request #1616 from qlyoung/sharpd-gitignore

sharpd: add .gitignore

6 years agoMerge pull request #1619 from donaldsharp/bgp_debugging
Russ White [Thu, 11 Jan 2018 01:00:51 +0000 (20:00 -0500)]
Merge pull request #1619 from donaldsharp/bgp_debugging

bgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi

6 years agoMerge pull request #1620 from dslicenc/bgpd-vrf-redist
Russ White [Thu, 11 Jan 2018 01:00:14 +0000 (20:00 -0500)]
Merge pull request #1620 from dslicenc/bgpd-vrf-redist

bgpd: fix updating redist bitmask when vrf_id changes

6 years agoMerge pull request #1591 from qlyoung/bgpd-ringbuf
Russ White [Thu, 11 Jan 2018 00:59:24 +0000 (19:59 -0500)]
Merge pull request #1591 from qlyoung/bgpd-ringbuf

bgpd: use ring buffer for network input