Commit Graph

32667 Commits

Author SHA1 Message Date
Donatas Abraitis
f91b40ba25
Merge pull request #13706 from LabNConsulting/chopps/close-files-coverity
lib: close config files after reading (coverity)
2023-06-07 09:12:56 +03:00
Donatas Abraitis
75a95e1ccd
Merge pull request #13707 from LabNConsulting/chopps/coverity-strftime
mgmtd: assert an assertion for coverity
2023-06-07 09:12:31 +03:00
Donatas Abraitis
93e9a944c8
Merge pull request #13709 from Jafaral/pkg-9.1
debian, redhat: updating changelog for new release
2023-06-07 09:11:08 +03:00
Jafar Al-Gharaibeh
d95df8681e debian, redhat: updating changelog for new release
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-06-06 15:21:30 -05:00
Donatas Abraitis
77981fff37
Merge pull request #13697 from sri-mohan1/srib-ldpd1
ldpd: changes for code maintainability
2023-06-06 22:57:08 +03:00
Christian Hopps
565139a6d5 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>
2023-06-06 15:12:58 -04:00
Jafar Al-Gharaibeh
c158ca492e build: FRR 9.1 development version
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-06-06 14:03:19 -05:00
Donald Sharp
b615b1094a
Merge pull request #13701 from opensourcerouting/fix/update_show_ip_bgp_summary_doc
doc: Document RFC8212 under `Displaying BGP Information` section
2023-06-06 14:55:52 -04:00
Jafar Al-Gharaibeh
5648279b7a
Merge pull request #13687 from donaldsharp/eigrp_fakeout
tests: Babel tests do not need to log to eigrp
2023-06-06 13:53:27 -05:00
Christian Hopps
f5626596ee lib: close config files after reading (coverity)
fixes coverity CID# 1564375

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-06 14:39:25 -04:00
Donald Sharp
8625fe0f45 tests: Babel tests do not need to log to eigrp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-06 11:59:20 -04:00
Donatas Abraitis
efce200d93 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>
2023-06-06 15:28:19 +03:00
Donald Sharp
da877b5ced
Merge pull request #13690 from LabNConsulting/chopps/mgmtd-cleanup
Chopps/mgmtd cleanup
2023-06-06 07:22:31 -04:00
Martin Winter
6a771192de
Merge pull request #13618 from LabNConsulting/chopps/fixlogging 2023-06-06 02:35:20 -07:00
sri-mohan1
b0eea1202c ldpd: changes for code maintainability
these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-06-06 14:37:59 +05:30
Donatas Abraitis
29f6fb04d8
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
zebra: Unlock the route node when sending route notifications
2023-06-06 08:52:40 +03:00
Donatas Abraitis
d827795153
Merge pull request #13689 from sri-mohan1/srib-ldpd1
ldpd: changes for code maintainability
2023-06-06 08:43:36 +03:00
Chirag Shah
9845c09d61 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>
2023-06-05 22:22:27 -07:00
Donatas Abraitis
fecc953b3c
Merge pull request #13670 from donaldsharp/coverity_99
Coverity 99
2023-06-05 22:33:55 +03:00
Christian Hopps
c6b8e95703 mgmtd: rm unused/unneeded code add couple comments
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05 15:29:05 -04:00
sri-mohan1
4e60d88ee1 ldpd: changes for code maintainability
these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-06-06 00:58:49 +05:30
Christian Hopps
ee235c606f tests: mgmtd: add prologue to bigconf tests
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05 13:53:51 -04:00
Donald Sharp
05cb9e55a7
Merge pull request #13658 from louis-6wind/fix-flex-algo2
isisd: fix wrongly disabled flex-algorithm
2023-06-05 12:43:01 -04:00
Christian Hopps
9c57c2900a 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>
2023-06-05 12:42:57 -04:00
Donald Sharp
b107092ce7
Merge pull request #13685 from sri-mohan1/srib-ldpd1
ldpd: changes for code maintainability
2023-06-05 10:52:46 -04:00
Donald Sharp
60dc2992c9 mgmtd: Fix up some coverity issues
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-05 07:57:49 -04:00
Donald Sharp
75aaf03ff3 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 e961923c72
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>
2023-06-05 07:57:49 -04:00
Donald Sharp
0889f6d894 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>
2023-06-05 07:57:49 -04:00
Donald Sharp
4285bdadcc
Merge pull request #13684 from LabNConsulting/chopps/pause-functionality
tests: pause (with CLI) at step() functions when run with --pause
2023-06-05 07:53:54 -04:00
Donald Sharp
dfbccb4cb8
Merge pull request #13681 from LabNConsulting/chopps/bad-abstract2
lib: mgmtd: remove backend abstraction layer and other cleanup
2023-06-05 07:53:31 -04:00
Donald Sharp
42d6f84585
Merge pull request #13677 from LabNConsulting/chopps/bad-abstract
lib: mgmtd: remove obfuscating abstraction layer and other cleanup
2023-06-05 07:51:25 -04:00
Sarita Patra
8e595849fc pimd: remove api source_channel_oil_detach()
This API is no more in use.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2023-06-04 22:23:56 -07:00
Sarita Patra
cb809c0d6c 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>
2023-06-04 22:23:56 -07:00
sri-mohan1
233b5d0f2e ldpd: changes for code maintainability
these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-06-05 10:53:27 +05:30
Christian Hopps
be3c453556 tests: pause (with CLI) at step() functions when run with --pause
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-04 17:38:19 -04:00
Christian Hopps
7aecb8639c 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>
2023-06-04 16:41:24 -04:00
Christian Hopps
65256cd8f7 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>
2023-06-04 16:38:19 -04:00
Donatas Abraitis
1bafbcb24a
Merge pull request #13656 from sri-mohan1/srib-ldpd1
ldpd: changes for code maintainability
2023-06-04 22:37:04 +03:00
Donatas Abraitis
76eb208e79
Merge pull request #13668 from donaldsharp/fsm_more_descriptive
bgpd: Give more data when state machine fails to change state
2023-06-04 22:36:43 +03:00
zmw12306
3f658e8b1c bfdd: fix version bits check.
The version of bfd pkt is represented by 3 bits in B[0].
Signed-off-by: zmw12306 <zmw12306@gmail.com>
2023-06-03 15:08:34 -04:00
anlan_cs
0c061db4d0 bgpd: Fix missing deletion of evpn routes
Consider the scenario of evpn, the box has some type-5 ECMP routes.

