]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
22 months agoRevert "bgpd: upon if up event, evaluate bnc with matching nexthop" revert-13509-bgp_nht_other_if_cases 13745/head
Donald Sharp [Fri, 9 Jun 2023 03:17:53 +0000 (23:17 -0400)]
Revert "bgpd: upon if up event, evaluate bnc with matching nexthop"

22 months agoMerge pull request #13730 from anlancs/doc/thread-event-typo
Jafar Al-Gharaibeh [Thu, 8 Jun 2023 21:02:59 +0000 (16:02 -0500)]
Merge pull request #13730 from anlancs/doc/thread-event-typo

doc: Adjust event system

22 months agoMerge pull request #13596 from Pdoijode/pdoijode/ospf-intf-json-changes
Jafar Al-Gharaibeh [Thu, 8 Jun 2023 19:03:14 +0000 (14:03 -0500)]
Merge pull request #13596 from Pdoijode/pdoijode/ospf-intf-json-changes

ospfd: json hierarchy change for "show ip ospf interface json"

22 months agoMerge pull request #13509 from pguibert6WIND/bgp_nht_other_if_cases
Donatas Abraitis [Thu, 8 Jun 2023 17:19:48 +0000 (20:19 +0300)]
Merge pull request #13509 from pguibert6WIND/bgp_nht_other_if_cases

bgpd: upon if up event, evaluate bnc with matching nexthop

22 months agoMerge pull request #13664 from routingrocks/pim_nb_fix
Donatas Abraitis [Thu, 8 Jun 2023 17:16:32 +0000 (20:16 +0300)]
Merge pull request #13664 from routingrocks/pim_nb_fix

pimd: Change in PIM northbound error, when a path to RP is not found …

22 months agoMerge pull request #13364 from zmw12306/bfd_auth
Donatas Abraitis [Thu, 8 Jun 2023 17:12:29 +0000 (20:12 +0300)]
Merge pull request #13364 from zmw12306/bfd_auth

bfd: fix missing Authentication in control pkt

22 months agoMerge pull request #13650 from opensourcerouting/feature/bgpd_default_originate_route...
Quentin Young [Thu, 8 Jun 2023 16:05:35 +0000 (12:05 -0400)]
Merge pull request #13650 from opensourcerouting/feature/bgpd_default_originate_route_map_timer

bgpd: Add an ability to control default-originate route-map timer

22 months agoMerge pull request #13645 from idryzhov/bfd-nb-destroy
Christian Hopps [Thu, 8 Jun 2023 15:19:40 +0000 (11:19 -0400)]
Merge pull request #13645 from idryzhov/bfd-nb-destroy

bfdd: remove redundant nb destroy callbacks

22 months agoMerge pull request #13726 from LabNConsulting/chopps/fixpim6topotest
Jafar Al-Gharaibeh [Thu, 8 Jun 2023 13:47:15 +0000 (08:47 -0500)]
Merge pull request #13726 from LabNConsulting/chopps/fixpim6topotest

tests: fixing pim6 topotest bugs

22 months agotests: convert old pim test to more cleanly use pytest fixture 13726/head
Christian Hopps [Thu, 8 Jun 2023 08:12:26 +0000 (04:12 -0400)]
tests: convert old pim test to more cleanly use pytest fixture

This is a good way to run a per-test background helper process. Here the
helper object is created before the test function requesting it (through param
name match), and then cleaned up after the test function exits (pass or failed).

A context manager is used to further guarantee the cleanup is done.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agotests: fixing pim6 topotest bugs
Christian Hopps [Thu, 8 Jun 2023 06:42:32 +0000 (02:42 -0400)]
tests: fixing pim6 topotest bugs

- Remove use of bespoke socat
- Use ipv6 support in mcast-tester.py
- do not run processes in the background behind munet/micronet's
  back with `&` (ever) -- use popen or the helper class

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13421 from mobash-rasool/igmp-ups2
Donatas Abraitis [Thu, 8 Jun 2023 07:46:38 +0000 (10:46 +0300)]
Merge pull request #13421 from mobash-rasool/igmp-ups2

pimd, pim6d: re-arrange some code and pimv6 deletion flow fix

22 months agodoc: Adjust event system 13730/head
anlan_cs [Wed, 7 Jun 2023 09:29:30 +0000 (17:29 +0800)]
doc: Adjust event system

Refer to the latest code, modify the description of event system.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
22 months agoMerge pull request #13390 from ryndia/master
Donatas Abraitis [Thu, 8 Jun 2023 07:02:28 +0000 (10:02 +0300)]
Merge pull request #13390 from ryndia/master

ospfd: ospf_route.c memory leak fix

22 months agotests: mcast-tester.py handles IPv6
Christian Hopps [Thu, 8 Jun 2023 06:11:50 +0000 (02:11 -0400)]
tests: mcast-tester.py handles IPv6

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13624 from Keelan10/bgp_flowspec-leak-fix
Donald Sharp [Wed, 7 Jun 2023 21:36:03 +0000 (17:36 -0400)]
Merge pull request #13624 from Keelan10/bgp_flowspec-leak-fix

