]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #7856 from patrasar/2555301
Donald Sharp [Tue, 19 Jan 2021 19:48:06 +0000 (14:48 -0500)]
Merge pull request #7856 from patrasar/2555301

Fix leak in pim_jp_agg_single_upstream_send()

3 years agoMerge pull request #7233 from donaldsharp/route_map_optimizations
Mark Stapp [Tue, 19 Jan 2021 18:20:02 +0000 (13:20 -0500)]
Merge pull request #7233 from donaldsharp/route_map_optimizations

Route map optimizations

3 years agoMerge pull request #7888 from donaldsharp/1_19_coverity
Mark Stapp [Tue, 19 Jan 2021 17:42:49 +0000 (12:42 -0500)]
Merge pull request #7888 from donaldsharp/1_19_coverity

lib: Fix up str2prefix usage in lua code

3 years agoMerge pull request #7655 from ckishimo/area
Olivier Dugeon [Tue, 19 Jan 2021 16:29:39 +0000 (17:29 +0100)]
Merge pull request #7655 from ckishimo/area

ospfd: fix area removal at interface level

3 years agoMerge pull request #7723 from AnuradhaKaruppiah/fdb-ext-attrs
Patrick Ruddy [Tue, 19 Jan 2021 16:27:54 +0000 (16:27 +0000)]
Merge pull request #7723 from AnuradhaKaruppiah/fdb-ext-attrs

zebra: move from NDA_NOTIFY to NDA_FDB_EXT_ATTRS

3 years agoMerge pull request #7781 from chiragshah6/evpn_dev
Russ White [Tue, 19 Jan 2021 16:26:34 +0000 (11:26 -0500)]
Merge pull request #7781 from chiragshah6/evpn_dev

[yang,bgpd]  convert neighbor prefix-list and route-map to transactional clis

3 years agolib: Fix up str2prefix usage in lua code
Donald Sharp [Tue, 19 Jan 2021 14:29:50 +0000 (09:29 -0500)]
lib: Fix up str2prefix usage in lua code

Two new coverity issues from inclusion of new lua code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7886 from volta-networks/master
Donald Sharp [Tue, 19 Jan 2021 14:12:30 +0000 (09:12 -0500)]
Merge pull request #7886 from volta-networks/master

pathd: add meaningful names to threads

3 years agoMerge pull request #7840 from pguibert6WIND/bfd_misc_fixes_vrflite
Rafael Zalamena [Tue, 19 Jan 2021 13:10:04 +0000 (10:10 -0300)]
Merge pull request #7840 from pguibert6WIND/bfd_misc_fixes_vrflite

Bfd misc fixes

3 years agoMerge pull request #7863 from chiragshah6/mdev
Russ White [Tue, 19 Jan 2021 12:48:28 +0000 (07:48 -0500)]
Merge pull request #7863 from chiragshah6/mdev

[yang,staticd]: remove when condition from static nexthop om

3 years agoMerge pull request #7884 from donaldsharp/null_stuff
Russ White [Tue, 19 Jan 2021 12:44:21 +0000 (07:44 -0500)]
Merge pull request #7884 from donaldsharp/null_stuff

Null stuff

3 years agoMerge pull request #6455 from GalaxyGorilla/bfd_ospf_topotest
Russ White [Tue, 19 Jan 2021 12:39:05 +0000 (07:39 -0500)]
Merge pull request #6455 from GalaxyGorilla/bfd_ospf_topotest

tests: Introduce BFD OSPFv2/v3 topotests

3 years agoMerge pull request #7639 from qlyoung/frr-lua
Russ White [Tue, 19 Jan 2021 12:17:03 +0000 (07:17 -0500)]
Merge pull request #7639 from qlyoung/frr-lua

Scripting

3 years agopathd: add meaningful names to threads
Javier Garcia [Tue, 19 Jan 2021 10:42:48 +0000 (11:42 +0100)]
pathd: add meaningful names to threads

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agolib: Correctly set temp file permissions
Donald Sharp [Mon, 18 Jan 2021 14:32:00 +0000 (09:32 -0500)]
lib: Correctly set temp file permissions

Set the temp file permissions to limit who can read
the file.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Use uint32_t for size value instead of int in ecommunity struct
Donald Sharp [Sun, 17 Jan 2021 21:08:03 +0000 (16:08 -0500)]
bgpd: Use uint32_t for size value instead of int in ecommunity struct

The `struct ecommunity` structure is using an int for a size value.
Let's switch it over to a uint32_t for size values since a size
value for data can never be negative.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Tell SA that we are intentionally ignoring the return
Donald Sharp [Sun, 17 Jan 2021 12:51:09 +0000 (07:51 -0500)]
zebra: Tell SA that we are intentionally ignoring the return

Calling fpm_nl_enqueue we should expect a it fit or not
return value on the outgoing stream.  This is not necessary
to check here because the while loop where we are checking this
already has ensured that the data being written will fit.

CID -> 1499854
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopbrd: Prevent possible NULL use
Donald Sharp [Sun, 17 Jan 2021 12:48:20 +0000 (07:48 -0500)]
pbrd: Prevent possible NULL use