After one of its remote peers is removed ( or down ), `show evpn rmac vni all`
kept no change **sometimes**, it means the rmac of the removed peer maybe is
still in this box, and the traffic will be wrongly forwarded to the removed
peer.

The root cause is that the best path selection for type-5 routes maybe
keep no change and the best path is not routed to the removed peer, so `bgpd`
wrongly doesn't tell `zebra` to remove ( withdraw ) the type-5 routes owned
by the removed peer.

So, add a new flag to force the deletion.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-03 09:27:53 +08:00
zmw12306
2178d131b9 babeld: add AE!=0 check when type is 7 or 10.
Signed-off-by: zmw12306 <zmw12306@gmail.com>
2023-06-02 15:55:36 -04:00
Donald Sharp
907234817c 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>
2023-06-02 11:02:54 -04:00
Donatas Abraitis
ff82184fae
Merge pull request #13659 from donaldsharp/increase_mgmt_time
tests: new mgmt_startup tests are failing due to insufficient time
2023-06-02 09:50:28 +03:00
Donatas Abraitis
0f1a66f2c5
Merge pull request #13646 from donaldsharp/logically_illogical
mgmtd: xpath is already NULL in the failure path
2023-06-02 09:19:04 +03:00
mobash-rasool
205d27014f
Merge pull request #13641 from donaldsharp/com_list_str
Bunch of code cleanup from Coverity
2023-06-02 08:14:10 +05:30
mobash-rasool
e4bdeb6aca
Merge pull request #13660 from anlancs/bgpd-cleanup-12
bgpd: Fix typo in debug message
2023-06-02 08:11:55 +05:30
Rajesh Varatharaj
314a97c164 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>
2023-06-01 16:13:51 -07:00
Donatas Abraitis
89eaf9b7a0
Merge pull request #13637 from yyuanam/fix_vtysh_core
lib: fix vtysh core when handling questionmark
2023-06-01 22:30:50 +03:00
Donatas Abraitis
2cf6941f1d
Merge pull request #13653 from dpward/ospf6d-redundant-lsa
ospf6d: Prevent redundant LSA generation before interface goes down
2023-06-01 22:24:45 +03:00