]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agolib: simplify handling of the sysrepo startup configuration
Renato Westphal [Sat, 12 Sep 2020 01:39:50 +0000 (22:39 -0300)]
lib: simplify handling of the sysrepo startup configuration

In the new Sysrepo, all SR_EV_ENABLED notifications are followed by
SR_EV_DONE notifications (assuming no errors occur), so there's no
need to special case the SR_EV_ENABLED event anymore (e.g. do full
transactions in one step).

While here, add a few more guarded debug messages to facilitate
troubleshooting.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib: fix handling of deleted nodes in the sysrepo plugin
Renato Westphal [Sat, 12 Sep 2020 01:39:35 +0000 (22:39 -0300)]
lib: fix handling of deleted nodes in the sysrepo plugin

Make the sysrepo plugin ignore the deletion of configuration
nodes that don't exist anymore instead of logging an error and
rejecting the changes. This is necessary because Sysrepo delivers
delete notifications for all nodes of a deleted data tree instead
of delivering a single delete notification of the top-level subtree
node (which would suffice for the northbound layer).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib: postpone the sysrepo plugin initialization
Renato Westphal [Sat, 12 Sep 2020 01:39:11 +0000 (22:39 -0300)]
lib: postpone the sysrepo plugin initialization

From Sysrepo's documentation:
"Note: do not use fork() after creating a connection. Sysrepo
internally stores PID of every created connection and this way a
mismatch of PID and connection is created".