the pnhi data structure can receive either a interface or a
nhr data structure.  Ensure that we don't crash.

CID -> 1500586
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: attr is already derefed cannot be null here
Donald Sharp [Sun, 17 Jan 2021 12:43:44 +0000 (07:43 -0500)]
bgpd: attr is already derefed cannot be null here

In the function bgp_adj_out_set_subgroup, the attr pointer
is already derefed in all paths leading to a test for NULL.
You cannot pass a NULL attribute in since the whole function
would just immediately crash.

CID -> 1500604
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7790 from mobash-rasool/ospfv3-max-path
Donald Sharp [Mon, 18 Jan 2021 11:44:18 +0000 (06:44 -0500)]
Merge pull request #7790 from mobash-rasool/ospfv3-max-path

ospfd: Clear ip ospf process and clear ip ospf neighbor

3 years agoMerge pull request #7874 from donaldsharp/more_pytest_mark
Donatas Abraitis [Mon, 18 Jan 2021 08:12:24 +0000 (10:12 +0200)]
Merge pull request #7874 from donaldsharp/more_pytest_mark

More pytest mark

3 years agoMerge pull request #7873 from donaldsharp/bgp_gtsm_peer_group_fix
Donatas Abraitis [Mon, 18 Jan 2021 08:10:51 +0000 (10:10 +0200)]
Merge pull request #7873 from donaldsharp/bgp_gtsm_peer_group_fix

bgpd: Allow peer-groups to have `ttl-security hops` configured

3 years agoMerge pull request #7882 from donaldsharp/keepalive_default
Martin Winter [Sun, 17 Jan 2021 19:49:51 +0000 (20:49 +0100)]
Merge pull request #7882 from donaldsharp/keepalive_default

tests: Set default timers to 3/10 for bgp using create_router_bgp

3 years agoMerge pull request #7881 from logbob0401/correct_sysrepo_lib_name
Donald Sharp [Sat, 16 Jan 2021 15:21:03 +0000 (10:21 -0500)]
Merge pull request #7881 from logbob0401/correct_sysrepo_lib_name

Correct sysrepo library name in configure.ac

3 years agotests: Set default timers to 3/10 for bgp using create_router_bgp
Donald Sharp [Sat, 16 Jan 2021 13:29:49 +0000 (08:29 -0500)]
tests: Set default timers to 3/10 for bgp using create_router_bgp

Tests were timing out in our test system due to lost packets and
flakiness of the lower end systems.  Just set the timers to 3/10
and give them plenty of time to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoconfigure.ac: Correct library name for sysrepo
Bo Zhang [Sat, 16 Jan 2021 05:38:18 +0000 (21:38 -0800)]
configure.ac: Correct library name for sysrepo

Northbound_sysrepo: Correct sysrepo library name in configure.ac

Signed-off-by: Bo Zhang <logbob0401@gmail.com>
3 years agozebra: A `zebra route-map delay-timer 0` command should still run the route-map
Donald Sharp [Fri, 15 Jan 2021 21:28:15 +0000 (16:28 -0500)]
zebra: A `zebra route-map delay-timer 0` command should still run the route-map

Setting `zebra route-map delay-timer 0` completely turns of any
route-map processing in zebra.  Which is completely wrong.  A timer
of 0 means `do it now`.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Modify zebra_rib tests to include some basic route-map tests
Donald Sharp [Thu, 1 Oct 2020 22:24:01 +0000 (18:24 -0400)]
tests: Modify zebra_rib tests to include some basic route-map tests

New test does this:
a) Ensures that we run the correct number of times given two
`ip protocol X` commands( ie we do not run the route-map application
against all routes, only those affected )
b) Ensure that when we modify the route-map the state ends up sane
this includes making a static route depend on a sharp route that
gets removed from the change of the sharp route-map
c) Ensure that the kernel routes are correct.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Push timer out if another route-map change comes in for zebra
Donald Sharp [Fri, 9 Oct 2020 15:41:21 +0000 (11:41 -0400)]
zebra: Push timer out if another route-map change comes in for zebra

If we are running with a delayed timer to handle route-map changes
in zebra, if another route-map change is made to the cli, push
out the timer instead of not modifying the timer.  This will
allow a large set of route-maps to be possibly be read in by
the system and we don't have a state where new route-map
changes are being read in and having the timer pop in
the middle of it.

Additionally convert to use THREAD_OFF, preventing a possible
use after free as well as aligning the thread api usage
with what we consider correct.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Limit routemap changes to reconsider only routes associated with that rm
Donald Sharp [Thu, 1 Oct 2020 15:18:45 +0000 (11:18 -0400)]
zebra: Limit routemap changes to reconsider only routes associated with that rm

Current code when a route map changes schedules a rerun of all routes in the
particular table.  So if you modify the `ip protocol XX route-map FOO`
route-map `FOO` all routes will be rechecked.  This is extremely expensive.

Modify zebra to only update the routes associated with the route-map.  So
if we have 800k bgp routes and 50 ospf routes and we are route-map'ing
the ospf routes we'll only look at 50 routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Allow rib_update_table to receive a specified route type
Donald Sharp [Thu, 1 Oct 2020 13:54:53 +0000 (09:54 -0400)]
zebra: Allow rib_update_table to receive a specified route type

