]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agobgpd: Display the imported route information for EVPN routes
Dinesh Dutt [Mon, 12 Aug 2019 13:20:18 +0000 (13:20 +0000)]
bgpd: Display the imported route information for EVPN routes

For IPv4/v6 unicast routes that have been imported from EVPN Prefix
routes, display the information about where the route has been imported
from allowing for easy tracing of how a FIB/RIB entry got populated.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
4 years agoospfd: add redist message detail to debug
Mark Stapp [Wed, 24 Jul 2019 19:57:34 +0000 (15:57 -0400)]
ospfd: add redist message detail to debug

Add the specific message being processed when ospfd receives
a redistribution from zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4836 from mruprich/python-3.8
Quentin Young [Wed, 14 Aug 2019 17:06:24 +0000 (13:06 -0400)]
Merge pull request #4836 from mruprich/python-3.8

build: add check for python-3.8

4 years agozebra : zebra redistributing IPV4 link local Addresses inconsistently.
vdhingra [Wed, 14 Aug 2019 07:18:43 +0000 (00:18 -0700)]
zebra : zebra redistributing IPV4 link local Addresses inconsistently.

Create an interface with IP4 link local address 169.254.0.131/25.
In BGP enable the redistribute connected. Now Zebra will not send
the route corresponding to IPV4 link local address. Now made this
interface down and up. Zebra sends the route to BGP.
Zebra should not send this route to BGP.
This Fix would make the behaviour consistent and would not send the
routes corresponding to IPV4 Link local addresses.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agobuild: add check for python-3.8
Michal Ruprich [Wed, 14 Aug 2019 13:06:52 +0000 (15:06 +0200)]
build: add check for python-3.8

In python-3.8, the --embed needs to be added to pythonX.Y-config

Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
4 years agozebra: Ensure master's ifname is known, even if slave comes up first
Dinesh G Dutt [Tue, 13 Aug 2019 16:29:40 +0000 (16:29 +0000)]
zebra: Ensure master's ifname is known, even if slave comes up first

In if_netlink.c, when an interface structure, ifp, is first created,
its possible for the master to come up after the slave interface does.
This means, the slave interface has no way to display the master's ifname
in show outputs. To fix this, we need to allow creation by ifindex instead
of by ifname so that this issue is handled.

Signed-off-by: Dinesh G Dutt<5016467+ddutt@users.noreply.github.com>
4 years ago zebra: Display master interface names, not ifindices
Dinesh G Dutt [Tue, 13 Aug 2019 16:28:16 +0000 (16:28 +0000)]
zebra: Display master interface names, not ifindices

    When displaying the master interface's information in "show interface",
    the display is currently the ifindex of the master interface. Make it
    display the name as well as that is more useful than the name.

Signed-off-by: Dinesh G Dutt<5016467+ddutt@users.noreply.github.com>
4 years agoMerge pull request #4706 from qlyoung/fix-exit-vrf-markfile
Sri Mohana Singamsetty [Tue, 13 Aug 2019 15:40:21 +0000 (08:40 -0700)]
Merge pull request #4706 from qlyoung/fix-exit-vrf-markfile

vtysh: mark exit-vrf with end when using vtysh -m

4 years agoMerge pull request #4828 from vishaldhingra/blackhole_type
Donald Sharp [Tue, 13 Aug 2019 11:10:02 +0000 (07:10 -0400)]
Merge pull request #4828 from vishaldhingra/blackhole_type

zebra : blackhole_type was not set correctly in recursive routes

4 years agozebra : blackhole_type was not set correctly in recursive routes
vdhingra [Tue, 13 Aug 2019 05:56:38 +0000 (22:56 -0700)]
zebra : blackhole_type was not set correctly in recursive routes

If there is a recursive route resolved over blackhole route, then
the resolved blackhole_type is not getting set correctly.
This fix updates the bh_type correctly for resursive routes.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agoMerge pull request #4801 from donaldsharp/nht_vrf_show_evil
Sri Mohana Singamsetty [Tue, 13 Aug 2019 03:49:51 +0000 (20:49 -0700)]
Merge pull request #4801 from donaldsharp/nht_vrf_show_evil

zebra: Allow v4 or v6 addresses to be optional after `vrf X` in show …

4 years agoMerge pull request #4802 from donaldsharp/static_blackhole
Sri Mohana Singamsetty [Tue, 13 Aug 2019 03:49:17 +0000 (20:49 -0700)]
Merge pull request #4802 from donaldsharp/static_blackhole

staticd: Fix blackhole routes being installed