Introduce a new "frr_very_late_init" hook in libfrr that is only
called after the daemon is forked (when the '-d' option is used)
and after the configuration is read. This way we can initialize
the sysrepo plugin correctly even when the daemon is daemonized,
and after the Sysrepo CLI commands are processed (only "debug
northbound client sysrepo" for now).

Fixes #7062

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #7099 from mjstapp/fix_doc_thread_rw
Lou Berger [Tue, 15 Sep 2020 15:20:13 +0000 (11:20 -0400)]
Merge pull request #7099 from mjstapp/fix_doc_thread_rw

doc: clarify independence of THREAD_READ and _WRITE

4 years agoMerge pull request #7082 from volta-networks/fix_isis_pseudo_lsp
Renato Westphal [Tue, 15 Sep 2020 14:25:04 +0000 (11:25 -0300)]
Merge pull request #7082 from volta-networks/fix_isis_pseudo_lsp

isisd: fix pseudonode LSP bug

4 years agoMerge pull request #7083 from volta-networks/isis_route_logs_improve
Renato Westphal [Tue, 15 Sep 2020 14:24:53 +0000 (11:24 -0300)]
Merge pull request #7083 from volta-networks/isis_route_logs_improve

isisd: improve route-event logs

4 years agoMerge pull request #7090 from dslicenc/comm-list-replace
Jafar Al-Gharaibeh [Mon, 14 Sep 2020 15:42:10 +0000 (10:42 -0500)]
Merge pull request #7090 from dslicenc/comm-list-replace

bgpd: correct community-list replace logic

4 years agodoc: clarify independence of THREAD_READ and _WRITE
Mark Stapp [Mon, 14 Sep 2020 15:01:44 +0000 (11:01 -0400)]
doc: clarify independence of THREAD_READ and _WRITE

Make it clearer that the READ and WRITE tasks/events are
independent in the lib/thread apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7093 from donaldsharp/pbr_flapping
Mark Stapp [Mon, 14 Sep 2020 12:13:48 +0000 (08:13 -0400)]
Merge pull request #7093 from donaldsharp/pbr_flapping

Pbr flapping

4 years agoMerge pull request #7065 from idryzhov/bgp-deprecated
Donatas Abraitis [Mon, 14 Sep 2020 09:45:08 +0000 (12:45 +0300)]
Merge pull request #7065 from idryzhov/bgp-deprecated

bgpd: remove deprecated commands

4 years agoisisd: improve route-event logs
Emanuele Di Pascale [Tue, 8 Sep 2020 15:00:40 +0000 (17:00 +0200)]
isisd: improve route-event logs

suppress route-event logs that are uninformative and add more info to
the ones that matter, i.e. hints on what changed in a route update. The
suppressed logs can be enabled by defining EXTREME_DEBUG to 1, similarly
to what is done elsewhere in isisd (e.g. in isis_spf.c)

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoisisd: fix pseudonode LSP bug
Emanuele Di Pascale [Fri, 11 Sep 2020 09:07:37 +0000 (11:07 +0200)]
isisd: fix pseudonode LSP bug

Currently, when the is-type of an area is changed and its circuits resign,
we are not resetting the DIS flag. Consequently, if the area type is reverted
we are not running the DR election and not regenerating the pseudonode LSP.

Also adding event debug logs for circuit commence/resign.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agobgpd: remove deprecated commands
Igor Ryzhov [Tue, 8 Sep 2020 22:10:06 +0000 (01:10 +0300)]
bgpd: remove deprecated commands

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7092 from sworleys/RPM-Link-Fix
Jafar Al-Gharaibeh [Sat, 12 Sep 2020 14:22:17 +0000 (09:22 -0500)]
Merge pull request #7092 from sworleys/RPM-Link-Fix

doc: fix rpm link under libyang help

4 years agoMerge pull request #7091 from opensourcerouting/nb-leafrefs
Donald Sharp [Sat, 12 Sep 2020 13:29:33 +0000 (09:29 -0400)]
Merge pull request #7091 from opensourcerouting/nb-leafrefs

lib: fix crashes with leafrefs that point to non-implemented modules

4 years agobgpd: correct community-list replace logic
Don Slice [Thu, 10 Sep 2020 12:40:28 +0000 (12:40 +0000)]
bgpd: correct community-list replace logic

Problem rerported that if you enter an existing community list
sequence number with new community information, the entire community
list would be deleted.  This commit fixes the replace logic to do
the right thing.

Ticket: CM-30555
Signed-off-by: Don Slice <dslice@nvidia.com>
4 years agoMerge pull request #7084 from donaldsharp/pim_limitations
Jafar Al-Gharaibeh [Sat, 12 Sep 2020 03:15:02 +0000 (22:15 -0500)]
Merge pull request #7084 from donaldsharp/pim_limitations

pimd: Warn when we try to build MAXVIFS > 256

4 years agoMerge pull request #7095 from donaldsharp/coverity_5
Jafar Al-Gharaibeh [Sat, 12 Sep 2020 03:07:56 +0000 (22:07 -0500)]
Merge pull request #7095 from donaldsharp/coverity_5

isisd: ifp cannot be NULL

4 years agoMerge pull request #7080 from opensourcerouting/staticd-minor-issues
Donald Sharp [Sat, 12 Sep 2020 00:07:19 +0000 (20:07 -0400)]
Merge pull request #7080 from opensourcerouting/staticd-minor-issues

staticd: remove dead code + minor fix

4 years agopimd: Warn when we try to build MAXVIFS > 256
Donald Sharp [Fri, 11 Sep 2020 12:27:28 +0000 (08:27 -0400)]
pimd: Warn when we try to build MAXVIFS > 256

We use the pim mroute socket for kernel notifications of events.
Currently this is limited to 8 bits of data.  There are patches
coming down the pike in kernel land to allow this to expand.
Rather than fix this and all the other places we assume MAXVIFS < 256
in the pim code right now.  Leave a land mine for the developer
doing this work to point them in the right direction.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopbrd: Ensure rule is installed on interface up
Donald Sharp [Fri, 11 Sep 2020 17:05:55 +0000 (13:05 -0400)]
pbrd: Ensure rule is installed on interface up

If we are experiencing an interface that is bouncing
very fast and the last operation that we experienced
was a ifdown we will send rule deletions associated
with that interface.  If we have not received notification
that hte rule was removed *but* we immiedately get another
ifup notification when we go to install the rule we
are deciding that it's not ready to send down again,
as that we still think it is installed.

Force the rule installation when we have a interface up
event.

Ticket: CM-31042
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd, lib, pbrd, zebra: Pass by ifname
Donald Sharp [Thu, 10 Sep 2020 15:31:39 +0000 (11:31 -0400)]
bgpd, lib, pbrd, zebra: Pass by ifname

When installing rules pass by the interface name across
zapi.

This is being changed because we have a situation where
if you quickly create/destroy ephermeal interfaces under
linux the upper level protocol may be trying to add
a rule for a interface that does not quite exist
at the moment.  Since ip rules actually want the
interface name ( to handle just this sort of situation )
convert over to passing the interface name and storing
it and using it in zebra.

Ticket: CM-31042
Signed-off-by: Stephen Worley <sworley@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #6974 from liron-ze/high-cpu-usage
Renato Westphal [Fri, 11 Sep 2020 18:59:27 +0000 (15:59 -0300)]
Merge pull request #6974 from liron-ze/high-cpu-usage

zebra: Solve the problem of high CPU and memory usage when creating t…

4 years agoMerge pull request #6789 from volta-networks/feat_ldp_igp_sync
Renato Westphal [Fri, 11 Sep 2020 18:55:04 +0000 (15:55 -0300)]
Merge pull request #6789 from volta-networks/feat_ldp_igp_sync

ldpd: Add support for LDP-IGP Synchronization

4 years agoisisd: ifp cannot be NULL
Donald Sharp [Fri, 11 Sep 2020 18:30:24 +0000 (14:30 -0400)]
isisd: ifp cannot be NULL

the ifp pointer cannot be NULL when we get to this point
in the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agostaticd: fix display of the "nexthop-vrf" parameter of static routes
Renato Westphal [Fri, 11 Sep 2020 00:27:48 +0000 (21:27 -0300)]
staticd: fix display of the "nexthop-vrf" parameter of static routes

When the static route VRF and its nexthop VRF are inactive in the
kernel, both VRFs will have the same ID (VRF_UNKNOWN) even though
they might not be the same. This can cause "sh run" to not display
the "nexthop-vrf" parameter correctly when necessary. Change the
code to compare VRFs by their names to fix this problem.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agostaticd: remove checks that are no longer necessary
Renato Westphal [Thu, 10 Sep 2020 21:45:42 +0000 (18:45 -0300)]
staticd: remove checks that are no longer necessary

All call sites of static_route_leak() are passing a non-null pointer
to the 'vty' parameter, hence remove the 'vty' null checks that
are no longer necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agodoc: fix rpm link under libyang help
Stephen Worley [Fri, 11 Sep 2020 18:11:48 +0000 (14:11 -0400)]
doc: fix rpm link under libyang help

Fix the rpm link under libyang help. The link was assuming
it was local without the https.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: fix crashes with leafrefs that point to non-implemented modules
Renato Westphal [Fri, 11 Sep 2020 13:43:49 +0000 (10:43 -0300)]
lib: fix crashes with leafrefs that point to non-implemented modules

Whenever libyang loads a module that contains a leafref, it will
also implicitly load the module of the referring node if it's
not loaded already. That makes sense as otherwise it wouldn't be
possible to validate the leafref value correctly.

The problem is that loading a module implicitly violates the
assumption of the northbound layer that all loaded modules
are implemented (i.e. they have a northbound node associated
to each schema node). This means that loading a module that
isn't implemented can lead to crashes as the "priv" pointer
of schema nodes is no longer guaranteed to be valid. To fix this
problem, add a few null checks to ignore data nodes associated
to non-implemented modules.

The side effect of this change is harmless. If a daemon receives
configuration it doesn't support (e.g. BFD peers on staticd),
that configuration will be stored but otherwise ignored. This can
only happen when using a northbound client like gRPC, as the CLI
will never send to a daemon a command it doesn't support. This
minor problem should go away in the long run as FRR migrates to
a centralized management model, at which point the YANG-modeled
configuration of all daemons will be maintained in a single place.

Finally, update some daemons to stop implementing YANG modules
they don't need to (i.e. revert 1b741a01c and a74b47f5).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #7075 from donaldsharp/snap_fix
Martin Winter [Fri, 11 Sep 2020 13:40:00 +0000 (15:40 +0200)]
Merge pull request #7075 from donaldsharp/snap_fix

snapcraft: Update libyang version

4 years agoMerge pull request #7085 from donaldsharp/nhrpd-leafref-workaround
Rafael Zalamena [Fri, 11 Sep 2020 13:37:53 +0000 (10:37 -0300)]
Merge pull request #7085 from donaldsharp/nhrpd-leafref-workaround

nhrpd: add frr-vrf to the list of implemented yang modules

4 years agonhrpd: add frr-vrf to the list of implemented yang modules
Donald Sharp [Fri, 11 Sep 2020 12:51:05 +0000 (08:51 -0400)]
nhrpd: add frr-vrf to the list of implemented yang modules

PR #6376 introduced a VRF leafref in the frr-interface YANG module.
That change exposed a bug in the northbound layer that is causing
nhrpd to crash under certain circumstances. Even though nhrpd wasn't
converted to the new northbound model yet, make it implement the
frr-vrf module in order to work around this problem. This is a
temporary fix until a better solution is available.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7078 from sworleys/RPM-Doc-Blurb
Jafar Al-Gharaibeh [Fri, 11 Sep 2020 05:27:50 +0000 (00:27 -0500)]
Merge pull request #7078 from sworleys/RPM-Doc-Blurb

doc: add blurb for rpm package server in overview

4 years agodoc: add blurb for rpm package server in overview
Stephen Worley [Thu, 10 Sep 2020 21:16:11 +0000 (17:16 -0400)]
doc: add blurb for rpm package server in overview

Add a blurb about the rpm package server in the overview page
so its easier to know where it is. Should be with the debian
one anyway.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agosnapcraft: Update libyang version
Donald Sharp [Thu, 10 Sep 2020 11:48:53 +0000 (07:48 -0400)]
snapcraft: Update libyang version

Update the snapcraft build of libyang to the version we
actually want to be using v1.0.184

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #6827 from maduri111/bgpd-show-bgp-all
Donatas Abraitis [Thu, 10 Sep 2020 12:11:14 +0000 (15:11 +0300)]
Merge pull request #6827 from maduri111/bgpd-show-bgp-all

bgpd: show <ip> bgp <ipv4/ipv6> all

4 years agoMerge pull request #7064 from donaldsharp/bgp_timings_faster
Donatas Abraitis [Thu, 10 Sep 2020 12:10:11 +0000 (15:10 +0300)]
Merge pull request #7064 from donaldsharp/bgp_timings_faster

tests: Modify bgpd.conf to have faster keepalive/hold timers

4 years agoMerge pull request #7070 from opensourcerouting/pbrd-leafref-workaround
Donald Sharp [Thu, 10 Sep 2020 02:10:00 +0000 (22:10 -0400)]
Merge pull request #7070 from opensourcerouting/pbrd-leafref-workaround

pbrd: add frr-vrf to the list of implemented yang modules

4 years agopbrd: add frr-vrf to the list of implemented yang modules
Renato Westphal [Thu, 10 Sep 2020 01:31:59 +0000 (22:31 -0300)]
pbrd: add frr-vrf to the list of implemented yang modules

PR #6376 introduced a VRF leafref in the frr-interface YANG module.
That change exposed a bug in the northbound layer that is causing
pbrd to crash under certain circumstances. Even though pbrd wasn't
converted to the new northbound model yet, make it implement the
frr-vrf module in order to work around this problem. This is a
temporary fix until a better solution is available.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: ldp-igp-sync feature: adding isis support
lynne [Wed, 22 Jul 2020 18:32:35 +0000 (14:32 -0400)]
isisd: ldp-igp-sync feature: adding isis support

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agoospfd: ldp-igp-sync feature: adding ospf support
lynne [Wed, 22 Jul 2020 17:31:14 +0000 (13:31 -0400)]
ospfd: ldp-igp-sync feature: adding ospf support

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agolib: adding support for LDP IGP Sync feature
Karen Schoener [Wed, 22 Jul 2020 16:41:57 +0000 (12:41 -0400)]
lib: adding support for LDP IGP Sync feature

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agoldpd: adding topotests for the LDP IGP Sync feature
Karen Schoener [Wed, 22 Jul 2020 16:18:29 +0000 (12:18 -0400)]
ldpd: adding topotests for the LDP IGP Sync feature

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agoldpd: Adding support for LDP IGP Synchronization
Karen Schoener [Wed, 22 Jul 2020 16:10:59 +0000 (12:10 -0400)]
ldpd: Adding support for LDP IGP Synchronization

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years ago*: Update version string
Donald Sharp [Wed, 9 Sep 2020 14:10:54 +0000 (10:10 -0400)]
*: Update version string

Update the version string to reflect work towards next release

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7047 from qlyoung/fix-zlog-target-null-deref
Mark Stapp [Tue, 8 Sep 2020 19:25:08 +0000 (15:25 -0400)]
Merge pull request #7047 from qlyoung/fix-zlog-target-null-deref

lib: fix possible null dereference in zlog

4 years agoMerge pull request #7031 from dslicenc/global-bgp-update-delay
Donatas Abraitis [Tue, 8 Sep 2020 18:43:51 +0000 (21:43 +0300)]
Merge pull request #7031 from dslicenc/global-bgp-update-delay

Global bgp update delay

4 years agoMerge pull request #7032 from qlyoung/devdocs-libyang-hashtable
Mark Stapp [Tue, 8 Sep 2020 17:03:16 +0000 (13:03 -0400)]
Merge pull request #7032 from qlyoung/devdocs-libyang-hashtable

Dev docs update for libyang, hash table invariants

4 years agotests: Modify bgpd.conf to have faster keepalive/hold timers
Donald Sharp [Tue, 8 Sep 2020 16:56:55 +0000 (12:56 -0400)]
tests: Modify bgpd.conf to have faster keepalive/hold timers

Modify bgpd.conf in all easily accessible topotests to use 3 10
as their timers du jour.  This will allow the tests to converge
faster.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agodoc: update libyang blurb for 1.x
Quentin Young [Tue, 1 Sep 2020 18:10:20 +0000 (14:10 -0400)]
doc: update libyang blurb for 1.x

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: add notes about hash table invariants
Quentin Young [Tue, 1 Sep 2020 18:10:06 +0000 (14:10 -0400)]
doc: add notes about hash table invariants

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6376 from opensourcerouting/bump-libyang-req-version-1.x
Donald Sharp [Tue, 8 Sep 2020 16:06:10 +0000 (12:06 -0400)]
Merge pull request #6376 from opensourcerouting/bump-libyang-req-version-1.x

build, yang: bump libyang minimum required version to 1.0.184

4 years agolib: fix possible null dereference in zlog
Quentin Young [Wed, 2 Sep 2020 21:24:54 +0000 (17:24 -0400)]
lib: fix possible null dereference in zlog

In some cases one or both of the zlog targets in use here can be null,
we need to check for that.

Interestingly it appears we don't crash even when this is the case.
Undefined behavior ftw

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6969 from ton31337/feature/autoshutdown_if_rtt_higher_than_specified
Russ White [Tue, 8 Sep 2020 15:28:40 +0000 (11:28 -0400)]
Merge pull request #6969 from ton31337/feature/autoshutdown_if_rtt_higher_than_specified

bgpd: Add `neighbor <neigh> shutdown rtt` command

4 years agotopotests: Add test for bgp update-delay configuration
Don slice [Fri, 28 Aug 2020 19:53:03 +0000 (15:53 -0400)]
topotests: Add test for bgp update-delay configuration

Signed-off-by: Don Slice <dslice@nvidia.com>
4 years agobgpd: add global config for update-delay
Don slice [Wed, 5 Aug 2020 19:08:17 +0000 (19:08 +0000)]
bgpd: add global config for update-delay

Enhancement to update-delay configuration to allow setting globally
rather than per-instance.  Setting the update-delay is allowed either
per-vrf or globally, but not both at the same time.

Ticket: CM-31096
Signed-off-by: Don Slice <dslice@nvidia.com>
4 years agodoc: Add `neighbor <x.x.x.x.> shutdown rtt <milliseconds>`
Donatas Abraitis [Tue, 18 Aug 2020 20:08:16 +0000 (23:08 +0300)]
doc: Add `neighbor <x.x.x.x.> shutdown rtt <milliseconds>`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Add `neighbor <neigh> shutdown rtt` command
Donatas Abraitis [Sat, 25 Jul 2020 06:10:56 +0000 (09:10 +0300)]
bgpd: Add `neighbor <neigh> shutdown rtt` command

This would be useful in cases with lots of peers and shutdown them
automatically if RTT goes above the specified limit.

A host with 512 or more IPv6 addresses has a higher latency due to
ipv6_addr_label(). This method tries to pick the best candidate address
fo outgoing connection and literally increases processing latency.

```
Samples: 28  of event 'cycles', Event count (approx.): 22131542
  Children      Self  Command  Shared Object      Symbol
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] entry_SYSCALL_64_fastpath
  +  100.00%     0.00%  ping6    [unknown]          [.] 0x0df0ad0b8047022a
  +  100.00%     0.00%  ping6    libc-2.17.so       [.] __sendto_nocancel
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] sys_sendto
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] SYSC_sendto
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] sock_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] inet_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] rawv6_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_dst_lookup_flow
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_dst_lookup_tail
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_route_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_dev_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] __ipv6_dev_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_get_saddr_eval
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_addr_label
  +  100.00%   100.00%  ping6    [kernel.kallsyms]  [k] __ipv6_addr_label
  +    0.00%     0.00%  ping6    [kernel.kallsyms]  [k] schedule
```

This is how it works:

```
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
9
~# tc qdisc add dev eth1 root netem delay 120ms
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
89
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
null
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".lastResetDueTo'
"Admin. shutdown"
```

Warning message:
bgpd[14807]: 192.168.0.2 shutdown due to high round-trip-time (200ms > 150ms)

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Update RTT on KEEPALIVE message
Donatas Abraitis [Sat, 25 Jul 2020 06:10:15 +0000 (09:10 +0300)]
bgpd: Update RTT on KEEPALIVE message

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6982 from achernavin22/ospf_nssa_after_redist
Santosh P K [Mon, 7 Sep 2020 12:54:41 +0000 (18:24 +0530)]
Merge pull request #6982 from achernavin22/ospf_nssa_after_redist

ospfd: install Type-7 when NSSA enabled after redistribution

4 years agoMerge pull request #7040 from qlyoung/fix-evpn-attribute-hash-error
Donatas Abraitis [Sat, 5 Sep 2020 12:47:38 +0000 (15:47 +0300)]
Merge pull request #7040 from qlyoung/fix-evpn-attribute-hash-error

bgpd: modify attr fields before hash insert

4 years agoMerge pull request #7037 from volta-networks/fix_traps_bgp
Donatas Abraitis [Sat, 5 Sep 2020 05:28:19 +0000 (08:28 +0300)]
Merge pull request #7037 from volta-networks/fix_traps_bgp

Fix bgpBackwardTransition traps

4 years agoMerge pull request #7051 from donaldsharp/ospf_test_speedup
Donatas Abraitis [Sat, 5 Sep 2020 05:17:31 +0000 (08:17 +0300)]
Merge pull request #7051 from donaldsharp/ospf_test_speedup

Ospf test speedup

4 years agoMerge pull request #7054 from qlyoung/fix-bgp-mplsvpn-nlri-missing-length-checks
Donatas Abraitis [Sat, 5 Sep 2020 05:17:15 +0000 (08:17 +0300)]
Merge pull request #7054 from qlyoung/fix-bgp-mplsvpn-nlri-missing-length-checks

bgpd: fix mplsvpn nlri garbage heap read

4 years agoMerge pull request #7046 from qlyoung/fix-various-integer-issues
Renato Westphal [Sat, 5 Sep 2020 01:33:48 +0000 (22:33 -0300)]
Merge pull request #7046 from qlyoung/fix-various-integer-issues

Fix various integer signedness / overflow issues

4 years agoMerge pull request #7055 from qlyoung/fix-bgp-localpref-overflow
Renato Westphal [Fri, 4 Sep 2020 21:56:46 +0000 (18:56 -0300)]
Merge pull request #7055 from qlyoung/fix-bgp-localpref-overflow

bgpd: fix asserting read of localpref

4 years agoMerge pull request #6934 from Niral-Networks/niral_dev_vrf_isis_core_pr4
Renato Westphal [Fri, 4 Sep 2020 21:44:56 +0000 (18:44 -0300)]
Merge pull request #6934 from Niral-Networks/niral_dev_vrf_isis_core_pr4

isisd, yang, doc : Support for different VRF in ISIS.

4 years agoMerge pull request #6971 from volta-networks/fix_ldp_no_config
Renato Westphal [Fri, 4 Sep 2020 19:39:16 +0000 (16:39 -0300)]
Merge pull request #6971 from volta-networks/fix_ldp_no_config

ldpd: Fix issue when starting up LDP with no configuration.

4 years agoMerge pull request #6589 from NaveenThanikachalam/gr_fixes
Donatas Abraitis [Fri, 4 Sep 2020 15:39:26 +0000 (18:39 +0300)]
Merge pull request #6589 from NaveenThanikachalam/gr_fixes

bgpd: GR fixes

4 years agoldpd: Fix issue when starting up LDP with no configuration.
lynne [Wed, 12 Aug 2020 23:15:24 +0000 (19:15 -0400)]
ldpd: Fix issue when starting up LDP with no configuration.

LDP would mark all routes as learned on a non-ldp interface.  Then
when LDP was configured the labels were not updated correctly.  This
commit fixes issues 6841 and 6842.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoMerge pull request #6826 from pjdruddy/bgp-auth-vrf-frr
Donatas Abraitis [Fri, 4 Sep 2020 13:03:47 +0000 (16:03 +0300)]
Merge pull request #6826 from pjdruddy/bgp-auth-vrf-frr

Bgp auth vrf frr

4 years agoMerge pull request #7053 from mjstapp/fix_ospf6_intf_sa
Donald Sharp [Fri, 4 Sep 2020 10:47:07 +0000 (06:47 -0400)]
Merge pull request #7053 from mjstapp/fix_ospf6_intf_sa

ospf6d: fix SA warning

4 years agoMerge pull request #7052 from mjstapp/fix_stream_get_data
Donald Sharp [Fri, 4 Sep 2020 00:45:05 +0000 (20:45 -0400)]
Merge pull request #7052 from mjstapp/fix_stream_get_data

lib: remove unused stream_get_data api

4 years agoMerge pull request #6891 from opensourcerouting/feature/sr-te-bgpd
Donald Sharp [Thu, 3 Sep 2020 18:52:30 +0000 (14:52 -0400)]
Merge pull request #6891 from opensourcerouting/feature/sr-te-bgpd

bgpd: Add support for SR-TE Policies in route-maps

4 years agobgpd: use stream_rewind_getp() to remove overflow
Quentin Young [Wed, 2 Sep 2020 20:44:13 +0000 (16:44 -0400)]
bgpd: use stream_rewind_getp() to remove overflow

Passing a negative argument to a size_t parameter creates an overflow
condition

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agolib: add stream_rewind_getp()
Quentin Young [Wed, 2 Sep 2020 20:43:29 +0000 (16:43 -0400)]
lib: add stream_rewind_getp()

stream_forward_getp() cannot be used with negative numbers due to the
size_t argument, we'll end up doing overflow arithmetic.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: fix asserting read of localpref
Quentin Young [Thu, 3 Sep 2020 18:10:33 +0000 (14:10 -0400)]
bgpd: fix asserting read of localpref

Attribute may not be long enough to contain a localpref value, resulting
in an assert on stream size. Gracefully handle this case instead.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: fix mplsvpn nlri garbage heap read
Quentin Young [Thu, 3 Sep 2020 17:22:17 +0000 (13:22 -0400)]
bgpd: fix mplsvpn nlri garbage heap read

NLRI parsing for mpls vpn was missing several length checks that could
easily result in garbage heap reads past the end of nlri->packet.

Convert the whole function to use stream APIs for automatic bounds
checking...

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6926 from kuldeepkash/dynamic_route_leak
Martin Winter [Thu, 3 Sep 2020 17:03:22 +0000 (19:03 +0200)]
Merge pull request #6926 from kuldeepkash/dynamic_route_leak

tests: Add bgp_vrf_dynamic_route_leak test suite

4 years agoospf6d: fix SA warning
Mark Stapp [Thu, 3 Sep 2020 16:57:36 +0000 (12:57 -0400)]
ospf6d: fix SA warning

Fix an SA issue in ospf6_interface.c.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: remove unused stream_get_data api
Mark Stapp [Thu, 3 Sep 2020 16:37:55 +0000 (12:37 -0400)]
lib: remove unused stream_get_data api

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: show < ip > bgp < ipv4 | ipv6 > all
Madhuri Kuruganti [Thu, 30 Jul 2020 15:19:09 +0000 (20:49 +0530)]
bgpd: show < ip > bgp < ipv4 | ipv6 > all

This commit
=> provides "all" option, to display the table entries for all(or specific) AFI/SAFIs.
=> Also introduced "show_flags" to avoid passing multiple arguments(use_json, wide, all)
   to functions

1. show <ip> bgp <ipv4/ipv6> <all> <wide|json>
2. show <ip> bgp <ipv4/ipv6> <all> summary <json>
3. show <ip> bgp <ipv4/ipv6> <all> cidr-only <wide|json>
4. show <ip> bgp <ipv4/ipv6> <all> community <wide|json>
5. show <ip> bgp <ipv4/ipv6> <all> dampening <dampened-paths|flap-statistics|parameters> <wide|json>
6. show <ip> bgp <ipv4/ipv6> <all> neighbors A.B.C.D advertised-routes|filtered-routes|received-routes <wide|json>

show bgp all summary            == show ip bgp all summary      => output is same => display entries for all AFIs and for each SAFI.
show bgp ipv4 all summary       == show ip bgp ipv4 all summary => output is same => display entries for each SAFI in AFI_IP
show bgp ipv6 all summary       == show ip bgp ipv6 all summart => output is same => display entries for each SAFI in AFI_IP6

similarly for all other commands.

sample output
1. show <ip> bgp <ipv4/ipv6> <all> <wide|json>

router# show ip bgp all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#

router# show ip bgp ipv4 all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths
router#

router#
router# show ip bgp ipv6 all wide

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#

router# show bgp all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#
router#

router# show bgp ipv4 all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths
router#

router# show bgp ipv6 all wide

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#

Router1# show bgp all dampening parameters

For address family: IPv4 Unicast
Half-life time: 15 min
Reuse penalty: 750
Suppress penalty: 2000
Max suppress time: 60 min
Max suppress penalty: 12000

For address family: IPv4 Multicast
Half-life time: 20 min
Reuse penalty: 1000
Suppress penalty: 10000
Max suppress time: 40 min
Max suppress penalty: 4000

For address family: IPv4 VPN
dampening not enabled for IPv4 VPN

For address family: IPv4 Encap
dampening not enabled for IPv4 Encap

For address family: IPv4 Labeled Unicast
dampening not enabled for IPv4 Labeled Unicast

For address family: IPv4 Flowspec
dampening not enabled for IPv4 Flowspec

For address family: IPv6 Unicast
dampening not enabled for IPv6 Unicast

For address family: IPv6 Multicast
Half-life time: 10 min
Reuse penalty: 1500
Suppress penalty: 15000
Max suppress time: 20 min
Max suppress penalty: 6000

For address family: IPv6 VPN
dampening not enabled for IPv6 VPN

For address family: IPv6 Encap
dampening not enabled for IPv6 Encap

For address family: IPv6 Labeled Unicast
dampening not enabled for IPv6 Labeled Unicast

For address family: IPv6 Flowspec
dampening not enabled for IPv6 Flowspec

For address family: L2VPN EVPN
dampening not enabled for L2VPN EVPN
router#

bgpd: all option with json-c apis used

Replaced vty_out with json-c wrapper functions for all option
support to show <ip> bgp commands

Sample output:
Router2# show bgp all json
{
"ipv4Unicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 8,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": { "128.16.16.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"128.16.16.0",
    "prefixLen":24,
    "network":"128.16.16.0\/24",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"130.130.0.0/16": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"130.130.0.0",
    "prefixLen":16,
    "network":"130.130.0.0\/16",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"192.168.50.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"192.168.50.0",
    "prefixLen":24,
    "network":"192.168.50.0\/24",
    "metric":0,
    "weight":0,
    "peerId":"10.10.20.3",
    "path":"3",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"10.10.20.3",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"200.200.200.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"200.200.200.0",
    "prefixLen":24,
    "network":"200.200.200.0\/24",
    "metric":0,
    "weight":0,
    "peerId":"10.10.10.1",
    "path":"1",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"10.10.10.1",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] } }