When we need to cause a reprocessing of data the code currently
marks all routes as needing to be looked at.  Modify the
rib_update_table code to allow us to specify a specific route
type we only want to reprocess.  At this point none
of the code is behaving differently this is just setup
for a future code change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: remove unused function rib_update_vrf
Donald Sharp [Thu, 1 Oct 2020 15:19:49 +0000 (11:19 -0400)]
zebra: remove unused function rib_update_vrf

The function rib_update_vrf is never used.  Remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Keep track of route-map applications per section
Donald Sharp [Fri, 2 Oct 2020 11:18:58 +0000 (07:18 -0400)]
lib: Keep track of route-map applications per section

When the routemap code was rewritten for performance the
code to track the number of times a particular section of
a route-map was applied was not correctly updated.  In
this case I found another sequence of events where the
number of times a section was invoked was not being correctly
kept.

Effectively in this case when route_map_get_index is called
and returns an index the route map has been applied( see that
skip_match_clause is set to true and then in the for loop
below the skip_match_clause is tested and index->applied is
incremented.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: Document the "zebra route-map delay-timer" functionality
Donald Sharp [Fri, 2 Oct 2020 11:46:00 +0000 (07:46 -0400)]
doc: Document the "zebra route-map delay-timer" functionality

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7878 from opensourcerouting/ldpd-metric-issue
Donald Sharp [Fri, 15 Jan 2021 23:24:38 +0000 (18:24 -0500)]
Merge pull request #7878 from opensourcerouting/ldpd-metric-issue

ldpd: fix sporadic failures in the ldp-topo1 topotest

3 years agoMerge pull request #7875 from deastoe/fpm-nlmsg-pid
Mark Stapp [Fri, 15 Jan 2021 21:28:46 +0000 (16:28 -0500)]
Merge pull request #7875 from deastoe/fpm-nlmsg-pid

zebra: set nlmsg_pid in netlink msgs sent by 'fpm'

3 years agoldpd: fix sporadic failures in the ldp-topo1 topotest
Renato Westphal [Fri, 15 Jan 2021 15:04:24 +0000 (12:04 -0300)]
ldpd: fix sporadic failures in the ldp-topo1 topotest

Commit 220e848cc5 introduced an optimization that would prevent ldpd
from sending redundant label mappings when it receives notifications
from zebra about routes that didn't effectively change (such
notifications can happen under certain circumstances).

The problem is that that commit didn't take into account the metric
of the received routes, so it would dismiss a notification of a
route with a better metric taking the place of another route in the
RIB, preventing the newly selected route from receiving the label
mappings it needs.

Revert 220e848cc5 temporarily to fix sporadic failures in the CI
system until we have a better solution.

Debugged-by: Lynne Morrison lynne@voltanet.io
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agozebra: set nlmsg_pid in netlink msgs sent by 'fpm'
Duncan Eastoe [Fri, 15 Jan 2021 16:06:17 +0000 (16:06 +0000)]
zebra: set nlmsg_pid in netlink msgs sent by 'fpm'

Use nl_pid from the netlink socket used for programming the kernel
(netlink_dplane) in netlink route messages sent by the 'fpm' module.

This makes 'fpm' consistent with 'dplane_fpm_nl' which already
behaves this way, and allows FPM server implementations to determine
route origin via nlmsg_pid.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7844 from vishaldhingra/static
Mark Stapp [Fri, 15 Jan 2021 14:35:12 +0000 (09:35 -0500)]
Merge pull request #7844 from vishaldhingra/static

staticd: correct table-id handling for static routes.

3 years agotests: Add `pytest.mark.pbr`
Donald Sharp [Fri, 15 Jan 2021 14:18:59 +0000 (09:18 -0500)]
tests: Add `pytest.mark.pbr`

Add a mark to topotests that mark pbr tests

`pytest -k pbr`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add `pytest.mark.isis`
Donald Sharp [Fri, 15 Jan 2021 14:17:53 +0000 (09:17 -0500)]
tests: Add `pytest.mark.isis`

Add a mark to topotests that mark isis tests

`pytest -k isis`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add `pytest.mark.bfd`
Donald Sharp [Fri, 15 Jan 2021 13:58:24 +0000 (08:58 -0500)]
tests: Add `pytest.mark.bfd`

Add a mark to topotests that mark bfd tests.

`pytest -k bfd`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7870 from donaldsharp/pytest_marking
Mark Stapp [Fri, 15 Jan 2021 13:44:51 +0000 (08:44 -0500)]
Merge pull request #7870 from donaldsharp/pytest_marking

tests: Start the ability to mark tests

3 years agobgpd: Allow peer-groups to have `ttl-security hops` configured
Donald Sharp [Fri, 15 Jan 2021 13:14:49 +0000 (08:14 -0500)]
bgpd: Allow peer-groups to have `ttl-security hops` configured

The command `neighbor PGROUP ttl-security hops X` was being
accepted but ignored.  Allow it to be stored.  I am still
not sure that this is applied correctly, but that is another
problem.