bgpd: Free temp memory

22 months agoMerge pull request #11560 from patrasar/fix_pim6_state_on_prune
David Lamparter [Wed, 7 Jun 2023 13:39:45 +0000 (15:39 +0200)]
Merge pull request #11560 from patrasar/fix_pim6_state_on_prune

22 months agopimd, pim6d: Move mld/igmp deletion code to a common api 13421/head
Mobashshera Rasool [Thu, 1 Jun 2023 09:04:44 +0000 (02:04 -0700)]
pimd, pim6d: Move mld/igmp deletion code to a common api

Move the mld/igmp deletion common code to api pim_gm_interface_delete
code for IPv6 deletion(gm_ifp_teardown) for MLD was missing in this flow
Making the code common fixes this too.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agopimd, pim6d: Rename and move api pim_cmd_interface_delete
Mobashshera Rasool [Thu, 1 Jun 2023 08:56:41 +0000 (01:56 -0700)]
pimd, pim6d: Rename and move api pim_cmd_interface_delete

Rename pim_cmd_interface_delete to pim_pim_interface_delete
and move the api to pimd/pim_iface.c

Changed the return type of the api from int to void.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agopimd, pim6d: Move api pim_if_membership_clear
Mobashshera Rasool [Tue, 3 Jan 2023 13:37:34 +0000 (05:37 -0800)]
pimd, pim6d: Move api pim_if_membership_clear

Move pim_if_membership_clear api from pimd/pim_nb_config.c
to pimd/pim_iface.c
Also fixed curly braces warning
WARNING: braces {} are not necessary for single statement blocks
1773: FILE: /tmp/f1-127504/pim_iface.c:1773:

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agoMerge pull request #13622 from kuldeepkash/bgp_always_compare_med
Donatas Abraitis [Wed, 7 Jun 2023 06:36:15 +0000 (09:36 +0300)]
Merge pull request #13622 from kuldeepkash/bgp_always_compare_med

tests: Adding bgp_always_compare_med testuite

22 months agoMerge pull request #13693 from chiragshah6/fdev2
Donatas Abraitis [Wed, 7 Jun 2023 06:22:46 +0000 (09:22 +0300)]
Merge pull request #13693 from chiragshah6/fdev2

tools: fix list value remove in frr-reload

22 months agoMerge pull request #13706 from LabNConsulting/chopps/close-files-coverity
Donatas Abraitis [Wed, 7 Jun 2023 06:12:56 +0000 (09:12 +0300)]
Merge pull request #13706 from LabNConsulting/chopps/close-files-coverity

lib: close config files after reading (coverity)

22 months agoMerge pull request #13707 from LabNConsulting/chopps/coverity-strftime
Donatas Abraitis [Wed, 7 Jun 2023 06:12:31 +0000 (09:12 +0300)]
Merge pull request #13707 from LabNConsulting/chopps/coverity-strftime

mgmtd: assert an assertion for coverity

22 months agoMerge pull request #13709 from Jafaral/pkg-9.1
Donatas Abraitis [Wed, 7 Jun 2023 06:11:08 +0000 (09:11 +0300)]
Merge pull request #13709 from Jafaral/pkg-9.1

debian, redhat: updating changelog for new release

22 months agodebian, redhat: updating changelog for new release 13709/head
Jafar Al-Gharaibeh [Tue, 6 Jun 2023 20:21:30 +0000 (15:21 -0500)]
debian, redhat: updating changelog for new release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
22 months agoMerge pull request #13697 from sri-mohan1/srib-ldpd1
Donatas Abraitis [Tue, 6 Jun 2023 19:57:08 +0000 (22:57 +0300)]
Merge pull request #13697 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agomgmtd: assert an assertion for coverity 13707/head
Christian Hopps [Tue, 6 Jun 2023 19:12:58 +0000 (15:12 -0400)]
mgmtd: assert an assertion for coverity

I believe coverity can't tell the length of the return value from strftime based
on the format string (like we can), so it allows `n` to be larger than it could
be which then allows `sz - n` to be negative which is size_t positive and very
large so it thinks an overrun is possible.

CID#1563211

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agobuild: FRR 9.1 development version frr-9.1-dev
Jafar Al-Gharaibeh [Tue, 6 Jun 2023 19:03:19 +0000 (14:03 -0500)]
build: FRR 9.1 development version

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
22 months agoMerge pull request #13701 from opensourcerouting/fix/update_show_ip_bgp_summary_doc base_9.0
Donald Sharp [Tue, 6 Jun 2023 18:55:52 +0000 (14:55 -0400)]
Merge pull request #13701 from opensourcerouting/fix/update_show_ip_bgp_summary_doc

doc: Document RFC8212 under `Displaying BGP Information` section

22 months agoMerge pull request #13687 from donaldsharp/eigrp_fakeout
Jafar Al-Gharaibeh [Tue, 6 Jun 2023 18:53:27 +0000 (13:53 -0500)]
Merge pull request #13687 from donaldsharp/eigrp_fakeout