,
"ipv4Multicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 0,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": {  } }
,
"ipv4Flowspec":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 0,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": {  } }
,
"ipv6Unicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 11,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": { "2001:db8::2/128": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"2001:db8::2",
    "prefixLen":128,
    "network":"2001:db8::2\/128",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"::",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global",
        "used":true
      }
    ]
  }
],"2001:db8::3/128": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"2001:db8::3",
    "prefixLen":128,
    "network":"2001:db8::3\/128",
    "metric":0,
    "weight":0,
    "peerId":"10.10.20.3",
    "path":"3",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"2001:db8:0:20::3",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global"
      },
      {
        "ip":"fe80::a00:27ff:fe76:6738",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"link-local",
        "used":true
      }
    ]
  }
],"2001:db8:0:20::/64": [
  {
    "valid":true,
    "pathFrom":"external",
    "prefix":"2001:db8:0:20::",
    "prefixLen":64,
    "network":"2001:db8:0:20::\/64",
    "metric":0,
    "weight":0,
    "peerId":"10.10.20.3",
    "path":"3",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"2001:db8:0:20::3",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global"
      },
      {
        "ip":"fe80::a00:27ff:fe76:6738",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"link-local",
        "used":true
      }
    ]
  },
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"2001:db8:0:20::",
    "prefixLen":64,
    "network":"2001:db8:0:20::\/64",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"::",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global",
        "used":true
      }
    ]
  }
] } }
,
"ipv6Multicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 0,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": {  } }
}
Router2#

Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
4 years agotests: Reduce run time of bgp_l3vpn_to_bgp_vrf
Donald Sharp [Thu, 3 Sep 2020 14:52:54 +0000 (10:52 -0400)]
tests: Reduce run time of bgp_l3vpn_to_bgp_vrf