Fixes: #7848
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7872 from ton31337/feature/topotests_for_peer-groups
Donald Sharp [Fri, 15 Jan 2021 13:24:13 +0000 (08:24 -0500)]
Merge pull request #7872 from ton31337/feature/topotests_for_peer-groups

tests: Check if peer-group is working in topotests

3 years agoMerge pull request #7868 from mjstapp/fix_fpm_conn_up
Donald Sharp [Fri, 15 Jan 2021 11:55:29 +0000 (06:55 -0500)]
Merge pull request #7868 from mjstapp/fix_fpm_conn_up

zebra: don't set connection-up event pointer directly

3 years agotests: Check if peer-group is working in topotests
Donatas Abraitis [Tue, 12 Jan 2021 14:12:17 +0000 (16:12 +0200)]
tests: Check if peer-group is working in topotests

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7867 from dewi-morgan/bgp-max-prefix-overflow-clear
Donatas Abraitis [Fri, 15 Jan 2021 07:30:56 +0000 (09:30 +0200)]
Merge pull request #7867 from dewi-morgan/bgp-max-prefix-overflow-clear

bgpd: clear max prefix overflow on de-config

3 years agoMerge pull request #7869 from donaldsharp/peer_group
Donatas Abraitis [Fri, 15 Jan 2021 07:19:15 +0000 (09:19 +0200)]
Merge pull request #7869 from donaldsharp/peer_group

bgpd: Temp fix to allow numbered peers to be part of a peer group

3 years agopimd: fix multiple memory leak
Sarita Patra [Tue, 12 Jan 2021 11:57:33 +0000 (03:57 -0800)]
pimd: fix multiple memory leak

Memleak: pim_jp_agg_single_upstream_send(), static variable are not
released.

Signed-off-by: Sarita Patra <saritap@vmware.com>
3 years agotests: Start the ability to mark tests
Donald Sharp [Fri, 15 Jan 2021 01:29:14 +0000 (20:29 -0500)]
tests: Start the ability to mark tests

Add the ability for our topotests to take advantage of pytest `mark`ing.
This effectively allows you to tell pytest to run against certain sets
of tests.  For a demonstration purpose I've added in marks for:
babel
eigrp
ldp
ospf
pim
rip

And setup tests to run against those tests that only test those protocols.

You can run against eigrp tests by running `pytest -k eigrp`
Other combinations are also available based upon simple boolean logic.
Just read the pytest.mark documentation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Temp fix to allow numbered peers to be part of a peer group
Donald Sharp [Thu, 14 Jan 2021 20:51:39 +0000 (15:51 -0500)]
bgpd: Temp fix to allow numbered peers to be part of a peer group

Talking w/ Chirag and he indicated that we can just backout the command
to the original and things would `work` and they do( at least a quick test does )

Put this in place until a proper fix can be done.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7866 from kishorekunal01/fpm_dump_issue
Mark Stapp [Thu, 14 Jan 2021 19:13:31 +0000 (14:13 -0500)]
Merge pull request #7866 from kishorekunal01/fpm_dump_issue

zebra: Scale setup RMAC is send multiple time to fpm

3 years agozebra: don't set connection-up event pointer directly
Mark Stapp [Thu, 14 Jan 2021 19:09:14 +0000 (14:09 -0500)]
zebra: don't set connection-up event pointer directly

Use thread_cancel to reset the connection-up processing timer.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7821 from donaldsharp/evpn_flag_dump
Mark Stapp [Thu, 14 Jan 2021 18:02:21 +0000 (13:02 -0500)]
Merge pull request #7821 from donaldsharp/evpn_flag_dump

Evpn flag dump

3 years agozebra: Scale setup RMAC is send multiple time to fpm
Kishore Kunal [Wed, 13 Jan 2021 22:16:34 +0000 (22:16 +0000)]
zebra: Scale setup RMAC is send multiple time to fpm

Thread zfpm_conn_up_thread_cb can Yield and send RMAC multiple
times to FPM.

Signed-off-by: Kishore Kunal <kishorekunal01@broadcom.com>
3 years agoMerge pull request #7712 from dslicenc/frr-reload-prefix-list-acl
Mark Stapp [Thu, 14 Jan 2021 14:11:30 +0000 (09:11 -0500)]
Merge pull request #7712 from dslicenc/frr-reload-prefix-list-acl

tools: ignore missing seq nums in prefix and access lists in frr-relo…

3 years agobgpd: clear max prefix overflow on de-config
Dewi Morgan [Thu, 14 Jan 2021 14:01:26 +0000 (14:01 +0000)]
bgpd: clear max prefix overflow on de-config

A bgp neighbor remains in Idle state in the event that the number
of received prefixes exceeds the configured maximum prefix for the
neighbor. The neighbor remains in idle state even after de-configuring
the maximum prefix limit for the neighbor.

The fix is to clear the neighbor overflow state if set, after
de-configuring the neighbor maximum-prefix commnd.

This allows the neighbor to establish without having to perform a
clear operation. It also avoids the misleading neigbor summary
indicating that the neighbor is in prefix overflow state (PfxCt)
when no limit is configured for the neighbor.