tests: Babel tests do not need to log to eigrp

22 months agolib: close config files after reading (coverity) 13706/head
Christian Hopps [Tue, 6 Jun 2023 18:27:04 +0000 (14:27 -0400)]
lib: close config files after reading (coverity)

fixes coverity CID# 1564375

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agotests: Babel tests do not need to log to eigrp 13687/head
Donald Sharp [Mon, 5 Jun 2023 12:28:22 +0000 (08:28 -0400)]
tests: Babel tests do not need to log to eigrp

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agodoc: Document RFC8212 under `Displaying BGP Information` section 13701/head
Donatas Abraitis [Tue, 6 Jun 2023 12:22:44 +0000 (15:22 +0300)]
doc: Document RFC8212 under `Displaying BGP Information` section

Looks like people don't find what does it mean (Policy) at first shot, let's
try giving more hints here.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agoMerge pull request #13690 from LabNConsulting/chopps/mgmtd-cleanup
Donald Sharp [Tue, 6 Jun 2023 11:22:31 +0000 (07:22 -0400)]
Merge pull request #13690 from LabNConsulting/chopps/mgmtd-cleanup

Chopps/mgmtd cleanup

22 months agoMerge pull request #13618 from LabNConsulting/chopps/fixlogging
Martin Winter [Tue, 6 Jun 2023 09:35:20 +0000 (02:35 -0700)]
Merge pull request #13618 from LabNConsulting/chopps/fixlogging