Reduces run time of the bgp_l3vpn_to_bgp_vrf topotests
from ~118 seconds to ~87 seconds by reducing hello timers
in bgp and ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce bfd-topo2 run time
Donald Sharp [Thu, 3 Sep 2020 14:39:19 +0000 (10:39 -0400)]
tests: Reduce bfd-topo2 run time

Reduce run time of bfd-topo2 from ~62 seconds to ~33 seconds
by modifying the hello/dead intervals for both ospf and ospfv3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce ldp-oc-acl-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 14:31:09 +0000 (10:31 -0400)]
tests: Reduce ldp-oc-acl-topo1 run time

Reduce the ldp-oc-acl-topo1 test run time from ~69 seconds
to ~39 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce bgp-evpn-vxlan-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 14:23:28 +0000 (10:23 -0400)]
tests: Reduce bgp-evpn-vxlan-topo1 run time

Reduce the runtime from ~82 seconds to ~51 seconds by
reducing hello/hold timers for both bgp and ospf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce ospf-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 14:14:22 +0000 (10:14 -0400)]
tests: Reduce ospf-topo1 run time

Reduce run time from ~114 seconds to ~55 seconds by
configuring hello/dead interval timers for ospf and ospfv3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce bgp_l3vpn_to_bgp_direct run time
Donald Sharp [Thu, 3 Sep 2020 13:59:11 +0000 (09:59 -0400)]
tests: Reduce bgp_l3vpn_to_bgp_direct run time