Signed-off-by: Dewi Morgan <dewi.morgan@intl.att.com>
3 years agoMerge pull request #7746 from donaldsharp/eigrp_cleanup
Russ White [Wed, 13 Jan 2021 18:53:55 +0000 (13:53 -0500)]
Merge pull request #7746 from donaldsharp/eigrp_cleanup

Eigrp cleanup

3 years agoMerge pull request #7837 from ckishimo/tests_ospf
Donald Sharp [Wed, 13 Jan 2021 18:31:32 +0000 (13:31 -0500)]
Merge pull request #7837 from ckishimo/tests_ospf

tests: fix redistribute key in ospf tests

3 years agozebra: in zebra_evpn_mac.c use size_t for buffer length
Donald Sharp [Wed, 6 Jan 2021 13:40:16 +0000 (08:40 -0500)]
zebra: in zebra_evpn_mac.c use size_t for buffer length

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Create a dump function for mac->flags and use it
Donald Sharp [Wed, 6 Jan 2021 13:37:52 +0000 (08:37 -0500)]
zebra: Create a dump function for mac->flags and use it

Create a function that can dump the mac->flags in human readable
output and convert all debugs to use it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Create function to dump MACIP flags
Donald Sharp [Tue, 5 Jan 2021 23:25:10 +0000 (18:25 -0500)]
zebra: Create function to dump MACIP flags

Create a function to dump MACIP flags and to use it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7819 from donaldsharp/more_data_for_debug_dumps
Mark Stapp [Wed, 13 Jan 2021 18:06:23 +0000 (13:06 -0500)]
Merge pull request #7819 from donaldsharp/more_data_for_debug_dumps

zebra: Add ability to display human readable format re->flags and status

3 years agostaticd: handle when condition check in nb callbacks
Chirag Shah [Wed, 13 Jan 2021 17:02:32 +0000 (09:02 -0800)]
staticd: handle when condition check in nb callbacks

At present, libyang validate api takes longer time to complete
for a transaction to complete if the same config is re-applied.
For instance if set of static routes are reapplied the config
completion takes longer than it took initial time.

One of the solution is to remove when statement from staticd nexthop yang OM.
When condition adds peformance toll on libyang's validate api.
The same when condition checks are done in frr northbound
validation phase (which are must faster).

With this change, if the same static routes are configured
agian and again, the time to completion does not go up and
perfomance does not degrade.

Ticket:CM-32530
Testing Done:

Configure 400 static routes across two vrfs and keep re-applying them.
The time to complete the config remains in few seconds.

Before:
root@bharat:~/stash/frr4# time vtysh -f static_route_cfg

real    0m19.877s
user    0m0.263s
sys 0m0.014s

After:
root@bharat:~/stash/frr4# time vtysh -f static_route_cfg

real    0m3.857s
user    0m0.239s
sys 0m0.034s

Co-developed-by: VishalDhingra <vdhingra@vmware.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoyang: remove when condition from static nexthop om
Chirag Shah [Wed, 13 Jan 2021 16:41:25 +0000 (08:41 -0800)]
yang: remove when condition from static nexthop om

Remove when conditions from the yang OM as it degrades
the performance in libyang.
Instead do the same when conditional check in frr northbound
validate phase. Reject the config if condiion do not meet.

Ticket:CM-32530
Testing Done:

Co-developed-by: VishalDhingra <vdhingra@vmware.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #7818 from donaldsharp/ip_proto_denied
Mark Stapp [Wed, 13 Jan 2021 15:33:33 +0000 (10:33 -0500)]
Merge pull request #7818 from donaldsharp/ip_proto_denied

zebra: notify installing protocol when nexthops cannot be resolved

3 years agozebra: Add ability to display in human readable format re->flags and status
Donald Sharp [Tue, 5 Jan 2021 22:21:20 +0000 (17:21 -0500)]
zebra: Add ability to display in human readable format re->flags and status

The re->flags and re->status in debugs were being dumped as hex values.
I can never quickly decode this.  Here is an idea.  Let's let FRR do
it for me.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #6853 from mjstapp/fix_rib_dups
Donald Sharp [Wed, 13 Jan 2021 14:42:34 +0000 (09:42 -0500)]
Merge pull request #6853 from mjstapp/fix_rib_dups

zebra: reduce impact of route-update overload

3 years agotools: ignore missing seq nums in prefix and access lists in frr-reload.py
Don Slice [Tue, 12 Jan 2021 16:05:23 +0000 (11:05 -0500)]
tools: ignore missing seq nums in prefix and access lists in frr-reload.py

If frr.conf contains a prefix-list or access-list without a seq number,
frr-reload needs to be aware that it should not delete/add if the running
config contains a seq number.

Ticket: CM-32623
Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agotools: apply black formatting changes to frr-reload.py
Don Slice [Tue, 12 Jan 2021 15:41:17 +0000 (10:41 -0500)]
tools: apply black formatting changes to frr-reload.py