4 years agoMerge pull request #4823 from mjstapp/fix_dplane_thread_name
Quentin Young [Mon, 12 Aug 2019 18:26:58 +0000 (14:26 -0400)]
Merge pull request #4823 from mjstapp/fix_dplane_thread_name

zebra: make the dplane pthread name consistent

4 years agoMerge pull request #4677 from mruprich/master
David Lamparter [Mon, 12 Aug 2019 15:09:14 +0000 (17:09 +0200)]
Merge pull request #4677 from mruprich/master

ospfd,ripd: Enabling openssl library for md5 authentication in RIP and OSPF

4 years agozebra: make the dplane pthread name consistent
Mark Stapp [Mon, 12 Aug 2019 13:50:43 +0000 (09:50 -0400)]
zebra: make the dplane pthread name consistent

Make the dplane pthread's name consistent (lower-case)
with other pthreads.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #1 from FRRouting/master
Dinesh Dutt [Mon, 12 Aug 2019 13:19:54 +0000 (06:19 -0700)]
Merge pull request #1 from FRRouting/master

Merging from upstream tree

4 years agoMerge pull request #4793 from qlyoung/fix-bgp-labeled-unicast-addpath
Mark Stapp [Mon, 12 Aug 2019 12:51:36 +0000 (08:51 -0400)]
Merge pull request #4793 from qlyoung/fix-bgp-labeled-unicast-addpath

bgpd: tx addpath info for labeled unicast

4 years agoMerge pull request #4817 from NaveenThanikachalam/652
Donald Sharp [Mon, 12 Aug 2019 12:45:51 +0000 (08:45 -0400)]
Merge pull request #4817 from NaveenThanikachalam/652

bgpd: Optimizing route-map's processing of dependencies.

4 years agobgpd: Optimizing route-map's processing of dependencies.
Naveen Thanikachalam [Sun, 11 Aug 2019 11:24:15 +0000 (04:24 -0700)]
bgpd: Optimizing route-map's processing of dependencies.

Say for eg., 256 prefix-list entries are pasted to VTYSH.
This results in BGP processing the events for several minutes.

BGPD starts a timer for 5 seconds when the first dependency configuraion
is received. On timer expiry, BGP process dependent route-maps.
After this processing, BGPD reads the configurations received in the
next 5 seconds and then re-processes the route-maps from the beginning.
This cyclic re-processing consumes time and CPU cycles.

Instead of starting a timer when the first configuration is received,
everytime a configuration is received, the existing timer is reset.
This would mean that all the configurations are read first before the timer
expires. This eliminates the cyclic re-processing.

Signed-off-by: NaveenThanikachalam nthanikachal@vmware.com
4 years agobgpd: Large-communities CLI accepts configurations sans attributes.
Naveen Thanikachalam [Sun, 11 Aug 2019 10:30:22 +0000 (03:30 -0700)]
bgpd: Large-communities CLI accepts configurations sans attributes.

BGP large-communities configuration CLI is successful even if
the command is configured without any attributes.
For ex., the below commands are successful.
         1) "bgp large-community-list standard TEST permit"
         2) "bgp large-community-list standard TEST deny"

The CLI definitions that allow these erroneous configurations need to be removed.

Signed-off-by: NaveenThanikachalam nthanikachal@vmware.com
4 years agoMerge pull request #4813 from NaveenThanikachalam/604
Donald Sharp [Sun, 11 Aug 2019 20:46:33 +0000 (16:46 -0400)]
Merge pull request #4813 from NaveenThanikachalam/604

bgpd: Standard large-communities CLI does not return error when it's configured with reg-ex.

4 years agoMerge pull request #4816 from NaveenThanikachalam/610
Donald Sharp [Sun, 11 Aug 2019 15:58:36 +0000 (11:58 -0400)]
Merge pull request #4816 from NaveenThanikachalam/610

bgpd: Assertion failed during shutdown.

4 years agobgpd: Assertion failed during shutdown.
Naveen Thanikachalam [Sun, 11 Aug 2019 10:56:12 +0000 (03:56 -0700)]
bgpd: Assertion failed during shutdown.

A race condition causes the failure.
The function "make_info()" sets the path info's peer to
bgp instance's "peer_self" which is created when BGP is first
configured and deleted only when BGP is brought down completely.
A race condition causes the bgp instances's "peer_self" to be
removed before the routes are being pulled off from the aggregate
address.

If the bgp instance's "peer_self" is NULL or, if BGP is being deleted,
the aggregate route must not be reinstalled.