Reduce run time from ~76 seconds to ~47 seconds by modifying
both bgp and ospf timers to be more aggressive

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce ldp-vpls-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 13:34:19 +0000 (09:34 -0400)]
tests: Reduce ldp-vpls-topo1 run time

Reduce this tests run time from ~76 seconds to ~49 seconds
by decreasing the hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Speedup bgp_rfapi_basic_sanity run
Donald Sharp [Thu, 3 Sep 2020 13:20:12 +0000 (09:20 -0400)]
tests: Speedup bgp_rfapi_basic_sanity run

Decrease run time from ~70 seconds to ~41 seconds by
reducing hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Speedup bfd-profiles-topo1 runtime
Donald Sharp [Thu, 3 Sep 2020 13:09:20 +0000 (09:09 -0400)]
tests: Speedup bfd-profiles-topo1 runtime

Decrease run time from ~70 seconds to ~60 seconds
by modifying the hello/dead interval interface timers
in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Decrease ospf-sr-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 13:02:43 +0000 (09:02 -0400)]
tests: Decrease ospf-sr-topo1 run time

Reduce ospf-sr-topo1 run time from ~60 seconds to ~30 seconds
by shortening the hello and dead timers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: ospf-topo2 speed up
Donald Sharp [Wed, 2 Sep 2020 20:23:54 +0000 (16:23 -0400)]
tests: ospf-topo2 speed up