Since new workflow instructions state to run black against
python change and it found formatting changes required that
were not part of my change set, committing those changes
separately.

Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agoMerge pull request #7849 from gpnaveen/static_rte_test
Donatas Abraitis [Wed, 13 Jan 2021 07:09:38 +0000 (09:09 +0200)]
Merge pull request #7849 from gpnaveen/static_rte_test

tests: Static route cases with admin dist and tag.

3 years agoMerge pull request #7861 from mjstapp/fix_dev_doc_index_no
Donatas Abraitis [Wed, 13 Jan 2021 07:07:59 +0000 (09:07 +0200)]
Merge pull request #7861 from mjstapp/fix_dev_doc_index_no

doc: fix several issues, remind about 'no' in cli index statements

3 years agoMerge pull request #7748 from adrianomarto/bgp-listen-on-multiple-addresses
Donatas Abraitis [Wed, 13 Jan 2021 06:57:38 +0000 (08:57 +0200)]
Merge pull request #7748 from adrianomarto/bgp-listen-on-multiple-addresses

BGP daemon listen for connections on multiple addresses

3 years agodoc: fix sphinx warnings
Mark Stapp [Tue, 12 Jan 2021 18:31:07 +0000 (13:31 -0500)]
doc: fix sphinx warnings

Fix a couple of sphinx source processing warnings.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: add missing files to index.rst and subdir.am
Mark Stapp [Tue, 12 Jan 2021 18:30:14 +0000 (13:30 -0500)]
doc: add missing files to index.rst and subdir.am

Some missing doc files, add them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: remind not to include 'no' in cli doc index statements
Mark Stapp [Tue, 12 Jan 2021 18:29:08 +0000 (13:29 -0500)]
doc: remind not to include 'no' in cli doc index statements

Remind folks not to include the 'no' in cli doc index lines.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7707 from opensourcerouting/isisd-rlfa
Olivier Dugeon [Tue, 12 Jan 2021 18:25:15 +0000 (19:25 +0100)]
Merge pull request #7707 from opensourcerouting/isisd-rlfa

isisd, ldpd: add Remote LFA support

3 years agoMerge pull request #7439 from opensourcerouting/bgp-damp-profile2
Donald Sharp [Tue, 12 Jan 2021 16:45:41 +0000 (11:45 -0500)]
Merge pull request #7439 from opensourcerouting/bgp-damp-profile2

bgpd: BGP route-flap dampening profiles for peers and peer groups

3 years agodoc: remove 'no' from doc 'index' lines
Mark Stapp [Tue, 12 Jan 2021 16:34:42 +0000 (11:34 -0500)]
doc: remove 'no' from doc 'index' lines

Index based on the cli commands, not the possible 'no' form.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7247 from ton31337/feature/enhanced_route_refresh_capability
Russ White [Tue, 12 Jan 2021 16:27:11 +0000 (11:27 -0500)]
Merge pull request #7247 from ton31337/feature/enhanced_route_refresh_capability

bgpd: Enhanced Route Refresh capability

3 years agoMerge pull request #7860 from mjstapp/fix_exec_perms
Quentin Young [Tue, 12 Jan 2021 16:26:39 +0000 (11:26 -0500)]
Merge pull request #7860 from mjstapp/fix_exec_perms

libs,nhrpd: remove exec perm

3 years agoMerge pull request #7733 from rgirada/ospf_json
Russ White [Tue, 12 Jan 2021 16:23:03 +0000 (11:23 -0500)]
Merge pull request #7733 from rgirada/ospf_json

ospfd: Adding authentication details to ospf interafce command o/p

3 years agostaticd: Backend cofiguration code to fix table-id problem
vdhingra [Sun, 10 Jan 2021 08:04:45 +0000 (00:04 -0800)]
staticd: Backend cofiguration code to fix table-id problem

problem: table-id gets overwritten for a given route.

RCA: table-id was getting overwritten from the NB layer,
     So route was getting installed with the latest table-id.

Fix: make the table-id as the key in the NB layer.
     This will program the route in zebra correctly.

- Removed the table-id modify callbacks.
- Moved the validate and apply table-id changes to path-list creation

issue #7347

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
3 years agoMerge pull request #7841 from volta-networks/fix_isis_mstyle_routes
Donald Sharp [Tue, 12 Jan 2021 13:51:07 +0000 (08:51 -0500)]
Merge pull request #7841 from volta-networks/fix_isis_mstyle_routes

isisd: ignore routes with incompatible metric style

3 years agoMerge pull request #7850 from mjstapp/build_dplane_plugin
Donald Sharp [Tue, 12 Jan 2021 13:43:53 +0000 (08:43 -0500)]
Merge pull request #7850 from mjstapp/build_dplane_plugin

zebra: build the sample dataplane plugin

3 years agolibs,nhrpd: remove exec perm
Mark Stapp [Tue, 12 Jan 2021 13:20:10 +0000 (08:20 -0500)]
libs,nhrpd: remove exec perm

Some source files got the exec bit set in a recent commit - undo
that.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7687 from gpnaveen/ospf_p2mp
Russ White [Tue, 12 Jan 2021 13:03:33 +0000 (08:03 -0500)]
Merge pull request #7687 from gpnaveen/ospf_p2mp

