Commit Graph

32110 Commits

Author SHA1 Message Date
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
Donatas Abraitis
fecc953b3c
Merge pull request #13670 from donaldsharp/coverity_99
Coverity 99
2023-06-05 22:33:55 +03: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
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
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
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
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
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
anlan_cs
32e29c746a 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>
2023-06-01 23:31:45 +08:00
Donald Sharp
84af55b268 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>
2023-06-01 09:57:48 -04:00
Donald Sharp
56cc0c2478 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>
2023-06-01 08:58:16 -04:00
Donald Sharp
c36bd47d76 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>
2023-06-01 08:58:16 -04:00
Donald Sharp
6e233c77d8 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>
2023-06-01 08:58:16 -04:00
Donald Sharp
3ddf7680fd zebra: Consolidate the stream_failure section with normal return
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01 08:58:16 -04:00
Donald Sharp
c2cf522347 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>
2023-06-01 08:54:25 -04:00
Donald Sharp
1f7038386e 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>
2023-06-01 08:54:25 -04:00
Donald Sharp
3f1b34c498
Merge pull request #13652 from opensourcerouting/fix/drop_old_releases_from_the_table
doc: Update reference table for current and upcoming release dates
2023-06-01 08:27:54 -04:00
Louis Scalbert
5f230545e1 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>
2023-06-01 14:26:48 +02:00
Louis Scalbert
9ed86fe07e 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>
2023-06-01 14:26:39 +02:00
Louis Scalbert
b24bad5632 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>
2023-06-01 14:14:51 +02:00
Donald Sharp
82c6e4fea5 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>
2023-06-01 07:35:12 -04:00
sri-mohan1
a3b7872c66 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-01 13:30:35 +05:30
Donatas Abraitis
8d4eeb9026
Merge pull request #13450 from patrasar/mld_core
pim6d: Fix crash in ipv6 pim command
2023-06-01 09:13:30 +03:00
David Ward
4a1696818f ospf6d: Prevent redundant LSA generation before interface goes down
Commit 76249532fa ("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>
2023-05-31 16:44:44 -04:00
Yuan Yuan
f8aa257997 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>
2023-05-31 20:30:03 +00:00
Donatas Abraitis
b28e2c59dc 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>
2023-05-31 23:17:27 +03:00
Donald Sharp
af001e29f9 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>
2023-05-31 07:54:10 -04:00
Donald Sharp
7470509390
Merge pull request #13632 from LabNConsulting/chopps/mgmt-avoid-race
mgmtd: fix possible race btw read config and backend connection
2023-05-31 07:28:50 -04:00
Donald Sharp
a53c4891fd
Merge pull request #13639 from opensourcerouting/ospf-timestamp-truncation
ospfd, ospf6d: fix time_t truncation
2023-05-31 07:26:06 -04:00
Donatas Abraitis
549f664d39
Merge pull request #13634 from yyuanam/fix_bgp_core
bgpd: fix bgpd core when unintern attr
2023-05-31 08:57:40 +03:00
Jafar Al-Gharaibeh
adea8ef308
Merge pull request #13635 from donaldsharp/give_ping_a_chance
tests: Actually loop if ping fails
2023-05-30 18:59:44 -05:00
Yuan Yuan
32af4995aa 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>
2023-05-30 22:49:07 +00:00
Renato Westphal
2882096fad 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>
2023-05-30 19:47:28 -03:00