Signed-off-by: NaveenThanikachalam nthanikachal@vmware.com
4 years agobgpd: Standard large-communities CLI does not return error when it's configured with...
Naveen Thanikachalam [Sun, 11 Aug 2019 07:29:32 +0000 (00:29 -0700)]
bgpd: Standard large-communities CLI does not return error when it's configured with reg-ex.

The CLI to configure the standard format large-communities attribute
accepts regular expressions as well.
For ex., the below configuration is accepted.
         "bgp large-community-list standard TEST permit 1:1 100:*"

The code to parse the large-communities does identify the configuration
as invalid however, error returned isn't processed.
The code has to be modified to handle the error.

Signed-off-by: NaveenThanikachalam nthanikachal@vmware.com
4 years agoMerge pull request #4803 from ddutt/master
Donald Sharp [Sat, 10 Aug 2019 19:41:18 +0000 (15:41 -0400)]
Merge pull request #4803 from ddutt/master

Support for display of received and advertised EVPN routes from neigh…

4 years agoMerge pull request #4811 from adharkar/frr-master-rtm_vni
Donald Sharp [Sat, 10 Aug 2019 00:39:34 +0000 (20:39 -0400)]
Merge pull request #4811 from adharkar/frr-master-rtm_vni

Zebra: Incorrect L3VNI for FPM rtmsg for EVPN RT-5 prefix

4 years agoZebra: Incorrect L3VNI for FPM rtmsg for EVPN RT-5 prefix
Ameya Dharkar [Fri, 9 Aug 2019 22:21:27 +0000 (15:21 -0700)]
Zebra: Incorrect L3VNI for FPM rtmsg for EVPN RT-5 prefix

We used the vrf_id in the rtm_table field of the netlink rtmsg to fetch L3VNI.
But, now we program table_id to rtm_table field instead of vrf_id.
Thus, L3VNI fetched using rtm_table is incorrect.

Instead, use nexthop->vrf_id to fetch the L3VNI.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
4 years agoMerge pull request #4806 from chiragshah6/evpn_dev1
Russ White [Fri, 9 Aug 2019 11:32:57 +0000 (07:32 -0400)]
Merge pull request #4806 from chiragshah6/evpn_dev1

zebra: fix advertise svi ip as macip route

4 years agozebra: fix advertise svi ip as macip route
Chirag Shah [Thu, 8 Aug 2019 17:43:49 +0000 (10:43 -0700)]
zebra: fix advertise svi ip as macip route

PR #3745 added EVPN feature to advertise individual
SVI-IPs as MAC-IP routes.
Fix a condition in zebra to send MAC and IP pair
to bgpd when the feature is enabled.

Testing Done:

Originator VTEP:
TORC11:~# ip -br addr show VxU-1002
VxU-1002         UP             45.0.2.2/24 2001:fee1:0:2::2/64

show bgp l2vpn evpn vni 1004
VNI: 1004 (known to the kernel)
  Type: L2
  Tenant-Vrf: default
  RD: 27.0.0.11:3
  Advertise-svi-macip : Yes
  Import Route Target:
    10:1004
  Export Route Target:
    10:1004

Remote vtep evpn route output for 45.0.4.2:

BGP routing table entry for 27.0.0.11:3:[2]:[0]:[48]:[00:02:00:00:00:2f]:[32]:[45.0.4.2]
Paths: (2 available, best #1)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Route [2]:[0]:[48]:[00:02:00:00:00:2f]:[32]:[45.0.4.2] VNI 1004
  64435 65546
    36.0.0.11 from MSP1(uplink-1) (27.0.0.9)
      Origin IGP, valid, external, bestpath-from-AS 64435, best (First path received)
      Extended Community: RT:10:1004 ET:8
      Last update: Thu Aug  8 18:09:13 2019

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoMerge pull request #4724 from satheeshkarra/pim_fixes
Sri Mohana Singamsetty [Thu, 8 Aug 2019 16:57:18 +0000 (09:57 -0700)]
Merge pull request #4724 from satheeshkarra/pim_fixes

pimd: NH Updates are missing at PIM during boot up

4 years agoospfd,ripd: Enabling build with openssl
Michal Ruprich [Thu, 11 Jul 2019 09:28:15 +0000 (11:28 +0200)]
ospfd,ripd: Enabling build with openssl

Enabling openssl library for md5 authentication in RIP and OSPF

Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
4 years agoMerge pull request #4497 from opensourcerouting/rcu
Donald Sharp [Thu, 8 Aug 2019 12:41:07 +0000 (08:41 -0400)]
Merge pull request #4497 from opensourcerouting/rcu

RCU support

4 years agobgpd: Display received and advertised EVPN routes from neighbors
Dinesh Dutt [Thu, 8 Aug 2019 02:58:18 +0000 (02:58 +0000)]
bgpd: Display received and advertised EVPN routes from neighbors

"show bgp l2vpn evpn neighbors <neighbor> [advertised-routes|routes]' did
not work due to various bugs. First, the command only accepted IPv4
addresses as valid neighbor ID, thereby rejecting unnumbered BGP and IPv6
neighbor address. Second, the SAFI was hardcoded to MPLS_VPN even though
we were passing the safi. Third, "all" made no sense in the command context
and to make the command uniform across all address families, I removed the
"all" keyword from the command.

Signed-off-by: Dinesh G Dutt <ddps4u@gmail.com>
4 years agostaticd: Fix blackhole routes being installed
Donald Sharp [Thu, 8 Aug 2019 01:45:02 +0000 (21:45 -0400)]
staticd: Fix blackhole routes being installed

When we are ready to install a route, we were treating
blackhole routes as something that should be nexthop tracked
which does not work as well as one would expect.

Additionally add some test code to show that this actually
fixes this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4763 from opensourcerouting/ds-work
Donald Sharp [Wed, 7 Aug 2019 20:45:02 +0000 (16:45 -0400)]
Merge pull request #4763 from opensourcerouting/ds-work

lib: get rid of pqueue_*, use DECLARE_HEAP in thread.c

4 years agozebra: Allow v4 or v6 addresses to be optional after `vrf X` in show ip nht
Donald Sharp [Wed, 7 Aug 2019 19:02:43 +0000 (15:02 -0400)]
zebra: Allow v4 or v6 addresses to be optional after `vrf X` in show ip nht

The `show ip nht vrf EVA ...` command was not allowing you to only
specify the vrf anymore.  Fix this:

robot# show ip nht vrf EVA
  <cr>
  A.B.C.D   IPv4 Address
  X:X::X:X  IPv6 Address
robot# show ip nht vrf EVA 4.5.6.7
robot# show ip nht vrf EVA
robot#

Ticket: CM-25831
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: When iterating over all eigrp instances, narrow to correct vrf
Donald Sharp [Sat, 15 Jun 2019 22:25:58 +0000 (18:25 -0400)]
eigrpd: When iterating over all eigrp instances, narrow to correct vrf

When iterating over all eigrp instances, narrow to the correct
vrf that we are working on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Update eigrp documentation
Donald Sharp [Sat, 15 Jun 2019 22:20:55 +0000 (18:20 -0400)]
doc: Update eigrp documentation

Update the eigrp documentation to reflect the new vrf sub-commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Convert cli to be able to use [vrf NAME]
Donald Sharp [Sat, 15 Jun 2019 19:52:55 +0000 (15:52 -0400)]
eigrpd: Convert cli to be able to use [vrf NAME]

Modify the cli to allow us to specify the [vrf NAME]
and also get rid of the usages of VRF_DEFAULT that we can.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Convert eigrp_packet.c to not use VRF_DEFAULT
Donald Sharp [Sat, 15 Jun 2019 19:24:20 +0000 (15:24 -0400)]
eigrpd: Convert eigrp_packet.c to not use VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Convert eigrp_network.c to not use VRF_DEFAULT
Donald Sharp [Sat, 15 Jun 2019 19:21:39 +0000 (15:21 -0400)]
eigrpd: Convert eigrp_network.c to not use VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Update eigrp_filter.c to use VRF_DEFAULT
Donald Sharp [Sat, 15 Jun 2019 19:20:11 +0000 (15:20 -0400)]
eigrpd: Update eigrp_filter.c to use VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Convert eigrp_hello.c to not use VRF_DEFAULT
Donald Sharp [Sat, 15 Jun 2019 19:12:19 +0000 (15:12 -0400)]
eigrpd: Convert eigrp_hello.c to not use VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Convert eigrp_neighor.c to not use VRF_DEFAULT
Donald Sharp [Sat, 15 Jun 2019 19:10:00 +0000 (15:10 -0400)]
eigrpd: Convert eigrp_neighor.c to not use VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Remove VRF_DEFAULT from eigrp_fsm.c
Donald Sharp [Sat, 15 Jun 2019 19:05:21 +0000 (15:05 -0400)]
eigrpd: Remove VRF_DEFAULT from eigrp_fsm.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Update eigrp_topology.c to not use VRF_DEFAULT
Donald Sharp [Sat, 15 Jun 2019 19:02:58 +0000 (15:02 -0400)]
eigrpd: Update eigrp_topology.c to not use VRF_DEFAULT

Push out the pass in of struct eigrp to all functions
in eigrp_topology.c so we do not lookup the eigrp pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Convert eigrp_zebra.c to use appropriate vrf_id
Donald Sharp [Sat, 15 Jun 2019 18:27:35 +0000 (14:27 -0400)]
eigrpd: Convert eigrp_zebra.c to use appropriate vrf_id

Use the appropriate vrf_id in eigrp_zebra based off of the
struct eigrp *eigrp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Add `router eigrp AS [vrf NAME]` and various stuff
Donald Sharp [Sat, 15 Jun 2019 17:48:18 +0000 (13:48 -0400)]
eigrpd: Add `router eigrp AS [vrf NAME]` and various stuff

Add the ability to parse `router eigrp AS [vrf NAME]` and
modify eigrp_lookup to actually handle a vrf_id for us.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Create a socket per vrf for communication
Donald Sharp [Sat, 15 Jun 2019 17:10:05 +0000 (13:10 -0400)]
eigrpd: Create a socket per vrf for communication

Setup EIGRP to use a socket per vrf for communication
amongst it's peers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Add various vrf handling functions
Donald Sharp [Sat, 15 Jun 2019 16:18:44 +0000 (12:18 -0400)]
eigrpd: Add various vrf handling functions

Basic enable/disable/add/delete vrf handling functions.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Use the eigrp->vrf_id where we can immediately transform
Donald Sharp [Fri, 12 Apr 2019 23:49:11 +0000 (19:49 -0400)]
eigrpd: Use the eigrp->vrf_id where we can immediately transform

For those places where we can immediately transform the usage
of VRF_DEFAULT to eigrp->vrf_id do so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Add vrf_id to `struct eigrp`
Donald Sharp [Fri, 12 Apr 2019 23:38:08 +0000 (19:38 -0400)]
eigrpd: Add vrf_id to `struct eigrp`

Initial setup of adding a vrf_id to the `struct eigrp`.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4781 from opensourcerouting/eigrpd-northbound
Donald Sharp [Tue, 6 Aug 2019 23:38:30 +0000 (19:38 -0400)]
Merge pull request #4781 from opensourcerouting/eigrpd-northbound

eigrpd: migrate to northbound

4 years agobgpd: tx addpath info for labeled unicast
Quentin Young [Tue, 6 Aug 2019 21:18:42 +0000 (21:18 +0000)]
bgpd: tx addpath info for labeled unicast

Labeled unicast needs path IDs too!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4792 from opensourcerouting/doc_libcap
Quentin Young [Tue, 6 Aug 2019 19:51:30 +0000 (15:51 -0400)]
Merge pull request #4792 from opensourcerouting/doc_libcap

doc: suggest the installation of the libcap development library

4 years agoMerge pull request #4791 from mjstapp/fix_doc_te_limits
Quentin Young [Tue, 6 Aug 2019 19:50:24 +0000 (15:50 -0400)]
Merge pull request #4791 from mjstapp/fix_doc_te_limits

docs: Add notes about limited MPLS-TE support

4 years agodocs: Add notes about limited MPLS-TE support
Mark Stapp [Tue, 6 Aug 2019 18:59:01 +0000 (14:59 -0400)]
docs: Add notes about limited MPLS-TE support

Add notes to several docs about the limits to FRR's current
MPLS-TE support, which is limited to some routing protocol
LSA/TLV support. It wasn't very clear that FRR does not offer
a complete TE/RSVP-TE solution at this time.

Also removed some stale info about configure script options.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: suggest the installation of the libcap development library
Renato Westphal [Tue, 6 Aug 2019 18:53:42 +0000 (15:53 -0300)]
doc: suggest the installation of the libcap development library

All FRR Linux packages are built using libcap-dev (or libcap-devel)
installed in the system. Update the build instructions to suggest
FRR developers to do the same. The main motivation for this is that
the seteuid() system call is too expensive and overall less secure
compared to using the Linux capabilities framework.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #4790 from opensourcerouting/ctype-cast
Quentin Young [Tue, 6 Aug 2019 17:21:13 +0000 (13:21 -0400)]
Merge pull request #4790 from opensourcerouting/ctype-cast

*: fix ctype casts

4 years agodebian: add .gitignore file
David Lamparter [Wed, 24 Jul 2019 21:42:46 +0000 (17:42 -0400)]
debian: add .gitignore file

Ignore the build results when dpkg-buildpackage was run in the source
directory.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years ago*: fix ctype (isalpha & co.) casts
David Lamparter [Tue, 6 Aug 2019 14:54:52 +0000 (16:54 +0200)]
*: fix ctype (isalpha & co.) casts

The correct cast for these is (unsigned char), because "char" could be
signed and thus have some negative value.  isalpha & co. expect an int
arg that is positive, i.e. 0-255.  So we need to cast to (unsigned char)
when calling any of these.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoall: remove logical-router functionality (#4774)
David Lamparter [Tue, 6 Aug 2019 14:45:56 +0000 (16:45 +0200)]
all: remove logical-router functionality (#4774)

all: remove logical-router functionality

4 years agoMerge pull request #4776 from pogojotz/write-config-fix
Donald Sharp [Tue, 6 Aug 2019 13:58:42 +0000 (09:58 -0400)]
Merge pull request #4776 from pogojotz/write-config-fix

Replace internal linked-list in vtysh_config with RB-tree

4 years agoMerge pull request #4733 from opensourcerouting/route-map-yang
Russ White [Tue, 6 Aug 2019 13:20:37 +0000 (09:20 -0400)]
Merge pull request #4733 from opensourcerouting/route-map-yang

yang: models for route map and filters

4 years agoMerge pull request #4742 from opensourcerouting/ospfd-default-originate
Russ White [Tue, 6 Aug 2019 12:26:54 +0000 (08:26 -0400)]
Merge pull request #4742 from opensourcerouting/ospfd-default-originate

ospfd: fix & clean up default origination

4 years agoMerge pull request #4785 from mjstapp/fix_notif_queued_flag
David Lamparter [Tue, 6 Aug 2019 09:03:48 +0000 (11:03 +0200)]
Merge pull request #4785 from mjstapp/fix_notif_queued_flag

zebra: clear route QUEUED flag in async notification handler

4 years agoMerge pull request #4777 ("Fix VRRP rarely getting stuck in Initialize")
David Lamparter [Tue, 6 Aug 2019 08:52:30 +0000 (10:52 +0200)]
Merge pull request #4777 ("Fix VRRP rarely getting stuck in Initialize")

... with a one-char typo fix.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agozebra: fix typo
David Lamparter [Tue, 6 Aug 2019 08:52:07 +0000 (10:52 +0200)]
zebra: fix typo

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobgpd: resolve memleak on show bgp vrf all ipv6 unicast summary… (#4772)
David Lamparter [Tue, 6 Aug 2019 08:49:09 +0000 (10:49 +0200)]
bgpd: resolve memleak on show bgp vrf all ipv6 unicast summary… (#4772)

bgpd: resolve memleak on show bgp vrf all ipv6 unicast summary json

4 years agoMerge pull request #4705 from ton31337/fix/set_comm-list_delete_into_config
Quentin Young [Mon, 5 Aug 2019 20:53:45 +0000 (16:53 -0400)]
Merge pull request #4705 from ton31337/fix/set_comm-list_delete_into_config

bgpd: Strip `delete` keyword when looking up for large communities

4 years agovrrpd: eliminate potential null deref
Quentin Young [Mon, 5 Aug 2019 16:24:45 +0000 (16:24 +0000)]
vrrpd: eliminate potential null deref

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: clear route QUEUED flag in async notification handler
Mark Stapp [Mon, 5 Aug 2019 14:07:26 +0000 (10:07 -0400)]
zebra: clear route QUEUED flag in async notification handler

Ensure that the route-entry QUEUED flag is cleared in the async
notification path, as it is in the normal results processing
code path.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: simplify json create/free for memleak fix
Don Slice [Mon, 5 Aug 2019 11:48:20 +0000 (04:48 -0700)]
bgpd: simplify json create/free for memleak fix

Ticket: CM-25616
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #4779 from donaldsharp/sharp_repeat_fix
Mark Stapp [Mon, 5 Aug 2019 12:40:10 +0000 (08:40 -0400)]
Merge pull request #4779 from donaldsharp/sharp_repeat_fix

sharpd: Fix repeat sub-command to work

4 years agoeigrpd: implement configuration reload
Rafael Zalamena [Thu, 1 Aug 2019 19:13:34 +0000 (16:13 -0300)]
eigrpd: implement configuration reload

Reload configuration on SIGHUP using the northbound.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoeigrpd: migrate old CLI to northbound
Rafael Zalamena [Tue, 30 Jul 2019 15:44:13 +0000 (12:44 -0300)]
eigrpd: migrate old CLI to northbound

Move all configuration commands to the new CLI code (`eigrp_cli.c`),
implement the northbound and do all the necessary wiring to get it
working.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoyang: change EIGRP authentication enum name
Rafael Zalamena [Fri, 2 Aug 2019 18:53:16 +0000 (15:53 -0300)]
yang: change EIGRP authentication enum name

In order to keep compatibility with the initial CLI, the enumeration
name for sha2 was changed. No CLI code workarounds required.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agosharpd: Fix repeat sub-command to work
Donald Sharp [Sat, 3 Aug 2019 00:35:16 +0000 (20:35 -0400)]
sharpd: Fix repeat sub-command to work

The repeat sub-command was not properly repeating.  It was starting
the removal during the install:

2019/08/03 00:10:14.351 SHARP: Inserting 300000 routes
2019/08/03 00:13:01.556 SHARP: Installed All Items 167.204747
2019/08/03 00:13:01.556 SHARP: Removing 300000 routes
2019/08/03 00:13:03.126 SHARP: Inserting 300000 routes
2019/08/03 00:14:34.794 SHARP: Removed all Items 91.668040
2019/08/03 00:16:11.743 SHARP: Installed All Items 188.616462
2019/08/03 00:16:11.743 SHARP: Removing 300000 routes
2019/08/03 00:16:14.256 SHARP: Inserting 300000 routes

This command allows the remove to wait till the install is fully
finished and vice versa:

2019/08/03 00:22:54 SHARP: Inserting 10000 routes
2019/08/03 00:22:55 SHARP: Installed All Items 0.572028
2019/08/03 00:22:55 SHARP: Removing 10000 routes
2019/08/03 00:22:55 SHARP: Removed all Items 0.568284
2019/08/03 00:22:55 SHARP: Inserting 10000 routes
2019/08/03 00:22:56 SHARP: Installed All Items 0.567687
2019/08/03 00:22:56 SHARP: Removing 10000 routes
2019/08/03 00:22:56 SHARP: Removed all Items 0.551011

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4752 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Fri, 2 Aug 2019 22:56:57 +0000 (15:56 -0700)]
Merge pull request #4752 from chiragshah6/evpn_dev1

zebra: del auto mac when vni is down

4 years agozebra: update dplane stats output
Mark Stapp [Wed, 31 Jul 2019 20:40:26 +0000 (16:40 -0400)]
zebra: update dplane stats output

Update the stats displayed by 'show zebra dplane' - some
counters had been added but not displayed. Also include
the new counters for evpn macs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: use dataplane for vxlan remote mac programming
Mark Stapp [Tue, 30 Jul 2019 15:54:07 +0000 (11:54 -0400)]
zebra: use dataplane for vxlan remote mac programming

Move vxlan remote MAC install and uninstall to the async
dataplane.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4775 from sworleys/Log-Double-Unlock
Mark Stapp [Fri, 2 Aug 2019 17:33:18 +0000 (13:33 -0400)]
Merge pull request #4775 from sworleys/Log-Double-Unlock

lib: Remove double log mutex unlock

4 years agovrrpd: try to bind interfaces on if_down notifications
Quentin Young [Thu, 1 Aug 2019 17:38:46 +0000 (17:38 +0000)]
vrrpd: try to bind interfaces on if_down notifications

Normally we only opportunistically try to bind interfaces to VRRP
instances upon getting if_add and if_up notifications; now that Zebra
sends if_down notifications when interfaces change while they are down,
we should try to bind when we get those as well.

This solves a bug where VRRP would not bind and activate virtual routers
to valid interfaces because their MACs were changed to VRRP macs while
the interface was down.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: send interface updates when down
Quentin Young [Thu, 1 Aug 2019 17:37:05 +0000 (17:37 +0000)]
zebra: send interface updates when down

When interfaces change while they are up, Zebra sends if_up
notifications with the updated interface info. Change Zebra to send
if_down notifications with interface info when the interface changes
while it is down.

VRRP, at the least, needs these to know about MAC changes while an
interface is down.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agovrrpd: add more dbg logs around interfaces
Quentin Young [Thu, 1 Aug 2019 17:35:09 +0000 (17:35 +0000)]
vrrpd: add more dbg logs around interfaces

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agovtysh: Replace linked-list in vtysh_config with RB-tree
Juergen Werner [Fri, 2 Aug 2019 15:45:13 +0000 (17:45 +0200)]
vtysh: Replace linked-list in vtysh_config with RB-tree

...for faster look-ups

Fixes: 4673
Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
4 years agolib: Remove double log mutex unlock
Stephen Worley [Fri, 2 Aug 2019 15:12:33 +0000 (11:12 -0400)]
lib: Remove double log mutex unlock

Coverity report caught this log mutex being unlocked twice.
Removing the extra one before the goto statement.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoall: remove logical-router functionality
Igor Ryzhov [Fri, 2 Aug 2019 14:10:11 +0000 (17:10 +0300)]
all: remove logical-router functionality

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agobgpd: resolve memleak on show bgp vrf all ipv6 unicast summary json
Don Slice [Wed, 31 Jul 2019 16:38:49 +0000 (12:38 -0400)]
bgpd: resolve memleak on show bgp vrf all ipv6 unicast summary json

Problem reported with memory leak when the command "show bgp vrf all
ipv6 unicast summary json" is issued.  Found that the problem only
occurs if the configuration does not actually include the ipv6
address-family but does contain ipv4 unicast peers. If we didn't
match a peer in the address-family being displayed, we would create
the json object but never free it.  This fix actually stops creating
the json object in this section of code and lets the create happen
in the area where the match occurs.

Ticket: CM-25616
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #4766 from donaldsharp/redist_small_fix
Mark Stapp [Fri, 2 Aug 2019 11:44:31 +0000 (07:44 -0400)]
Merge pull request #4766 from donaldsharp/redist_small_fix

zebra: Redistribution should be told about the old route

4 years agoospfd: clean up default route logic
David Lamparter [Mon, 29 Jul 2019 12:46:05 +0000 (14:46 +0200)]
ospfd: clean up default route logic

What a mess...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: don't ASE with router-ID 0
David Lamparter [Mon, 29 Jul 2019 12:44:44 +0000 (14:44 +0200)]
ospfd: don't ASE with router-ID 0

The ASEs will be generated later by ospf_external_lsa_rid_change().

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: unset default route external_info
David Lamparter [Mon, 29 Jul 2019 10:43:46 +0000 (12:43 +0200)]
ospfd: unset default route external_info

Need to clear out the external_info for the "always" default route that
we installed in ospf_redistribute_default_set().

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: remove LSA reorigin on NSM change
David Lamparter [Mon, 29 Jul 2019 10:28:26 +0000 (12:28 +0200)]
ospfd: remove LSA reorigin on NSM change

This is a "workaround" for something broken in LSDB sync that has been
kept around since the beginning of our git history...

(It works correctly without this "workaround".)

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: re-fix default origination check
David Lamparter [Mon, 29 Jul 2019 12:44:26 +0000 (14:44 +0200)]
ospfd: re-fix default origination check

ospf->external[DEFAULT_ROUTE] and zclient->default_information don't
line up with each other; the former is only used for "originate always".

Fixes: #4237
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoRevert "ospfd: default route got flushed after lsa refresh timer."
David Lamparter [Mon, 29 Jul 2019 12:04:06 +0000 (14:04 +0200)]
Revert "ospfd: default route got flushed after lsa refresh timer."

This reverts commit a6b4e1fdedb290e8d86f73b0d7f842f7042b26af.

This fix is wrong too.  The zclient->redist & ->mi_redist arrays are
accessed past their size for any external route that is not 0.0.0.0/0.
Also, it is incorrect to check default_information for DEFAULT_ROUTE
since that's "originate always".

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoRevert "ospfd: remove default origin max age lsa"
David Lamparter [Mon, 29 Jul 2019 10:32:32 +0000 (12:32 +0200)]
Revert "ospfd: remove default origin max age lsa"

This reverts commit 313919d6e3db67eedef77960ea4e2ba2a6018ee1.

This is not the correct way to fix this.

- touching the LSDB to explicitly remove a MaxAge LSA is always wrong
  and results in desynchronization of the entire routing domain
- the LSDB code correctly handles replacing a MaxAge LSA with a newly
  issued one
- removing the old LSA resets the sequence numbers, which may cause
  other routers to reject the new LSA as old
- the function was horribly misnamed

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: kill totally misnamed "timers"
David Lamparter [Mon, 29 Jul 2019 10:27:25 +0000 (12:27 +0200)]
ospfd: kill totally misnamed "timers"

Neither ospf_external_lsa_originate_timer() nor
ospf_default_originate_timer() are actually timers.  They're only
executed on router-ID changes to refresh a particular LSA type.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: remove t_external_lsa
David Lamparter [Mon, 29 Jul 2019 10:26:23 +0000 (12:26 +0200)]
ospfd: remove t_external_lsa

It's unused...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #4713 from ton31337/fix/set_comm-list_delete_into_config_memcpy
Sri Mohana Singamsetty [Fri, 2 Aug 2019 04:19:43 +0000 (21:19 -0700)]
Merge pull request #4713 from ton31337/fix/set_comm-list_delete_into_config_memcpy

 bgpd: Strip `delete` keyword when looking up for communities