tests: Adding ospf p2mp basic test.

3 years agoeigrpd: Cleanup eigrp_packet.h to our proper formatting
Donald Sharp [Tue, 12 Jan 2021 12:59:04 +0000 (07:59 -0500)]
eigrpd: Cleanup eigrp_packet.h to our proper formatting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoeigrpd: Introduce eigrp_metric.[ch] and eigrp_types.h
Donnie Savage [Fri, 11 Dec 2020 22:05:59 +0000 (17:05 -0500)]
eigrpd: Introduce eigrp_metric.[ch] and eigrp_types.h

Add these file and introduce some new fundamental types

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie Savage <diivious@hotmail.com>
3 years agoeigrpd: Rename nexthop_entry and prefix_entry to better names
Donnie Savage [Fri, 11 Dec 2020 21:09:47 +0000 (16:09 -0500)]
eigrpd: Rename nexthop_entry and prefix_entry to better names

Rename struct eigrp_nexthop_entry to struct eigrp_route_descriptor
Rename struct eigrp_prefix_entry to struct eigrp_prefix_descriptor

Fix all the associated function names as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie SAvage <diivious@hotmail.com>
3 years agoeigrpd: Create eigrp_yang.h and move stuff around
Donnie Savage [Fri, 11 Dec 2020 20:27:17 +0000 (15:27 -0500)]
eigrpd: Create eigrp_yang.h and move stuff around

Move the prototypes for eigrp_yang that are in eigrpd.h
into eigrp_yang.h.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie Savage <diivious@hotmail.com>
3 years agoeigrpd: Create eigrp_cli.h and move forward declarations
Donnie Savage [Fri, 11 Dec 2020 20:24:02 +0000 (15:24 -0500)]
eigrpd: Create eigrp_cli.h and move forward declarations

Move the forward declarations for eigrp_cli.c from eigrpd.h
into eigrp_cli.h.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie Savage <diivious@hotmail.com>
3 years agoeigrpd: Move `struct eigrp_master` to eigrpd.h
Donnie Savage [Fri, 11 Dec 2020 20:16:58 +0000 (15:16 -0500)]
eigrpd: Move `struct eigrp_master` to eigrpd.h

The `struct eigrp_master` data structure belongs in the
eigrpd.h file.  Move it over, in addition start forward
thinking about the different TLV versions so we can
track them better in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie Savage <diivious@hotmail.com>
3 years agoMerge pull request #7670 from ton31337/fix/bgpd_nexhop_handling_for_zebra
Russ White [Tue, 12 Jan 2021 12:32:19 +0000 (07:32 -0500)]
Merge pull request #7670 from ton31337/fix/bgpd_nexhop_handling_for_zebra

bgpd: Handle IPv6 prefixes with IPv4 nexthops for zebra

3 years agotests: Static route cases with admin dist and tag.
nguggarigoud [Mon, 11 Jan 2021 13:35:05 +0000 (19:05 +0530)]
tests: Static route cases with admin dist and tag.

