]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #7183 from oerdnj/master
Ondřej Surý [Sat, 26 Sep 2020 12:59:10 +0000 (14:59 +0200)]
Merge pull request #7183 from oerdnj/master

Update the Debian packaging (sync with debian/master branch)

4 years agoLower the debhelper depends for Debian Jessie and Ubuntu Xenial
Ondřej Surý [Sat, 26 Sep 2020 09:25:45 +0000 (11:25 +0200)]
Lower the debhelper depends for Debian Jessie and Ubuntu Xenial

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoBump standards version
Ondřej Surý [Sat, 26 Sep 2020 07:29:43 +0000 (09:29 +0200)]
Bump standards version

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoSync frr-doc.doc-base, d/frr.conf and d/frr.install with debian/master branch
Ondřej Surý [Sat, 26 Sep 2020 07:17:04 +0000 (09:17 +0200)]
Sync frr-doc.doc-base, d/frr.conf and d/frr.install with debian/master branch

4 years agoSync debian/watchfrr.rc with debian/master branch
Ondřej Surý [Sat, 26 Sep 2020 07:15:17 +0000 (09:15 +0200)]
Sync debian/watchfrr.rc with debian/master branch

4 years agoDepend on debhelper >= 10 and drop dh-systemd dependency (Closes: #958626)
Ondřej Surý [Mon, 10 Aug 2020 09:48:52 +0000 (11:48 +0200)]
Depend on debhelper >= 10 and drop dh-systemd dependency (Closes: #958626)

dh-systemd was merged into debhelper in version 9.20160709 [1] and since
stretch, dh-systemd is an empty transitional package.

For bullseye there's an intend to drop this empty transitional package.

This commit drops the "| dh-systemd" alternative Build-Depends as it is no
longer required (not even for backports) and is only confusing.

For Debian Jessie, it's easier to add backported debhelper >= 10 to the
repository.

4 years agoWork around the sphinx-build error that doesn't copy images to texinfo
Ondřej Surý [Thu, 6 Aug 2020 08:00:28 +0000 (10:00 +0200)]
Work around the sphinx-build error that doesn't copy images to texinfo

The sphinx-build (since version 2.0.0) doesn't install the images into the
texinfo build directory.  Workaround the issue, by copying the required
images from the source directory.

4 years agoUse wrap-and-sort -a to unify debian/ wrapping and sorting
Ondřej Surý [Thu, 6 Aug 2020 07:28:29 +0000 (09:28 +0200)]
Use wrap-and-sort -a to unify debian/ wrapping and sorting

While it's ok to use individual wrapping/sorting in the debian/ source files,
it's often simpler to just go with the formatting supported by tools.  One such
tool is wrap-and-sort, so this commit re-wraps and re-sorts the debian/ files to
be unified and (-a) always wrapped.

4 years agoBump standards version to 4.5.0.2 (latest) - no change
Ondřej Surý [Thu, 6 Aug 2020 07:26:33 +0000 (09:26 +0200)]
Bump standards version to 4.5.0.2 (latest) - no change

4 years agoConvert the package to dh compat level 10
Ondřej Surý [Thu, 6 Aug 2020 07:16:40 +0000 (09:16 +0200)]
Convert the package to dh compat level 10

There are couple of related changes:

* Bump the debhelper dependency to the version at least in Debian Jessie
* Drop the dh-autoreconf, autotools-dev dependency, this is automatically
  included.
* Drop the --parallel, --with=systemd and --with=autoreconf, this is
  automatically enabled in dh compat level 10, add a --without=systemd
  when requested via build profile.

4 years agoUpdate and simplify d/watch
Ondřej Surý [Thu, 6 Aug 2020 07:01:19 +0000 (09:01 +0200)]
Update and simplify d/watch

4 years agoMake lsb-base a hard dependency
Ondřej Surý [Fri, 3 Jul 2020 10:46:45 +0000 (12:46 +0200)]
Make lsb-base a hard dependency

Directly depend on lsb-base in Debian, so we the shims are only used
on systems without LSB.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoRemove mention of pkg.frr.snmp build profile from debian/README.Debian
Ondřej Surý [Fri, 3 Jul 2020 10:46:51 +0000 (12:46 +0200)]
Remove mention of pkg.frr.snmp build profile from debian/README.Debian

The pkg.frr.snmp build profile is no longer present in the Debian build scripts,
so this just cleans up the old documentation that mentions it.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoAdd missing lsof dependency
Ondřej Surý [Fri, 3 Jul 2020 10:46:49 +0000 (12:46 +0200)]
Add missing lsof dependency

The logrotate script for frr uses lsof, but the package didn't depend on the
it.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoRemove unused debian/watchfrr.rc file
Ondřej Surý [Fri, 3 Jul 2020 10:46:48 +0000 (12:46 +0200)]
Remove unused debian/watchfrr.rc file

The debian/watchfrr.rc file was not install, so we just remove the cruft.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoUse dh_installinit capabilities to install frr.tmpfile
Ondřej Surý [Fri, 3 Jul 2020 10:46:46 +0000 (12:46 +0200)]
Use dh_installinit capabilities to install frr.tmpfile

The debian/frr.conf was manually installed as systemd-tmpfiles configuration,
but the dh_installinit now has capability to install it automatically if named
debian/frr.tmpfile.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoDon't install frr-doc texinfo images, they are gone (Closes: #955067)
Ondřej Surý [Sun, 31 May 2020 16:27:13 +0000 (18:27 +0200)]
Don't install frr-doc texinfo images, they are gone (Closes: #955067)

4 years agoChange the source format from git to quilt to use git-buildpackage
Ondřej Surý [Sun, 31 May 2020 16:02:49 +0000 (18:02 +0200)]
Change the source format from git to quilt to use git-buildpackage

4 years agoAdd d/gbp.conf for master branch
Ondřej Surý [Sun, 31 May 2020 15:46:35 +0000 (17:46 +0200)]
Add d/gbp.conf for master branch

4 years agoAdd myself to Uploaders
Ondřej Surý [Sun, 31 May 2020 15:44:28 +0000 (17:44 +0200)]
Add myself to Uploaders

4 years agoMerge pull request #7175 from idryzhov/fix-nb-bypass
Quentin Young [Fri, 25 Sep 2020 17:05:21 +0000 (13:05 -0400)]
Merge pull request #7175 from idryzhov/fix-nb-bypass

*: move all userdata when changing node xpath

4 years agoMerge pull request #7169 from donaldsharp/some_code_cleanup
Donatas Abraitis [Fri, 25 Sep 2020 07:19:34 +0000 (10:19 +0300)]
Merge pull request #7169 from donaldsharp/some_code_cleanup

Some code cleanup

4 years ago*: move all userdata when changing node xpath
Igor Ryzhov [Thu, 24 Sep 2020 18:05:32 +0000 (21:05 +0300)]
*: move all userdata when changing node xpath

The same thing was done for interfaces in commit f7c20aa1f.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7164 from AnuradhaKaruppiah/mh-misc-fixes
Sri Mohana Singamsetty [Thu, 24 Sep 2020 15:37:45 +0000 (08:37 -0700)]
Merge pull request #7164 from AnuradhaKaruppiah/mh-misc-fixes

evpn-mh: miscellaneous cleanup/fixes

4 years agobgpd: Remove dest variable from route_out_vty_flowspec
Donald Sharp [Thu, 24 Sep 2020 12:20:24 +0000 (08:20 -0400)]
bgpd: Remove dest variable from route_out_vty_flowspec

The dest variable was never really used.  Just remove
from the code base.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: pbra is already derefed in all paths to this spot
Donald Sharp [Thu, 24 Sep 2020 12:16:57 +0000 (08:16 -0400)]
bgpd: pbra is already derefed in all paths to this spot

The pbra variable is already derefed in all paths to this spot
and as such we cannot be NULL at this point.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: When bind fails we could leave an open socket
Donald Sharp [Thu, 24 Sep 2020 12:12:49 +0000 (08:12 -0400)]
pimd: When bind fails we could leave an open socket

Clean up the rare situation when bind fails to not
close the fd that was just opened and have the socket
leaked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: NULL not 0
Donald Sharp [Thu, 24 Sep 2020 12:10:26 +0000 (08:10 -0400)]
pimd: NULL not 0

When handling data pointers explicity use NULL not
0.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Ensure we do integer size promotions
Donald Sharp [Thu, 24 Sep 2020 12:07:12 +0000 (08:07 -0400)]
bgpd: Ensure we do integer size promotions

When doing multiplication of (int) * (uint_8t) we can
have overflow and end up in a weird state.  Intentionally
upgrade the type then do the math.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoisisd: Prevent usage after free
Donald Sharp [Thu, 24 Sep 2020 11:56:13 +0000 (07:56 -0400)]
isisd: Prevent usage after free

Store the vrf_id so that when we free the area we can
do further cleanup work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Tell the compiler we don't care about the return code
Donald Sharp [Thu, 24 Sep 2020 11:52:20 +0000 (07:52 -0400)]
lib: Tell the compiler we don't care about the return code

When calling yang_snodes_iterate_subtree we don't care about
the return code.  So explicitly say we don't care so that
SA tools can be on the same page as us.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Don't ignore setsockopt return
Donald Sharp [Thu, 24 Sep 2020 11:42:51 +0000 (07:42 -0400)]
zebra: Don't ignore setsockopt return

When attempting to limit the amount of data sent from the kernel
to FRR, some kernels we can run against may not have this ability
in which case the setsockopt will fail.  Notice that in the log.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7155 from donaldsharp/TRAP
Mark Stapp [Wed, 23 Sep 2020 20:06:37 +0000 (16:06 -0400)]
Merge pull request #7155 from donaldsharp/TRAP

Offload/Trap

4 years agoMerge pull request #7163 from donaldsharp/zebra_mlag_bugs
Mark Stapp [Wed, 23 Sep 2020 19:32:31 +0000 (15:32 -0400)]
Merge pull request #7163 from donaldsharp/zebra_mlag_bugs

Zebra mlag bugs

4 years agoMerge pull request #7160 from mjstapp/fix_topo_daemons_list
Stephen Worley [Wed, 23 Sep 2020 18:47:13 +0000 (14:47 -0400)]
Merge pull request #7160 from mjstapp/fix_topo_daemons_list

tests: fix bug in handling of daemons to start

4 years agozebra: fix use of freed es during zebra shutdown
Anuradha Karuppiah [Tue, 15 Sep 2020 23:50:14 +0000 (16:50 -0700)]
zebra: fix use of freed es during zebra shutdown

This problem was reported by the sanitizer -
=================================================================
==24764==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d0000115c8 at pc 0x55cb9cfad312 bp 0x7fffa0552140 sp 0x7fffa0552138
READ of size 8 at 0x60d0000115c8 thread T0
    #0 0x55cb9cfad311 in zebra_evpn_remote_es_flush zebra/zebra_evpn_mh.c:2041
    #1 0x55cb9cfad311 in zebra_evpn_es_cleanup zebra/zebra_evpn_mh.c:2234
    #2 0x55cb9cf6ae78 in zebra_vrf_disable zebra/zebra_vrf.c:205
    #3 0x7fc8d478f114 in vrf_delete lib/vrf.c:229
    #4 0x7fc8d478f99a in vrf_terminate lib/vrf.c:541
    #5 0x55cb9ceba0af in sigint zebra/main.c:176
    #6 0x55cb9ceba0af in sigint zebra/main.c:130
    #7 0x7fc8d4765d20 in quagga_sigevent_process lib/sigevent.c:103
    #8 0x7fc8d4787e8c in thread_fetch lib/thread.c:1396
    #9 0x7fc8d4708782 in frr_run lib/libfrr.c:1092
    #10 0x55cb9ce931d8 in main zebra/main.c:488
    #11 0x7fc8d43ee09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #12 0x55cb9ce94c09 in _start (/usr/lib/frr/zebra+0x8ac09)
=================================================================

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: evpn-mh: add error logs on ES processing failures
Anuradha Karuppiah [Wed, 20 May 2020 21:56:36 +0000 (14:56 -0700)]
zebra: evpn-mh: add error logs on ES processing failures

Cleanup some of the XXX added during development of MH.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #7112 from AnuradhaKaruppiah/mac-neigh-ht
Donatas Abraitis [Wed, 23 Sep 2020 18:11:56 +0000 (21:11 +0300)]
Merge pull request #7112 from AnuradhaKaruppiah/mac-neigh-ht

evpn-mh: mac-ip sync hold timers

4 years agoMerge pull request #7157 from donaldsharp/nhg_speeds
Patrick Ruddy [Wed, 23 Sep 2020 17:42:00 +0000 (18:42 +0100)]
Merge pull request #7157 from donaldsharp/nhg_speeds

zebra: Move debug information gathering to inside guard

4 years agozebra: Increase the read/write mlag buffer sizes
Donald Sharp [Wed, 23 Sep 2020 17:06:08 +0000 (13:06 -0400)]
zebra: Increase the read/write mlag buffer sizes

The read/write mlag buffer sizes of 2k were sufficient
for ~100 S,G notifications at one go.  Increase to 32k
to give us 16 times the space.

Ticket: CM-31576
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Ensure that message received from mlag will fit
Donald Sharp [Wed, 23 Sep 2020 17:04:20 +0000 (13:04 -0400)]
zebra: Ensure that message received from mlag will fit

If we receive a message that is greater than our buffer
size we are in a situation where both the read and write
buffers are fubar'ed beyond the end.  Assert when we notice
this fact.

Ticket: CM-31576
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: modify mlag code to only need 1 stream when generating data
Donald Sharp [Wed, 23 Sep 2020 16:26:13 +0000 (12:26 -0400)]
zebra: modify mlag code to only need 1 stream when generating data

The normal pattern of writing the type/length at the beginning
of the packet was not being quite followed.  Modify the mlag
code to respect the proper way of doing things and get rid
of a stream_new and copy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7154 from donaldsharp/frr_topotests
Donatas Abraitis [Wed, 23 Sep 2020 14:33:08 +0000 (17:33 +0300)]
Merge pull request #7154 from donaldsharp/frr_topotests

tests: Our tests are for FRR

4 years agozebra: stop neigh hold timer when the neigh is deleted
Anuradha Karuppiah [Tue, 26 May 2020 13:24:17 +0000 (06:24 -0700)]
zebra: stop neigh hold timer when the neigh is deleted

The neigh hold timer was firing after the neigh was deleted resulting
in the following crash -
[
    at ./zebra/zebra_evpn_neigh.h:155
    at zebra/zebra_evpn_neigh.c:447
    at lib/thread.c:1578
    at zebra/main.c:488
]

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: fix deletion of evpn mh neigh-holdtime
Don Slice [Thu, 4 Jun 2020 15:23:09 +0000 (15:23 +0000)]
zebra: fix deletion of evpn mh neigh-holdtime

Found that the command "evpn mh neigh-holdtime" can be set but
not deleted.  This fix solves the delete process

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agozebra: changes for configuring mac and neigh holdtime
Anuradha Karuppiah [Fri, 8 May 2020 13:00:40 +0000 (06:00 -0700)]
zebra: changes for configuring mac and neigh holdtime

When an ES peer withdraws a MAC-IP route we hold the entry for N seconds
to allow an external daemon (neighmgr) to establish host reachability
independent of the peer. Add config commands to allow the user to set
this holdtime (N).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agotests: fix bug in handling of daemons to start
Mark Stapp [Wed, 23 Sep 2020 12:48:25 +0000 (08:48 -0400)]
tests: fix bug in handling of daemons to start

Ensure the list of daemons to start is either the one specified
by a caller or the default one from the router configuration.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7148 from pguibert6WIND/fix_fd_not_closed
Donald Sharp [Wed, 23 Sep 2020 11:40:14 +0000 (07:40 -0400)]
Merge pull request #7148 from pguibert6WIND/fix_fd_not_closed

zebra: fix fd going out of scope leaks the handle

4 years agoMerge pull request #7018 from gouault6wind/show_ip_route
Donatas Abraitis [Wed, 23 Sep 2020 05:45:09 +0000 (08:45 +0300)]
Merge pull request #7018 from gouault6wind/show_ip_route

Clean up in vrf management

4 years agozebra: Move debug information gathering to inside guard
Donald Sharp [Wed, 23 Sep 2020 00:47:33 +0000 (20:47 -0400)]
zebra: Move debug information gathering to inside guard

Let's not make the entire `depend_finds` function pay
for the data gathering needed for the debug.  There
are numerous other places in the code that check
the NEXTHOP_FLAG_RECURSIVE and do the same output.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7116 from AnuradhaKaruppiah/mh-neigh-fixes
Sri Mohana Singamsetty [Tue, 22 Sep 2020 22:45:09 +0000 (15:45 -0700)]
Merge pull request #7116 from AnuradhaKaruppiah/mh-neigh-fixes

evpn-mh: changes for programming synced neighs as static in the dataplane

4 years agoMerge pull request #7067 from donaldsharp/remove_solaris
Mark Stapp [Tue, 22 Sep 2020 21:04:19 +0000 (17:04 -0400)]
Merge pull request #7067 from donaldsharp/remove_solaris

Remove solaris

4 years agolib, zebra: Add ability to read kernel notice of TRAP/OFFLOAD
Donald Sharp [Fri, 18 Sep 2020 19:47:27 +0000 (15:47 -0400)]
lib, zebra: Add ability to read kernel notice of TRAP/OFFLOAD

The linux kernel is getting RTM_F_TRAP and RTM_F_OFFLOAD for
kernel routes that have an underlying asic offload.  Write the
code to receive these notifications from the linux kernel and
to store that data for display about the routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add basic knowledge of asic offload available
Donald Sharp [Fri, 18 Sep 2020 19:41:19 +0000 (15:41 -0400)]
zebra: Add basic knowledge of asic offload available

Some linux kernels are starting to support the idea of knowledge
about the underlying asic.  Add a boolean that we can set/unset
to track whether or not we think the router has this functionality
available.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoinclude: Update rtnetlink.h to latest kernel
Donald Sharp [Fri, 18 Sep 2020 19:07:02 +0000 (15:07 -0400)]
include: Update rtnetlink.h to latest kernel

The rtnetlink.h header has changed in the kernel.  Let's pull it in
we need this for OFFLOAD and TRAP

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: fix fd going out of scope leaks the handle
Philippe Guibert [Tue, 22 Sep 2020 12:17:15 +0000 (14:17 +0200)]
zebra: fix fd going out of scope leaks the handle

the file descriptor is closed if it has been locally created.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #7132 from volta-networks/fix_ldp_sync_cmds
Donald Sharp [Tue, 22 Sep 2020 18:20:21 +0000 (14:20 -0400)]
Merge pull request #7132 from volta-networks/fix_ldp_sync_cmds

Fix ldp sync cmds

4 years agoMerge pull request #7122 from ckishimo/type4
Russ White [Tue, 22 Sep 2020 15:30:06 +0000 (11:30 -0400)]
Merge pull request #7122 from ckishimo/type4

ospfd: do not generate type 4 LSA from NSSA ABR

4 years agotests: Our tests are for FRR
Donald Sharp [Sat, 19 Sep 2020 01:07:20 +0000 (21:07 -0400)]
tests: Our tests are for FRR

These tests at this point only work for FRR.  Let's cut to the chase
and admit it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>`
4 years agoMerge pull request #7143 from donaldsharp/rip_debugs
Patrick Ruddy [Tue, 22 Sep 2020 10:43:17 +0000 (11:43 +0100)]
Merge pull request #7143 from donaldsharp/rip_debugs

ripd, ripngd: info -> debug

4 years agoMerge pull request #7138 from vivek-cumulus/bgp_global_gshut
Santosh P K [Tue, 22 Sep 2020 05:46:03 +0000 (11:16 +0530)]
Merge pull request #7138 from vivek-cumulus/bgp_global_gshut

BGP-wide graceful shutdown

4 years agoldpd: update topo tests for new show isis ldp-sync command output
lynne [Mon, 21 Sep 2020 15:55:47 +0000 (11:55 -0400)]
ldpd: update topo tests for new show isis ldp-sync command output

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoospfd: updates to the ldp-sync ospf commands
lynne [Fri, 18 Sep 2020 18:32:24 +0000 (14:32 -0400)]
ospfd: updates to the ldp-sync ospf commands

Improve the output of the show ip ospf mpls ldp-sync command.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoMerge pull request #7145 from idryzhov/fix-regex-error
Quentin Young [Mon, 21 Sep 2020 15:54:29 +0000 (11:54 -0400)]
Merge pull request #7145 from idryzhov/fix-regex-error

lib: fix regcomp error processing

4 years agoMerge pull request #7136 from donaldsharp/freebsd_ifc_issue
Mark Stapp [Mon, 21 Sep 2020 14:22:05 +0000 (10:22 -0400)]
Merge pull request #7136 from donaldsharp/freebsd_ifc_issue

zebra: Allow FreeBSD to set and delete addresses from an interface

4 years agodoc: Update Documentation to note Solaris Unsupported status
Donald Sharp [Wed, 9 Sep 2020 04:09:38 +0000 (00:09 -0400)]
doc: Update Documentation to note Solaris Unsupported status

With the change of Solaris going from Supported -> UnSupported
the documentation needed to be updated to reflect the reality
on the ground.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years ago*: Remove solaris from FRR
Donald Sharp [Wed, 9 Sep 2020 03:59:18 +0000 (23:59 -0400)]
*: Remove solaris from FRR

The Solaris code has gone through a deprecation cycle.  No-one
has said anything to us and worse of all we don't have any test
systems running Solaris to know if we are making changes that
are breaking on Solaris.  Remove it from the system so
we can clean up a bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: don't execute command if pre-processing hook has failed
Igor Ryzhov [Mon, 21 Sep 2020 13:00:33 +0000 (16:00 +0300)]
lib: don't execute command if pre-processing hook has failed

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agolib: fix regcomp error processing
Igor Ryzhov [Mon, 21 Sep 2020 12:35:56 +0000 (15:35 +0300)]
lib: fix regcomp error processing

 * use actual error code instead of "false"
 * add missing new line

Before:
```
nfware# show interface | include (a]
% Regex compilation error: Success% Bad regexp '(a]'
% Unknown command: show interface | include (a]
```

After:
```
nfware# show interface | include (a]
% Regex compilation error: Unmatched ( or \(
% Bad regexp '(a]'
% Unknown command: show interface | include (a]
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoripd, ripngd: info -> debug
Donald Sharp [Mon, 21 Sep 2020 11:55:36 +0000 (07:55 -0400)]
ripd, ripngd: info -> debug

There are a couple info messages in rip/ripng that really should
be debugs.  Modify code to be so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agovrf: VRF_DEFAULT must be 0, remove useless code
Christophe Gouault [Mon, 24 Aug 2020 16:01:15 +0000 (18:01 +0200)]
vrf: VRF_DEFAULT must be 0, remove useless code

Code was added in the past to support a value of VRF_DEFAULT different
from 0. This option was abandoned, the default vrf id is always 0.

Remove this code, this will simplify the code and improve performance
(use a constant value instead of a function that performs tests).

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
4 years agozebra: always display vrf in show ip route json
Christophe Gouault [Thu, 20 Aug 2020 09:15:33 +0000 (11:15 +0200)]
zebra: always display vrf in show ip route json

In route json outputs, always display the vrf even if it is the
default vrf.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
4 years agozebra: simplify and optimize vrf display in show ip route
Christophe Gouault [Thu, 20 Aug 2020 09:15:33 +0000 (11:15 +0200)]
zebra: simplify and optimize vrf display in show ip route

In all outputs (text and json): simplify and optimize the vrf name
display, use the vrf_id_to_name() handler.

Note: vrf_id_to_name() has a safeguard system that prevents from
crashing when the vrf cannot be found because it changed in some
(unexpected) manner, it returns "n/a".

Note: "vrf n/a" will now be displayed instead of "vrf UNKNOWN" in this
case, like in most other frr components.

This safeguard was missing for show ip route json, so this
optimization also fixes a potential crash.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
4 years agolib: optimize vrf_id_to_name(VRF_DEFAULT) case
Christophe Gouault [Wed, 26 Aug 2020 14:26:49 +0000 (16:26 +0200)]
lib: optimize vrf_id_to_name(VRF_DEFAULT) case

vrf_id_to_name() looks up in a RB_TREE to find the VRF entry, then
reads the name.

Avoid it for VRF_DEFAULT, which always exists and for which the
translation is straightforward.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
4 years agozebra: fix show ip route output
Christophe Gouault [Thu, 20 Aug 2020 09:15:33 +0000 (11:15 +0200)]
zebra: fix show ip route output

Variable "show ip route" commands invoke the same helper
(do_show_ip_route), potentially several times.

When asking to dump a non-default vrf, all vrfs or all tables, the
output is messy, the header summarizing abbreviations is repeated
several times, excess line feeds appear, the default table of default
VRF is concatenated to the previous table output...

Normalize the output:

- whatever the case, display the common header at most once, if there
  is at least an entry to dump.

- when using a "vrf all" or "table all" command, prepend a line with
  the VRF and table (even for the default vrf or table).

- when dumping a specific vrf or table, prepend a line with the VRF
  and table.

Example (vrf all)
=================

router# show ip route vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

VRF main:
C>* 10.0.2.0/24 is directly connected, mgmt0, 00:24:09
K>* 10.0.2.2/32 [0/100] is directly connected, mgmt0, 00:24:09
C>* 10.125.0.0/24 is directly connected, ntfp2, 00:00:26

VRF private:
S>* 1.1.1.0/24 [1/0] via 10.125.0.2, loop0, 00:00:29
C>* 10.125.0.0/24 is directly connected, loop0, 00:00:42

Example (main vrf)
==================

router# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

C>* 10.0.2.0/24 is directly connected, mgmt0, 00:24:41
K>* 10.0.2.2/32 [0/100] is directly connected, mgmt0, 00:24:41
C>* 10.125.0.0/24 is directly connected, ntfp2, 00:00:58

Example (specific vrf)
======================

router# show ip route vrf private
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

VRF private:
S>* 1.1.1.0/24 [1/0] via 10.125.0.2, loop0, 00:01:23
C>* 10.125.0.0/24 is directly connected, loop0, 00:01:36

Example (all tables)
====================

router# show ip route table all
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

VRF main table 200:
S>* 4.4.4.4/32 [1/0] via 10.125.0.3, ntfp2, 00:01:51

VRF main table 254:
C>* 10.0.2.0/24 is directly connected, mgmt0, 00:25:34
K>* 10.0.2.2/32 [0/100] is directly connected, mgmt0, 00:25:34
C>* 10.125.0.0/24 is directly connected, ntfp2, 00:01:51

Example (all vrf, all table)
============================

router# show ip route table all vrf all
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

VRF main table 200:
S>* 4.4.4.4/32 [1/0] via 10.125.0.3, ntfp2, 00:02:15

VRF main table 254:
C>* 10.0.2.0/24 is directly connected, mgmt0, 00:25:58
K>* 10.0.2.2/32 [0/100] is directly connected, mgmt0, 00:25:58
C>* 10.125.0.0/24 is directly connected, ntfp2, 00:02:15

VRF private table 200:
S>* 2.2.2.0/24 [1/0] via 10.125.0.2, loop0, 00:02:18

VRF private table 254:
S>* 1.1.1.0/24 [1/0] via 10.125.0.2, loop0, 00:02:18
C>* 10.125.0.0/24 is directly connected, loop0, 00:02:31

Example (specific table)
========================

router# show ip route table 200
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

VRF main table 200:
S>* 4.4.4.4/32 [1/0] via 10.125.0.3, ntfp2, 00:05:26

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
4 years agotopotests: Add test for BGP graceful shutdown
vivek [Mon, 21 Sep 2020 03:19:51 +0000 (20:19 -0700)]
topotests: Add test for BGP graceful shutdown

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
4 years agozebra: Allow FreeBSD to set and delete addresses from an interface
Donald Sharp [Mon, 21 Sep 2020 00:21:41 +0000 (20:21 -0400)]
zebra: Allow FreeBSD to set and delete addresses from an interface

This series of events:

$ sudo ifconfig lo0 add 4.4.4.4/32
$ sudo ifconfig lo0 inet 4.4.4.4/32 delete

would end up leaving the 4.4.4.4/32 address on the interface under
freebsd.

This all boils down to the fact that the interface is not
considered connected yet we have a destination.  If the
destination is the same and we are not connected ignore
it on freebsd.

I am sure there are other fun scenarios that someone
will have to squirrel out.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Implement BGP-wide configuration for graceful shutdown
vivek [Sat, 19 Sep 2020 21:22:17 +0000 (14:22 -0700)]
bgpd: Implement BGP-wide configuration for graceful shutdown

Add support for a BGP-wide setting to enter and exit graceful shutdown.
This will apply to all BGP peers across all BGP instances. Per-instance
configuration is disallowed if the BGP-wide setting is in effect.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
4 years agobgpd: Define function to check if performing graceful shutdown
vivek [Sat, 19 Sep 2020 19:50:46 +0000 (12:50 -0700)]
bgpd: Define function to check if performing graceful shutdown

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
4 years agoMerge pull request #7036 from ton31337/fix/do_not_allow_setting_maximum-prefix-out_global
Donald Sharp [Sat, 19 Sep 2020 12:32:02 +0000 (08:32 -0400)]
Merge pull request #7036 from ton31337/fix/do_not_allow_setting_maximum-prefix-out_global

bgpd: maximum-prefix-out command fixes

4 years agoMerge pull request #7133 from Niral-Networks/niral_fix_ospf_timer
Donald Sharp [Sat, 19 Sep 2020 12:18:46 +0000 (08:18 -0400)]
Merge pull request #7133 from Niral-Networks/niral_fix_ospf_timer

ospfd : Fix for ospf dead interval and hello due.

4 years agoMerge pull request #7097 from mjstapp/fix_ubu20_doc_pip2
Donatas Abraitis [Sat, 19 Sep 2020 12:11:25 +0000 (15:11 +0300)]
Merge pull request #7097 from mjstapp/fix_ubu20_doc_pip2

doc: clarify python and pip2 for ubuntu 20

4 years agoMerge pull request #7069 from opensourcerouting/fix-set-metric
Donald Sharp [Sat, 19 Sep 2020 12:06:36 +0000 (08:06 -0400)]
Merge pull request #7069 from opensourcerouting/fix-set-metric

lib: fix the "set metric" route-map command

4 years agoospfd : Fix for ospf dead interval and hello due.
Kaushik [Sat, 19 Sep 2020 07:29:25 +0000 (00:29 -0700)]
ospfd : Fix for ospf dead interval and hello due.

1. Ospf dead-interval will be set as 4 times of hello-interval, incase
if it is not set by using "ip ospf dead-interval <dead-val>".
2. On resetting hello-interval using "no ip ospf hello-interval" the
dead interval and hello due will be changed accordingly.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agoMerge pull request #6814 from gpnaveen/ospf_basic_functionality
Donald Sharp [Sat, 19 Sep 2020 01:20:04 +0000 (21:20 -0400)]
Merge pull request #6814 from gpnaveen/ospf_basic_functionality

tests: ospf basic functionality topojson testcases.

4 years agoMerge pull request #7074 from Niral-Networks/acl_fix
Donald Sharp [Sat, 19 Sep 2020 00:46:37 +0000 (20:46 -0400)]
Merge pull request #7074 from Niral-Networks/acl_fix

ospfd : Resolving conflict in distribute-list update during MaxAge LSA.

4 years agoMerge pull request #7079 from opensourcerouting/nested-yang-augmentations
Donald Sharp [Sat, 19 Sep 2020 00:43:20 +0000 (20:43 -0400)]
Merge pull request #7079 from opensourcerouting/nested-yang-augmentations

lib: better support for nested YANG augmentations

4 years agoisisd: updates to ldp-sync isis commands
lynne [Fri, 18 Sep 2020 18:29:30 +0000 (14:29 -0400)]
isisd: updates to ldp-sync isis commands

Improve the output of the show isis mpls ldp-sync command.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoMerge pull request #7131 from mjstapp/fix_topo_py2_iter
Donald Sharp [Fri, 18 Sep 2020 22:15:43 +0000 (18:15 -0400)]
Merge pull request #7131 from mjstapp/fix_topo_py2_iter

tests: use .items instead of .iteritems in topotests

4 years agoMerge pull request #7130 from volta-networks/fix_ldp_sync_topotest
Donald Sharp [Fri, 18 Sep 2020 22:00:42 +0000 (18:00 -0400)]
Merge pull request #7130 from volta-networks/fix_ldp_sync_topotest

tests: increase timeout to avoid intermittent LDP Sync test failure

4 years agotests: use .items instead of .iteritems in topotests
Mark Stapp [Fri, 18 Sep 2020 18:03:49 +0000 (14:03 -0400)]
tests: use .items instead of .iteritems in topotests

Avoid py2-only .iteritems() api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7086 from ckishimo/flush_type5
Donald Sharp [Fri, 18 Sep 2020 18:58:14 +0000 (14:58 -0400)]
Merge pull request #7086 from ckishimo/flush_type5

ospfd: flush type 5 when type 7 is removed

4 years agoMerge pull request #7077 from ckishimo/debug
Donald Sharp [Fri, 18 Sep 2020 18:56:12 +0000 (14:56 -0400)]
Merge pull request #7077 from ckishimo/debug

ospfd: fix debug ospf nssa prints wrong info

4 years agotests: increase timeout to avoid intermittent LDP Sync test failure
Karen Schoener [Fri, 18 Sep 2020 17:54:51 +0000 (13:54 -0400)]
tests: increase timeout to avoid intermittent LDP Sync test failure

Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agoMerge pull request #7129 from kuldeepkash/bgp_basic_functionality
Donald Sharp [Fri, 18 Sep 2020 16:31:17 +0000 (12:31 -0400)]
Merge pull request #7129 from kuldeepkash/bgp_basic_functionality

tests: Add bgp_route_aggregation test suite

4 years agoMerge pull request #7089 from pguibert6WIND/netns-refactor
Russ White [Fri, 18 Sep 2020 15:02:30 +0000 (11:02 -0400)]
Merge pull request #7089 from pguibert6WIND/netns-refactor

Netns refactor

4 years agoMerge pull request #7128 from donaldsharp/pbr_vrf_disable
Mark Stapp [Fri, 18 Sep 2020 14:53:15 +0000 (10:53 -0400)]
Merge pull request #7128 from donaldsharp/pbr_vrf_disable

Pbr vrf disable

4 years agotests: Add bgp_route_aggregation test suite
Kuldeep Kashyap [Fri, 18 Sep 2020 14:10:06 +0000 (14:10 +0000)]
tests: Add bgp_route_aggregation test suite

1. Added 2 tests to verify bgp route aggregation using summary-only and
   as-set commands
2. Execution time is ~90 sec

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agolib: Remove debug associated with vrf_get
Donald Sharp [Fri, 18 Sep 2020 11:14:55 +0000 (07:14 -0400)]
lib: Remove debug associated with vrf_get

The vrf_get function is called throughout the code base
so much so that when you turn on vrf debugging it eclipses
everything else to a degree that is completely unreasonable.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: Optimising a step for not true case.
nguggarigoud [Fri, 18 Sep 2020 09:40:54 +0000 (15:10 +0530)]
tests: Optimising a step for not true case.

1. Optimising a step for not true case.
2. Fixing a timing issue in route calculation script.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>