Modify ospf hello/dead timers to speed up run time from ~25 seconds to
~17 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Modify ldp-oc-topo1 to run faster
Donald Sharp [Wed, 2 Sep 2020 20:16:48 +0000 (16:16 -0400)]
tests: Modify ldp-oc-topo1 to run faster

Convert run times by lowering hello/dead interval timers to
smaller values from ~66 seconds to ~36 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Speedup ldp-topo1 tests
Donald Sharp [Wed, 2 Sep 2020 20:07:15 +0000 (16:07 -0400)]
tests: Speedup ldp-topo1 tests

These ospf timer changes, speed up convergence from ~85 seconds to
~40 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #7043 from donaldsharp/bgp_features_speedup
Mark Stapp [Thu, 3 Sep 2020 12:14:46 +0000 (08:14 -0400)]
Merge pull request #7043 from donaldsharp/bgp_features_speedup

tests: Speed up bgp_features topotests by a lot

4 years agoospfd: install Type-7 when NSSA enabled after redistribution
Alexander Chernavin [Tue, 25 Aug 2020 09:50:39 +0000 (05:50 -0400)]
ospfd: install Type-7 when NSSA enabled after redistribution

If NSSA is enabled before redistribution is configured, Type-7 LSA's
are installed. But if NSSA is enabled after redistribution is
configured, Type-7 LSAs are missing.

With this change, when NSSA is enabled, scan for external LSA's and
if they exist, install Type-7.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
4 years agoMerge pull request #6987 from Niral-Networks/acl_fix
Santosh P K [Thu, 3 Sep 2020 04:21:21 +0000 (09:51 +0530)]
Merge pull request #6987 from Niral-Networks/acl_fix

lib, ospf : Fix when redist is performed with route-map using access-list

4 years agolib: remove overflow arithmetic from hash stats
Quentin Young [Wed, 2 Sep 2020 20:02:55 +0000 (16:02 -0400)]
lib: remove overflow arithmetic from hash stats

Signed values get converted to unsigned for addition, so when the value
to adjust a stats variable for hash tables was negative this resulted in
overflow arithmetic, which we generally don't want.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: make flag values explicitly unsigned
Quentin Young [Wed, 2 Sep 2020 19:11:26 +0000 (15:11 -0400)]
bgpd: make flag values explicitly unsigned

When using these flag #defines, by default their types are integers but
they are always used in conjunction with unsigned integers, which
introduces some implicit conversions that really ought to be avoided.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>