22 months agoldpd: changes for code maintainability 13697/head
sri-mohan1 [Tue, 6 Jun 2023 09:07:08 +0000 (14:37 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agoMerge pull request #13649 from donaldsharp/unlock_the_node_or_else
Donatas Abraitis [Tue, 6 Jun 2023 05:52:40 +0000 (08:52 +0300)]
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else

zebra: Unlock the route node when sending route notifications

22 months agoMerge pull request #13689 from sri-mohan1/srib-ldpd1
Donatas Abraitis [Tue, 6 Jun 2023 05:43:36 +0000 (08:43 +0300)]
Merge pull request #13689 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agotools: fix list value remove in frr-reload 13693/head
Chirag Shah [Tue, 6 Jun 2023 04:48:12 +0000 (21:48 -0700)]
tools: fix list value remove in frr-reload

There might be a time element(s) from
temporary list are removed more than once
which leads to valueError in certain python3
version.

commit-id 1543f58b5 did not handle valueError
properly. This caused regression where
prefix-list config leads to delete followed
by add.

The new fix should just pass the exception as
value removal from list_to_add or list_to_del
is best effort.
This allows prefix-list config has no change
then removes the lines from lines_to_del and
lines_to_add properly.

Ticket:#3490252
Testing:

Configure prefix-list in frr.conf and perform
multiple frr-reload. After first reload operatoin
subsequent ones should not result in delete followed
by add of the prefix-list but rather no-op operation.

(Pdb) lines_to_add
[(('ip prefix-list FOO permit 10.2.1.0/24',), None)]
(Pdb) lines_to_del
[(('ip prefix-list FOO seq 5 permit 10.2.1.0/24',), None),
 (('ip prefix-list FOO seq 10 permit 10.2.1.0/24',), None)]
(Pdb) lines_to_del_to_del
[(('ip prefix-list FOO seq 5 permit 10.2.1.0/24',), None),
 (('ip prefix-list FOO seq 10 permit 10.2.1.0/24',), None)]
(Pdb) lines_to_add_to_del
[(('ip prefix-list FOO permit 10.2.1.0/24',), None),
 (('ip prefix-list FOO permit 10.2.1.0/24',), None)]
(Pdb) c
> /usr/lib/frr/frr-reload.py(1562)ignore_delete_re_add_lines()
-> return (lines_to_add, lines_to_del)
(Pdb) lines_to_add
[]
(Pdb) lines_to_del
[]

Signed-off-by: Chirag Shah <chirag@nvidia.com>
22 months agoMerge pull request #13670 from donaldsharp/coverity_99
Donatas Abraitis [Mon, 5 Jun 2023 19:33:55 +0000 (22:33 +0300)]
Merge pull request #13670 from donaldsharp/coverity_99

Coverity 99

22 months agomgmtd: rm unused/unneeded code add couple comments 13690/head
Christian Hopps [Sun, 4 Jun 2023 22:09:25 +0000 (18:09 -0400)]
mgmtd: rm unused/unneeded code add couple comments

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoldpd: changes for code maintainability 13689/head
sri-mohan1 [Mon, 5 Jun 2023 19:09:42 +0000 (00:39 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agotests: mgmtd: add prologue to bigconf tests
Christian Hopps [Sun, 4 Jun 2023 21:48:08 +0000 (17:48 -0400)]
tests: mgmtd: add prologue to bigconf tests

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13658 from louis-6wind/fix-flex-algo2
Donald Sharp [Mon, 5 Jun 2023 16:43:01 +0000 (12:43 -0400)]
Merge pull request #13658 from louis-6wind/fix-flex-algo2

isisd: fix wrongly disabled flex-algorithm

22 months agotests: fix some broken logging 13618/head
Christian Hopps [Sat, 27 May 2023 16:11:48 +0000 (12:11 -0400)]
tests: fix some broken logging

- make sure we close and remove all handlers for named logs on each reuse.
- test module level exec.log no longer truncated to last test case output
- cleanup the log names, and make sure they are present in all exec logs
- keep separate exec logs for each pytest worker when running in distributed mode
- disabled code due to CI infra can't handle it: add per test case exec logs

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13685 from sri-mohan1/srib-ldpd1
Donald Sharp [Mon, 5 Jun 2023 14:52:46 +0000 (10:52 -0400)]
Merge pull request #13685 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agomgmtd: Fix up some coverity issues 13670/head
Donald Sharp [Fri, 2 Jun 2023 19:09:29 +0000 (15:09 -0400)]
mgmtd: Fix up some coverity issues

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agobgpd: entry->any is never true
Donald Sharp [Fri, 2 Jun 2023 19:04:38 +0000 (15:04 -0400)]
bgpd: entry->any is never true

The only places entry->any could ever be set to true was
when str was NULL.  Unfortunately with the way our CLI works
str is impossible to be NonNULL.  The entry->any value *used*
to work prior to commit e961923c7217b935027107cad30c35c3907c936f
but it was changed back in 2016 and no-one has noticed the changed
ability.

Let's just admit that there are no users of this and remove this
dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agotests: Rename a test to test_bgp_gr_functionality_topo3.py
Donald Sharp [Fri, 2 Jun 2023 18:01:12 +0000 (14:01 -0400)]
tests: Rename a test to test_bgp_gr_functionality_topo3.py

Since the test was not named test_bgp_gr_functionality_topo3.py
pytest was not picking it up to run.  Let's run it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoMerge pull request #13684 from LabNConsulting/chopps/pause-functionality
Donald Sharp [Mon, 5 Jun 2023 11:53:54 +0000 (07:53 -0400)]
Merge pull request #13684 from LabNConsulting/chopps/pause-functionality

tests: pause (with CLI) at step() functions when run with --pause

22 months agoMerge pull request #13681 from LabNConsulting/chopps/bad-abstract2
Donald Sharp [Mon, 5 Jun 2023 11:53:31 +0000 (07:53 -0400)]
Merge pull request #13681 from LabNConsulting/chopps/bad-abstract2

lib: mgmtd: remove backend abstraction layer and other cleanup

22 months agoMerge pull request #13677 from LabNConsulting/chopps/bad-abstract
Donald Sharp [Mon, 5 Jun 2023 11:51:25 +0000 (07:51 -0400)]
Merge pull request #13677 from LabNConsulting/chopps/bad-abstract

lib: mgmtd: remove obfuscating abstraction layer and other cleanup

22 months agopimd: remove api source_channel_oil_detach() 11560/head
Sarita Patra [Wed, 31 May 2023 11:37:35 +0000 (04:37 -0700)]
pimd: remove api source_channel_oil_detach()

This API is no more in use.

Signed-off-by: Sarita Patra <saritap@vmware.com>
22 months agopim6d: Clear channel_oil on prune
Sarita Patra [Thu, 7 Jul 2022 15:12:10 +0000 (08:12 -0700)]
pim6d: Clear channel_oil on prune

Receiver---LHR---RP

Problem:
In LHR, ipv6 pim state remains after MLD prune received.

Root Cause:
When LHR receives join, it creates (*,G) channel oil with
oil_ref_count = 2. The channel_oil is used by gm_sg sg->oil
and upstream->channel_oil.

When LHR receives prune, currently upstream->channel_oil is
deleted and gm_sg sg->oil still present. Due to this channel_oil
is still present with oil_ref_count = 1

Fix:
When LHR receives prune, upstream->channel_oil and pim_sg sg->oil
needs to be deleted.

Issue: #11249

Signed-off-by: Sarita Patra <saritap@vmware.com>
22 months agoldpd: changes for code maintainability 13685/head
sri-mohan1 [Mon, 5 Jun 2023 05:21:01 +0000 (10:51 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agotests: pause (with CLI) at step() functions when run with --pause 13684/head
Christian Hopps [Sun, 4 Jun 2023 21:36:56 +0000 (17:36 -0400)]
tests: pause (with CLI) at step() functions when run with --pause

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: remove abstraction layer and other cleanup 13681/head
Christian Hopps [Sun, 4 Jun 2023 19:43:22 +0000 (15:43 -0400)]
lib: mgmtd: remove abstraction layer and other cleanup

Code is no longer using a global FE "client context", and instead
creates client objects, rename the structure and it's uses to reflect this.

Remove an obfuscating abstraction layer whose existence was entirely
based on using a uintptr_t rather than a pointer to an declared-only struct.

Change multi-duty "params" structure into a single duty callbacks one.

Remove unsupported API code.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: remove obfuscating abstraction layer and other cleanup 13677/head
Christian Hopps [Sun, 4 Jun 2023 13:24:03 +0000 (09:24 -0400)]
lib: mgmtd: remove obfuscating abstraction layer and other cleanup

Remove an obfuscating abstraction layer whose existence was entirely
based on using a uintptr_t rather than a pointer to an declared-only struct.

As the code is no longer using a global FE "client context", and instead
create client objects, rename the structure and it's uses to reflect this.

Change init "params" structure into a single use callbacks one.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13656 from sri-mohan1/srib-ldpd1
Donatas Abraitis [Sun, 4 Jun 2023 19:37:04 +0000 (22:37 +0300)]
Merge pull request #13656 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agoMerge pull request #13668 from donaldsharp/fsm_more_descriptive
Donatas Abraitis [Sun, 4 Jun 2023 19:36:43 +0000 (22:36 +0300)]
Merge pull request #13668 from donaldsharp/fsm_more_descriptive

bgpd: Give more data when state machine fails to change state

22 months agobgpd: Give more data when state machine fails to change state 13668/head
Donald Sharp [Fri, 2 Jun 2023 15:02:54 +0000 (11:02 -0400)]
bgpd: Give more data when state machine fails to change state

When a state machine transition fails, bgpd would output
data about what happened, but not necessarily give the
reason why.  Add that data to the output.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoMerge pull request #13659 from donaldsharp/increase_mgmt_time
Donatas Abraitis [Fri, 2 Jun 2023 06:50:28 +0000 (09:50 +0300)]
Merge pull request #13659 from donaldsharp/increase_mgmt_time

tests: new mgmt_startup tests are failing due to insufficient time

22 months agoMerge pull request #13646 from donaldsharp/logically_illogical
Donatas Abraitis [Fri, 2 Jun 2023 06:19:04 +0000 (09:19 +0300)]
Merge pull request #13646 from donaldsharp/logically_illogical

mgmtd: xpath is already NULL in the failure path

22 months agoMerge pull request #13641 from donaldsharp/com_list_str
mobash-rasool [Fri, 2 Jun 2023 02:44:10 +0000 (08:14 +0530)]
Merge pull request #13641 from donaldsharp/com_list_str

Bunch of code cleanup from Coverity

22 months agoMerge pull request #13660 from anlancs/bgpd-cleanup-12
mobash-rasool [Fri, 2 Jun 2023 02:41:55 +0000 (08:11 +0530)]
Merge pull request #13660 from anlancs/bgpd-cleanup-12

bgpd: Fix typo in debug message

22 months agopimd: Change in PIM northbound error, when a path to RP is not found during config... 13664/head
Rajesh Varatharaj [Thu, 1 Jun 2023 23:11:46 +0000 (16:11 -0700)]
pimd: Change in PIM northbound error, when a path to RP is not found during config apply

Currently, in PIM Northbound, when a path to RP is not found during config apply, we are treating this as a NB_ERR_INCONSISTENCY.
However, there are two issues with this approach:

When OSPF or IGP convergence is completed, it is possible that the RPF check will succeed.
If we have multiple groups and RPs (e.g. 50 RPs), we will receive 50 logs with inconsistency errors.
example:

2023/05/27 22:57:45 PIM: [G822R-SBMNH] config-from-file# ip pim rp 192.168.100.1 239.100.0.0/28 2023/05/27 22:57:45
PIM: [VAKV3-NMY7B][EC 100663337] error processing configuration change: error [internal inconsistency] event [apply]
operation [create] xpath [/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd']
[name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv4']/frr-pim-rp:rp/static-rp/rp-list
[rp-address='192.168.100.1']/group-list[.='239.100.0.0/28']] message: No Path to RP address specified: 192.168.100.1

Issue: #13620
Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
22 months agoMerge pull request #13637 from yyuanam/fix_vtysh_core
Donatas Abraitis [Thu, 1 Jun 2023 19:30:50 +0000 (22:30 +0300)]
Merge pull request #13637 from yyuanam/fix_vtysh_core

lib: fix vtysh core when handling questionmark

22 months agoMerge pull request #13653 from dpward/ospf6d-redundant-lsa
Donatas Abraitis [Thu, 1 Jun 2023 19:24:45 +0000 (22:24 +0300)]
Merge pull request #13653 from dpward/ospf6d-redundant-lsa

ospf6d: Prevent redundant LSA generation before interface goes down

22 months agobgpd: Fix typo in debug message 13660/head
anlan_cs [Thu, 1 Jun 2023 01:46:51 +0000 (09:46 +0800)]
bgpd: Fix typo in debug message

Cosmetic change for the debug messages, mainly on the parentheses.

Before:
```
[ZJYCS-KQYD6] VRF vrf-debug(140): Rcvd NH update 50.50.50.0/24(0)0) - metric 300/300 #nhops 2/1 flags Valid Reg Static Static Exact
[VZJVD-D7GXM] parse nexthop update(50.50.50.0/24(0)(VRF vrf-debug)): bnc info not found for nexthop cache
[NSWTE-81HEK] parse nexthop update(50.50.201.0/31(0)(VRF vrf-debug)): bnc info not found for import check
```

After:
```
[ZJYCS-KQYD6] VRF vrf-debug(140): Rcvd NH update 50.50.50.0/24(0)(0) - metric 300/300 #nhops 2/1 flags Valid Reg Static Static Exact
[VZJVD-D7GXM] parse nexthop update 50.50.50.0/24(0)(VRF vrf-debug): bnc info not found for nexthop cache
[NSWTE-81HEK] parse nexthop update 50.50.201.0/31(0)(VRF vrf-debug): bnc info not found for import check
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
22 months agotests: new mgmt_startup tests are failing due to insufficient time 13659/head
Donald Sharp [Thu, 1 Jun 2023 13:57:48 +0000 (09:57 -0400)]
tests: new mgmt_startup tests are failing due to insufficient time

The tests are failing due to heavily loaded system and insufficient
time for large configs to be handled.  Increasing the time
allows the tests to complete locally for me under heavy load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoeigrpd: dest_addr does not need to be set to NULL 13641/head
Donald Sharp [Tue, 30 May 2023 23:48:55 +0000 (19:48 -0400)]
eigrpd: dest_addr does not need to be set to NULL

All paths of the loop set dest_addr at the start
of the loop.  No need to set it to NULL to immediately
set it too something else.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agobgpd: vpn_policy_getafi can return AFI_MAX
Donald Sharp [Tue, 30 May 2023 23:47:32 +0000 (19:47 -0400)]
bgpd: vpn_policy_getafi can return AFI_MAX

Let's account for vpn_policy_getafi having a failure
situation and back out of the whole thing gracefully.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agobgpd: blnc cannot be NULL at if statement time
Donald Sharp [Tue, 30 May 2023 23:44:36 +0000 (19:44 -0400)]
bgpd: blnc cannot be NULL at if statement time

It is impossible for the blnc statement to ever be NULL at
line 1470 as that the if statement at 1453 guarantees it
to be set to something.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agozebra: Consolidate the stream_failure section with normal return
Donald Sharp [Tue, 30 May 2023 23:43:24 +0000 (19:43 -0400)]
zebra: Consolidate the stream_failure section with normal return

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agozebra: No need to set msg to NULL
Donald Sharp [Tue, 30 May 2023 23:40:22 +0000 (19:40 -0400)]
zebra: No need to set msg to NULL

The msg value is always reset to something new before it is used inside
the mutex.  No need to set it to NULL.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agobgpd: community_list_set str is always non null
Donald Sharp [Tue, 30 May 2023 23:30:12 +0000 (19:30 -0400)]
bgpd: community_list_set str is always non null

When calling community_list_set the str variable is
always non NULL.  As such let's treat it as such.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoMerge pull request #13652 from opensourcerouting/fix/drop_old_releases_from_the_table
Donald Sharp [Thu, 1 Jun 2023 12:27:54 +0000 (08:27 -0400)]
Merge pull request #13652 from opensourcerouting/fix/drop_old_releases_from_the_table

doc: Update reference table for current and upcoming release dates

22 months agotests: re-style isis_sr_flex_algo_topo1 13658/head
Louis Scalbert [Thu, 1 Jun 2023 12:18:47 +0000 (14:18 +0200)]
tests: re-style isis_sr_flex_algo_topo1

Re-style isis_sr_flex_algo_topo1. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agoisisd: fix wrongly disabled flex-algo
Louis Scalbert [Wed, 31 May 2023 14:53:58 +0000 (16:53 +0200)]
isisd: fix wrongly disabled flex-algo

A configured flex-algo algorithm may remain in disabled state after its
definition is advertised on the area.

It happens sometimes that, in isis_sr_flex_algo_topo1 topotest step 4 or
8, flex-algo 203 is disabled. It depends on the following sequence:

 1. Flex-algo 203 is configured on a remote router to be re-advertised.
 2. A LSP is received on the local router and contains the algo 203
    definition.
 3. The local router re-builds its own LSP with lsp_build().
 4. local router isis_run_spf() recomputes the algo 203 SPF tree.

A 1. 2. 3. 4. sequence results in a working test. The reception of the
remote LSP (2.) does not trigger the built of the local LSP. If for
some reasons, the sequence is 1. 3. 4. 2. 4., isis_run_spf() will not
knows that flex-algo 203 has been re-enabled because
flex_algo_get_state() only returns the state from the local LSP.

Compare in sequence step 4. the flex-algo state from the local LSP with
the actual state. If the state is not the same, request a new local LSP
generation and quits the re-computation of algo SPF tree. The SPF tree
will be recomputed just after the built of the local LSP.

Fixes: 3f55b8c621 ("isisd: fix disabled flex-algo on race condition")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotests: fix mpls table check in isis_sr_flex_algo_topo1
Louis Scalbert [Thu, 1 Jun 2023 09:39:30 +0000 (11:39 +0200)]
tests: fix mpls table check in isis_sr_flex_algo_topo1

Some test steps result in removing some entries in the MPLS forwarding
table. However, these steps pass before the entries are actually
removed.

Use the exact JSON comparison so that the removal of the entries is
checked.

Fixes: 1a61ef95b2 ("tests: add isis_sr_flex_algo_topo1 for flex-algo")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agozebra: Unlock the route node when sending route notifications 13649/head
Donald Sharp [Wed, 31 May 2023 15:40:07 +0000 (11:40 -0400)]
zebra: Unlock the route node when sending route notifications

When using a context to send route notifications to upper
level protocols, the code was using a locking function to
get the route node.  There is no need for this to be locked
as such FRR should free it up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoldpd: changes for code maintainability 13656/head
sri-mohan1 [Thu, 1 Jun 2023 07:27:14 +0000 (12:57 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agoMerge pull request #13450 from patrasar/mld_core
Donatas Abraitis [Thu, 1 Jun 2023 06:13:30 +0000 (09:13 +0300)]
Merge pull request #13450 from patrasar/mld_core

pim6d: Fix crash in ipv6 pim command

22 months agoospf6d: Prevent redundant LSA generation before interface goes down 13653/head
David Ward [Wed, 31 May 2023 20:44:44 +0000 (16:44 -0400)]
ospf6d: Prevent redundant LSA generation before interface goes down

Commit 76249532faad ("ospf6d: Handle Premature Aging of LSAs") added a
duplicate call to OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(), when the
interface state changes to "Down".

Fixes: #1738
Signed-off-by: David Ward <david.ward@ll.mit.edu>
22 months agolib: fix vtysh core when handling questionmark 13637/head
Yuan Yuan [Tue, 30 May 2023 19:20:09 +0000 (19:20 +0000)]
lib: fix vtysh core when handling questionmark

When issue vtysh command with ?, the initial buf size for the
element is 16. Then it would loop through each element in the cmd
output vector. If the required size for printing out the next
element is larger than the current buf size, realloc the buf memory
by doubling the current buf size regardless of the actual size
that's needed. This would cause vtysh core when the doubled size
is not enough for the next element.

Signed-off-by: Yuan Yuan <yyuanam@amazon.com>
22 months agodoc: Update reference table for current and upcoming release dates 13652/head
Donatas Abraitis [Wed, 31 May 2023 20:08:57 +0000 (23:08 +0300)]
doc: Update reference table for current and upcoming release dates

Keep only 3 release dates, current and two upcoming. On the next release,
just update one, instead of multiple (zero point looking too much in the
future).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agotests: Check if `bgp default-originate timer` command works 13650/head
Donatas Abraitis [Mon, 29 May 2023 09:47:01 +0000 (12:47 +0300)]
tests: Check if `bgp default-originate timer` command works

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Add an ability to control default-originate route-map timer
Donatas Abraitis [Fri, 26 May 2023 11:52:45 +0000 (14:52 +0300)]
bgpd: Add an ability to control default-originate route-map timer

By default it's 5 seconds. That means, every 5 second it iterates over the
whole BGP table and checks if a route-map is kicked in (if route-map is defined).

Having a full feed with many of neighbors, this is a huge CPU-killer, and takes
a lot of time.

Thread statistics for bgpd:

Showing statistics for pthread default
--------------------------------------
                               CPU (user+system): Real (wall-clock):
Active   Runtime(ms)   Invoked Avg uSec Max uSecs Avg uSec Max uSecs  CPU_Warn Wall_Warn Starv_Warn Type   Thread
    0          0.487        10       48        84       49        85         0         0          0    T    (bgp_connect_timer)
    0          0.000         1        0         0        1         1         0         0          0    T    bgp_startup_timer_expire
    2          3.991       276       14      1032       14      1031         0         0          0  R      zclient_read
    0          0.010         4        2         6        3         6         0         0          0     E   _bfd_sess_send
    0          0.057        11        5        26        6        26         0         0          0   W     vtysh_write
    0         65.054       136      478     28907      484     28914         0         0          0     E   bgp_event
    0      11233.040        24   468043   2772209  1341293   7781145         0         3          0    T    subgroup_coalesce_timer
    2          3.649        33      110       394      111       395         0         0          0  R      bgp_accept
    0        468.837         5    93767    178929    93799    178960         0         0          0    T    (bgp_graceful_stale_timer_expire)
    0          0.462         9       51        77       51        78         0         0          0    T    (bgp_start_timer)
    1        415.825     14200       29       414       29       415         0         0          0  R      vtysh_accept
    0          0.052         3       17        47       18        49         0         0          1    T    bgp_config_finish
    0          0.011         1       11        11       12        12         0         0          0     E   frr_config_read_in
    0          0.022         4        5         8        6         9         0         0          0     E   bgp_nht_ifp_initial
    0          0.121        44        2        64        3        65         0         0          0    T    (bgp_routeadv_timer)
    0      34194.454         3 11398151  21874014 27937411  52641827         2         0          1    T    bgp_route_map_update_timer
    0      13246.820         8  1655852   3065476  4589606   8454782         0         4          1    T    bgp_announce_route_timer_expired
    0          0.035         2       17        26       18        27         0         0          0     E   zclient_connect
    0     279624.026    318778      877    571779     2808   1639624         0         0          5    T    work_queue_run
    0          0.097        32        3        21        3        23         0         0          0  RW     bgp_connect_check
    2       6005.738     43560      137    680012      138    680446         0         0          0  R      vtysh_read
    0       1605.840   1116298        1      1331        2     10152         0         0        133    T    (bgp_generate_updgrp_packets)
    0       1073.162        17    63127    222065    63175    222087         0         0          0     E   bgp_packet_process_error
    1   16744058.262     10691  1566182   1807248  1566900   1808301         0         0          5    T    update_group_refresh_default_originate_route_map
    0          0.000        11        0         0        0         1         0         0          0    T    update_subgroup_merge_check_thread_cb
    0      94544.034   1898726       49    225054       69    225156         0         0          0     E   bgp_process_packet

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Remove bgp_lock() when spawning a timer for default-originate
Donatas Abraitis [Fri, 26 May 2023 10:44:33 +0000 (13:44 +0300)]
bgpd: Remove bgp_lock() when spawning a timer for default-originate

Not sure why it's here, but looks like it was since the beginning, let's see
if we can drop it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobfdd: remove redundant nb destroy callbacks 13645/head
Igor Ryzhov [Wed, 31 May 2023 12:28:08 +0000 (15:28 +0300)]
bfdd: remove redundant nb destroy callbacks

Fixes warning logs:
```
2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/profile/minimum-ttl'
2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/sessions/multi-hop/minimum-ttl'
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
22 months agomgmtd: xpath is already NULL in the failure path 13646/head
Donald Sharp [Wed, 31 May 2023 11:54:10 +0000 (07:54 -0400)]
mgmtd: xpath is already NULL in the failure path

There is no way that xpath can ever be anything but NULL
in the failure path with the goto's.  Let's just remove
the goto's and return immediately.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoMerge pull request #13632 from LabNConsulting/chopps/mgmt-avoid-race
Donald Sharp [Wed, 31 May 2023 11:28:50 +0000 (07:28 -0400)]
Merge pull request #13632 from LabNConsulting/chopps/mgmt-avoid-race

mgmtd: fix possible race btw read config and backend connection

22 months agoMerge pull request #13639 from opensourcerouting/ospf-timestamp-truncation
Donald Sharp [Wed, 31 May 2023 11:26:06 +0000 (07:26 -0400)]
Merge pull request #13639 from opensourcerouting/ospf-timestamp-truncation

ospfd, ospf6d: fix time_t truncation

22 months agoMerge pull request #13634 from yyuanam/fix_bgp_core
Donatas Abraitis [Wed, 31 May 2023 05:57:40 +0000 (08:57 +0300)]
Merge pull request #13634 from yyuanam/fix_bgp_core

bgpd: fix bgpd core when unintern attr

23 months agoMerge pull request #13635 from donaldsharp/give_ping_a_chance
Jafar Al-Gharaibeh [Tue, 30 May 2023 23:59:44 +0000 (18:59 -0500)]
Merge pull request #13635 from donaldsharp/give_ping_a_chance

tests: Actually loop if ping fails

23 months agobgpd: fix bgpd core when unintern attr 13634/head
Yuan Yuan [Tue, 30 May 2023 18:53:32 +0000 (18:53 +0000)]
bgpd: fix bgpd core when unintern attr

When the remote peer is neither EBGP nor confed, aspath is the
shadow copy of attr->aspath in bgp_packet_attribute(). Striping
AS4_PATH should not be done on the aspath directly, since
that would lead to bgpd core dump when unintern the attr.

Signed-off-by: Yuan Yuan <yyuanam@amazon.com>
23 months agoospfd, ospf6d: fix time_t truncation 13639/head
Renato Westphal [Tue, 30 May 2023 22:41:39 +0000 (19:41 -0300)]
ospfd, ospf6d: fix time_t truncation

Change timestamp parameter from int to time_t to avoid truncation.

Found by Coverity Scan (CID 1563226 and 1563222)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
23 months agotests: Actually loop if ping fails 13635/head
Donald Sharp [Tue, 30 May 2023 19:20:56 +0000 (15:20 -0400)]
tests: Actually loop if ping fails

The usage of run_and_expect doesn't work if the function
being called as the run part asserts.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoMerge pull request #13631 from donaldsharp/fix_some_ping_issues
Donatas Abraitis [Tue, 30 May 2023 18:26:24 +0000 (21:26 +0300)]
Merge pull request #13631 from donaldsharp/fix_some_ping_issues

various issues