1. Adding api to verify ip nht command.
2. 5 cases of static routes with admin dist and tag
3. Run time = 89Secs

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agoospfd: deleting ospf process is leading to crash at no_router_ospf
Mobashshera Rasool [Tue, 12 Jan 2021 11:31:17 +0000 (11:31 +0000)]
ospfd: deleting ospf process is leading to crash at no_router_ospf

    Topology diagram:
    -------------------------
          +---+  A0       +---+
          +R1 +------------+R2 |
          +-+-+-           +--++
            |  --        --  |
            |    -- A0 --    |
          A0|      ----      |
            |      ----      | A0
            |    --    --    |
            |  --        --  |
          +-+-+-            +-+-+
          +R0 +-------------+R3 |
          +---+     A0     +---+

    Steps to reproduce:
    --------------------------
    1. Bring up the base config as per the topology
    2. Configure OSPF on all the routers of the topology.
    3. Configure 5 static routes from the same network on R0 , 5 static routes from different networks and redistribute in R0
    4. Configure External Route summary in R0 to summarise 5 routes to one route.
    5. Delete the configured summary
    6. configure the summary again and delete static routes .
    7. Add back static routes.
    8. Configure new static route which is matching the configured summary.
    9. Delete one of the static route.
    10. Configure redistribute connected and configure ospf external summary address to summarise the connected routes.
    11. Clear ospf process and check for any errors.

    [New LWP 2346]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Core was generated by `/usr/lib/frr/ospfd'.
    Program terminated with signal SIGABRT, Aborted.
    54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    (gdb) bt
    0  0x00007f296f278428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
    1  0x00007f296f27a02a in __GI_abort () at abort.c:89
    2  0x00007f296fca4110 in core_handler (signo=11, siginfo=0x7ffcd52044f0, context=<optimized out>) at lib/sigevent.c:254
    3  <signal handler called>
    4  0x000055949b9dfdff in ospf_lsdb_lookup (lsdb=lsdb@entry=0x55949bfd3688, lsa=lsa@entry=0x55949bfe1290) at ospfd/ospf_lsdb.c:179
    5  0x000055949ba28fbe in ospf_ls_retransmit_lookup (lsa=0x55949bfe1290, nbr=0x55949bfd3610) at ospfd/ospf_flood.c:918
    6  ospf_ls_retransmit_delete_nbr_if (oi=oi@entry=0x55949bfd2590, lsa=lsa@entry=0x55949bfe1290) at ospfd/ospf_flood.c:932
    7  0x000055949ba2916b in ospf_ls_retransmit_delete_nbr_if (lsa=0x55949bfe1290, oi=0x55949bfd2590) at ospfd/ospf_flood.c:928
    8  ospf_ls_retransmit_delete_nbr_as (ospf=ospf@entry=0x55949bfbdb30, lsa=lsa@entry=0x55949bfe1290) at ospfd/ospf_flood.c:959
    9  0x000055949b9dcd7e in ospf_discard_from_db (ospf=ospf@entry=0x55949bfbdb30, lsdb=<optimized out>, lsa=lsa@entry=0x55949bfe1630) at ospfd/ospf_lsa.c:2552
    10 0x000055949b9df1b3 in ospf_maxage_lsa_remover (thread=0x55949bfde930) at ospfd/ospf_lsa.c:2848
    11 0x00007f296fcb1770 in thread_call (thread=0x55949bfde930) at lib/thread.c:1557
    12 0x00007f296fcb19d6 in funcname_thread_execute (m=0x55949be0a630, func=func@entry=0x55949b9df0a0 <ospf_maxage_lsa_remover>, arg=arg@entry=0x55949bfbdb30, val=val@entry=0,
        funcname=funcname@entry=0x55949ba31b41 "ospf_maxage_lsa_remover", schedfrom=schedfrom@entry=0x55949ba31917 "ospfd/ospf_lsa.c", fromln=3364) at lib/thread.c:1628
    13 0x000055949b9de90b in ospf_flush_self_originated_lsas_now (ospf=ospf@entry=0x55949bfbdb30) at ospfd/ospf_lsa.c:3364
    14 0x000055949ba19a55 in ospf_process_refresh_data (ospf=0x55949bfbdb30, reset=reset@entry=true) at ospfd/ospfd.c:138
    15 0x000055949ba1aeef in ospf_process_reset (ospf=<optimized out>) at ospfd/ospfd.c:206
    16 0x000055949ba0729b in clear_ip_ospf_process_magic (self=<optimized out>, vty=<optimized out>, argc=<optimized out>, argv=<optimized out>, instance_str=<optimized out>,
        instance=<optimized out>) at ospfd/ospf_vty.c:11930
    17 clear_ip_ospf_process (self=<optimized out>, vty=0x55949bfe2600, argc=<optimized out>, argv=<optimized out>) at ./ospfd/ospf_vty_clippy.c:306
    18 0x00007f296fc66523 in cmd_execute_command_real (vline=vline@entry=0x55949bfd2fb0, vty=vty@entry=0x55949bfe2600, cmd=cmd@entry=0x0, filter=FILTER_RELAXED) at lib/command.c:1060
    19 0x00007f296fc6869a in cmd_execute_command (vline=vline@entry=0x55949bfd2fb0, vty=vty@entry=0x55949bfe2600, cmd=0x0, vtysh=vtysh@entry=0) at lib/command.c:1119
    20 0x00007f296fc68817 in cmd_execute (vty=vty@entry=0x55949bfe2600, cmd=cmd@entry=0x55949bfe7f80 "clear ip ospf pro", matched=matched@entry=0x0, vtysh=vtysh@entry=0)
        at lib/command.c:1275
    21 0x00007f296fcb6c13 in vty_command (vty=vty@entry=0x55949bfe2600, buf=0x55949bfe7f80 "clear ip ospf pro") at lib/vty.c:514
    22 0x00007f296fcb6ea6 in vty_execute (vty=vty@entry=0x55949bfe2600) at lib/vty.c:1281
    23 0x00007f296fcb97f4 in vtysh_read (thread=<optimized out>) at lib/vty.c:2123
    24 0x00007f296fcb1770 in thread_call (thread=thread@entry=0x7ffcd5209590) at lib/thread.c:1557
    25 0x00007f296fc82e78 in frr_run (master=0x55949be0a630) at lib/libfrr.c:1026
    26 0x000055949b9d0f07 in main (argc=1, argv=0x7ffcd52098b8) at ospfd/ospf_main.c:230

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospfd: Clear ip ospf process and clear ip ospf neighbor
Mobashshera Rasool [Wed, 23 Dec 2020 13:20:22 +0000 (13:20 +0000)]
ospfd: Clear ip ospf process and clear ip ospf neighbor

Implement the below 2 CLIs to clear the current data in the process
and neighbor data structure.
1. clear ip ospf process
2. clear ip ospf neighbor

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agotests: move redistribute function into lib
ckishimo [Fri, 8 Jan 2021 15:10:38 +0000 (16:10 +0100)]
tests: move redistribute function into lib

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agotests: fix ospf cosmetic output
ckishimo [Thu, 7 Jan 2021 22:30:32 +0000 (23:30 +0100)]
tests: fix ospf cosmetic output

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>