Commit Graph

32667 Commits

Author SHA1 Message Date
Jafar Al-Gharaibeh
6f0aef2ef8
Merge pull request #13866 from LabNConsulting/mgmtd/incllang
Changes for inclusive language and other cleanup
2023-06-29 17:14:21 -05:00
Donatas Abraitis
c8732b6904
Merge pull request #13879 from donaldsharp/fix_check_ping_again
tests: Fix broken check_ping run_and_expect semantics
2023-06-29 22:57:26 +03:00
Donatas Abraitis
a08d696f8e bgpd: Fix comment for ecommunity_ecom2str()
Reformat and align to be readable.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-29 22:44:43 +03:00
Donatas Abraitis
0ed36319a0
Merge pull request #13869 from anlancs/fix/pbr-crash-ip-protocol
pbrd: fix crash with match command
2023-06-29 22:21:55 +03:00
Donatas Abraitis
a8047bc604
Merge pull request #13877 from rwgbsd/master
doc: Add Ubuntu 22.04 to list of builds
2023-06-29 17:54:14 +03:00
Donald Sharp
c65e7e7c3f tests: Fix broken check_ping run_and_expect semantics
*again*.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-29 10:42:11 -04:00
Donatas Abraitis
64510b9467 zebra: Dump route details when deleting a route
Just more details what's going on when deleting a route.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-29 17:39:45 +03:00
Donald Sharp
d0123a9012 zebra: Static routes async notification do not need this test
When using asic_offload with an asynchronous notification the
rib_route_match_ctx function is testing for distance and tag
being correct against the re.

Normal route notification for static routes is this(well really all routes):
a) zebra dplane generates a ctx to send to the dplane for route install
b) dplane installs it in the kernel
c) if the dplane_fpm_nl.c module is being used it installs it.
d) The context's success code is set to it worked and passes the context
back up to zebra for processing.
e) Zebra master receives this and checks the distance and tag are correct
for static routes and accepts the route and marks it installed.

If the operator is using a wait for install mechansim where the dplane
is asynchronously sending the result back up at a future time *and*
it is using the dplane_fpm_nl.c code where it uses the rt_netlink.c
route parsing code, then there is no way to set distance as that we
do not pass distance to the kernel.

As such static routes were never being properly handled since the re and
context would not match and the route would still be marked as queued.

Modify the code such that the asynchronous path notification for static
routes ignores the distance and tag's as that there is no way to test
for this data from that path at this point in time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-29 09:35:00 -04:00
Rodney W. Grimes
a41eee6927 doc: Add Ubuntu 22.04 to list of builds
Add Ubuntu 22.04 build instructions to list.
Sort list into alphabetic order.

Signed-off-by: Rodney W. Grimes <rgrimes@FreeBSD.org>
2023-06-29 09:46:27 +00:00
Donatas Abraitis
1ce1c537a5
Merge pull request #13864 from pguibert6WIND/bgp_coverity_fix
Bgp coverity fix
2023-06-29 11:32:15 +03:00
Philippe Guibert
a3f0a1f5ed bgpd: add 'set as-path replace' with a configured ASN
There is no route-map set action to replace any ASN,
or a part of an ASN, with a configured ASN.

The current commit adds a new command to use a configured
ASN as replacement, instead of using the local as number.

> set as-path replace any 65500

Update the 'bgp_set_aspath_replace' test.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-28 21:21:55 +02:00
Philippe Guibert
bf11a19e93 bgpd: fix covery 1566055, label table overrun
In case the full label stack is used, there may be
a table overrun happening. Avoid it by increasing the
size of the table.

Fixes: 27f4deed0a ("bgpd: update the mpls entry to handle return traffic")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-28 21:20:31 +02:00
Philippe Guibert
81664e7201 bgpd: fix covery scan 1566054 with null pointer
The bmnc pointer is never null. Do not keep the test
on the pointer.

Fixes: 1069425868 ("bgpd: allocate label bound to received mpls vpn routes")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-28 21:20:31 +02:00
Acee
e72549c8f6 ospfd: Configurable interface-level 'capability opaque' support
Add support for "[no] ip ospf capbility opaque" at the interface
    level with the default being capability opaque enabled. The command
    "no ip ospf capability opaque" will disable opaque LSA database
    exchange and flooding on the interface. A change in configuration
    will result in the interface being flapped to update our options
    for neighbors but no attempt will be made to purge existing LSAs
    as in dense topologies, these may received by neighbors through
    different interfaces.

    Topotests are added to test both the configuration and the LSA
    opaque flooding suppression.

Signed-off-by: Acee <aceelindem@gmail.com>
2023-06-28 13:03:48 -04:00
anlan_cs
4e313ee450 pbrd: fix crash with match command
Crash with empty `ip-protocol`:
```
anlan(config-pbr-map)# match ip-protocol
vtysh: error reading from pbrd: Resource temporarily unavailable (11)Warning: closing connection to pbrd because of an I/O error!
```

So, give warning for empty `ip-protocol`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-28 21:46:47 +08:00
Donatas Abraitis
6ca6ae3be4
Merge pull request #13870 from iqras23/bm_terminate
bgpd: Ensure peer data structure is accessed only when BGPD is not te…
2023-06-28 15:20:07 +03:00
Mark Stapp
59b8965aa6
Merge pull request #13861 from opensourcerouting/fix/memory_leak_zserv
zebra: Free Zebra client resources
2023-06-28 08:18:11 -04:00
mobash-rasool
4d1f3d55b1
Merge pull request #13850 from Keelan10/pimd-leak-fix
pimd: Fix memory leak in PIM interface deletion
2023-06-28 16:12:10 +05:30
Naveen Thanikachalam
7e28578bb6 bgpd: Ensure peer data structure is accessed only when BGPD is not terminating
With these changes,
the code ensures that the peer data-structures are accessed
only after it knows that BGPD is not terminating.

Authored-by: Naveen Thanikachalam <nthanikachal@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2023-06-28 00:27:44 -07:00
Donatas Abraitis
07a2b9d41e
Merge pull request #13867 from mjstapp/fix_opq_source
isisd, ospfd: fix opaque zapi source parsing
2023-06-28 09:04:05 +03:00
Jack.zhang
a725bf4bbb bgpd:Fixing a conflict issue between rmap_in_change_flag and rmap_out_change_flag.
Imagine the following scenario:
when a neighbor has an inbound policy set to modify the next hop, but no outbound route-map is configured.
In this case, if(!post_attr && (ROUTE_MAP_OUT_NAME(filter) || bgp_path_suppressed(pi))) returns false, causing rmap_in_change_flag to not be correctly cleared, and mistakenly identified as rmap_out_change_flag, leading to the failure of the subsequent neighbor-nexthop-self command.

Signed-off-by: Jack.zhang <hanyu.zly@alibaba-inc.com>
2023-06-28 11:42:19 +08:00
Christian Hopps
5447d16b73 mgmtd: convert map to darr use allowing dynamic registrations
- move from the static allocated and initialize xpath map to using the
new darr (dynamic array) code.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27 18:00:56 -04:00
Christian Hopps
e6e0c5bd25 lib: add dynamic array type
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27 18:00:56 -04:00
Christian Hopps
70fb3910db mgmtd: remove unused "placeholder" code.
We don't need un-run/un-tested placeholder code we may never need.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27 18:00:56 -04:00
Christian Hopps
dbb1bc6f35 mgmtd: consolidate getcfg and getdata msgs into "get"
eliminates tons of copy and paste code.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27 18:00:56 -04:00
Mark Stapp
220dc6df98 isisd, ospfd: fix opaque zapi source parsing
Opaque zapi messages carry the sender's zclient tuple now,
daemons shouldn't try to parse those bits directly.

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-06-27 16:32:54 -04:00
Donatas Abraitis
97072d144e zebra: Free Zebra client resources
Memory leaks started flowing:

```
AddressSanitizer Topotests Part 0:  15 KB -> 283 KB
AddressSanitizer Topotests Part 1:  1 KB -> 495 KB
AddressSanitizer Topotests Part 2:  13 KB -> 478 KB
AddressSanitizer Topotests Part 3:  39 KB -> 213 KB
AddressSanitizer Topotests Part 4:  30 KB -> 836 KB
AddressSanitizer Topotests Part 5:  0 bytes -> 356 KB
AddressSanitizer Topotests Part 6:  86 KB -> 783 KB
AddressSanitizer Topotests Part 7:  0 bytes -> 354 KB
AddressSanitizer Topotests Part 8:  0 bytes -> 62 KB
AddressSanitizer Topotests Part 9:  408 KB -> 518 KB
```

```
Direct leak of 3584 byte(s) in 1 object(s) allocated from:
    #0 0x7f1957b02d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x559895c55df0 in qcalloc lib/memory.c:105
    #2 0x559895bc1cdf in zserv_client_create zebra/zserv.c:743
    #3 0x559895bc1cdf in zserv_accept zebra/zserv.c:880
    #4 0x559895cf3438 in event_call lib/event.c:1995
    #5 0x559895c3901c in frr_run lib/libfrr.c:1213
    #6 0x559895a698f1 in main zebra/main.c:472
    #7 0x7f195635ec86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
```

Fixes b20acd0 ("bgpd: Use synchronous way to get labels from Zebra")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-27 22:48:39 +03:00
Christian Hopps
6267c2aaad mgmtd: inclusive language change
'cfg_btch' -> 'batch' and 'btch_list' -> 'batch_list'

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27 14:03:00 -04:00
Christian Hopps
579d00e167
Merge pull request #13838 from ak503/static_bfd_vrf
staticd: Fix bfd for static route in VRF
2023-06-27 11:34:50 -04:00
Russ White
4a7d9469f2
Merge pull request #13826 from opensourcerouting/fix/ripng_match_ipv6_acls
ripng: match ipv6 address [prefix-list] CMDs
2023-06-27 11:31:23 -04:00
Russ White
1f08a055a8
Merge pull request #13852 from mjstapp/fix_opq_cov_msg
zebra: clean up coverity warning in opaque api
2023-06-27 11:28:31 -04:00
Russ White
c656854e71
Merge pull request #13859 from opensourcerouting/fix/bgpd_coverity_issues
bgpd: Check for NULL before assigning a peer from the group
2023-06-27 10:26:02 -04:00
Russ White
d96501add1
Merge pull request #13854 from chiragshah6/fdev2
zebra: fix evpn rmac nh list cmp function
2023-06-27 10:25:39 -04:00
Mark Stapp
d8f0a8eb47
Merge pull request #13851 from opensourcerouting/fix/use_zclient_sync_for_table_manager
bgpd: Use synchronous Zebra client for table manager
2023-06-27 08:54:46 -04:00
Donatas Abraitis
53785cdd43
Merge pull request #13628 from kuldeepkash/uplink_mcast_tests
tests: Add multicast-pim-multi-uplink test suite
2023-06-27 13:34:17 +03:00
Donatas Abraitis
a21d361169
Merge pull request #13672 from zmw12306/AE_zero
babeld: add AE!=0 check when type is 7 or 10.
2023-06-27 13:18:20 +03:00
Donatas Abraitis
4199f032e5
Merge pull request #13722 from fdumontet6WIND/color_extcomm
bgpd,lib,yang: add colored extended communities support
2023-06-27 13:03:22 +03:00
Donatas Abraitis
f018e3cdcf
Merge pull request #13857 from anlancs/doc-wrong-code
doc: Fix one syntax error for code block
2023-06-27 12:56:47 +03:00
Donatas Abraitis
a5c9e190be ldpd: Stop and free synchronous Zebra client on destroy
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-27 11:47:50 +03:00
Donatas Abraitis
860e427758 bgpd: Check for NULL before assigning a peer from the group
CID 1566056

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-27 09:50:02 +03:00
Donatas Abraitis
edf6d1917c bgpd: Guard zlog_debug for table manager when the connection is successful
We shouldn't use unguarded zlog_debug().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-27 09:32:07 +03:00
Donatas Abraitis
ec3d30f55d bgpd: Use zlog_err when can't connect to table manager (zebra)
If this an error, we should use zlog_err, not zlog_info as this is literally
not an information, but an error.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-27 09:29:52 +03:00
anlan_cs
4e8737b269 doc: Fix one syntax error for code block
The code block doesn't work due to special thing in front of it.
So, just make it work.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-27 13:51:40 +08:00
Keelan10
24379f0bb2 pimd: Fix memory leak in PIM interface deletion
This commit ensures proper cleanup by deleting the gm_join_list when a PIM interface is deleted. The gm_join_list was previously not being freed, causing a memory leak.

The ASan leak log for reference:
```
***********************************************************************************
Address Sanitizer Error detected in multicast_mld_join_topo1.test_multicast_mld_local_join/r1.asan.pim6d.28070

=================================================================
==28070==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x56230373dd6b in qcalloc lib/memory.c:105
    #2 0x56230372180f in list_new lib/linklist.c:49
    #3 0x56230361b589 in pim_if_gm_join_add pimd/pim_iface.c:1313
    #4 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868
    #5 0x562303767280 in nb_callback_create lib/northbound.c:1235
    #6 0x562303767280 in nb_callback_configuration lib/northbound.c:1579
    #7 0x562303768a1d in nb_transaction_process lib/northbound.c:1710
    #8 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104
    #9 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137
    #10 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49
    #11 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88
    #12 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991
    #13 0x5623036c5f1b in cmd_execute_command lib/command.c:1053
    #14 0x5623036c6392 in cmd_execute lib/command.c:1221
    #15 0x5623037e75da in vty_command lib/vty.c:591
    #16 0x5623037e7a74 in vty_execute lib/vty.c:1354
    #17 0x5623037f0253 in vtysh_read lib/vty.c:2362
    #18 0x5623037db4e8 in event_call lib/event.c:1995
    #19 0x562303720f97 in frr_run lib/libfrr.c:1213
    #20 0x56230368615d in main pimd/pim6_main.c:184
    #21 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Indirect leak of 192 byte(s) in 4 object(s) allocated from:
    #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x56230373dd6b in qcalloc lib/memory.c:105
    #2 0x56230361b91d in gm_join_new pimd/pim_iface.c:1288
    #3 0x56230361b91d in pim_if_gm_join_add pimd/pim_iface.c:1326
    #4 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868
    #5 0x562303767280 in nb_callback_create lib/northbound.c:1235
    #6 0x562303767280 in nb_callback_configuration lib/northbound.c:1579
    #7 0x562303768a1d in nb_transaction_process lib/northbound.c:1710
    #8 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104
    #9 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137
    #10 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49
    #11 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88
    #12 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991
    #13 0x5623036c5f1b in cmd_execute_command lib/command.c:1053
    #14 0x5623036c6392 in cmd_execute lib/command.c:1221
    #15 0x5623037e75da in vty_command lib/vty.c:591
    #16 0x5623037e7a74 in vty_execute lib/vty.c:1354
    #17 0x5623037f0253 in vtysh_read lib/vty.c:2362
    #18 0x5623037db4e8 in event_call lib/event.c:1995
    #19 0x562303720f97 in frr_run lib/libfrr.c:1213
    #20 0x56230368615d in main pimd/pim6_main.c:184
    #21 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Indirect leak of 96 byte(s) in 4 object(s) allocated from:
    #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x56230373dd6b in qcalloc lib/memory.c:105
    #2 0x562303721651 in listnode_new lib/linklist.c:71
    #3 0x56230372182b in listnode_add lib/linklist.c:92
    #4 0x56230361ba9a in gm_join_new pimd/pim_iface.c:1295
    #5 0x56230361ba9a in pim_if_gm_join_add pimd/pim_iface.c:1326
    #6 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868
    #7 0x562303767280 in nb_callback_create lib/northbound.c:1235
    #8 0x562303767280 in nb_callback_configuration lib/northbound.c:1579
    #9 0x562303768a1d in nb_transaction_process lib/northbound.c:1710
    #10 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104
    #11 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137
    #12 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49
    #13 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88
    #14 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991
    #15 0x5623036c5f1b in cmd_execute_command lib/command.c:1053
    #16 0x5623036c6392 in cmd_execute lib/command.c:1221
    #17 0x5623037e75da in vty_command lib/vty.c:591
    #18 0x5623037e7a74 in vty_execute lib/vty.c:1354
    #19 0x5623037f0253 in vtysh_read lib/vty.c:2362
    #20 0x5623037db4e8 in event_call lib/event.c:1995
    #21 0x562303720f97 in frr_run lib/libfrr.c:1213
    #22 0x56230368615d in main pimd/pim6_main.c:184
    #23 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x56230373dd6b in qcalloc lib/memory.c:105
    #2 0x56230361b91d in gm_join_new pimd/pim_iface.c:1288
    #3 0x56230361b91d in pim_if_gm_join_add pimd/pim_iface.c:1326
    #4 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868
    #5 0x562303767280 in nb_callback_create lib/northbound.c:1235
    #6 0x562303767280 in nb_callback_configuration lib/northbound.c:1579
    #7 0x562303768a1d in nb_transaction_process lib/northbound.c:1710
    #8 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104
    #9 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137
    #10 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49
    #11 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88
    #12 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991
    #13 0x5623036c5f6f in cmd_execute_command lib/command.c:1072
    #14 0x5623036c6392 in cmd_execute lib/command.c:1221
    #15 0x5623037e75da in vty_command lib/vty.c:591
    #16 0x5623037e7a74 in vty_execute lib/vty.c:1354
    #17 0x5623037f0253 in vtysh_read lib/vty.c:2362
    #18 0x5623037db4e8 in event_call lib/event.c:1995
    #19 0x562303720f97 in frr_run lib/libfrr.c:1213
    #20 0x56230368615d in main pimd/pim6_main.c:184
    #21 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f3605dbfd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x56230373dd6b in qcalloc lib/memory.c:105
    #2 0x562303721651 in listnode_new lib/linklist.c:71
    #3 0x56230372182b in listnode_add lib/linklist.c:92
    #4 0x56230361ba9a in gm_join_new pimd/pim_iface.c:1295
    #5 0x56230361ba9a in pim_if_gm_join_add pimd/pim_iface.c:1326
    #6 0x562303642247 in lib_interface_gmp_address_family_static_group_create pimd/pim_nb_config.c:2868
    #7 0x562303767280 in nb_callback_create lib/northbound.c:1235
    #8 0x562303767280 in nb_callback_configuration lib/northbound.c:1579
    #9 0x562303768a1d in nb_transaction_process lib/northbound.c:1710
    #10 0x56230376904a in nb_candidate_commit_apply lib/northbound.c:1104
    #11 0x5623037692ba in nb_candidate_commit lib/northbound.c:1137
    #12 0x562303769dec in nb_cli_classic_commit lib/northbound_cli.c:49
    #13 0x56230376fb79 in nb_cli_pending_commit_check lib/northbound_cli.c:88
    #14 0x5623036c5bcb in cmd_execute_command_real lib/command.c:991
    #15 0x5623036c5f6f in cmd_execute_command lib/command.c:1072
    #16 0x5623036c6392 in cmd_execute lib/command.c:1221
    #17 0x5623037e75da in vty_command lib/vty.c:591
    #18 0x5623037e7a74 in vty_execute lib/vty.c:1354
    #19 0x5623037f0253 in vtysh_read lib/vty.c:2362
    #20 0x5623037db4e8 in event_call lib/event.c:1995
    #21 0x562303720f97 in frr_run lib/libfrr.c:1213
    #22 0x56230368615d in main pimd/pim6_main.c:184
    #23 0x7f360461bc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

SUMMARY: AddressSanitizer: 400 byte(s) leaked in 11 allocation(s).
***********************************************************************************
```

Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
2023-06-27 09:30:25 +04:00
Chirag Shah
a7d77ee58b zebra: fix evpn rmac nh list cmp function
EVPN RMAC (Router MAC) nexthop list compare
function needs to return all values so
the list element can be compared and added/deleted
properly.

Ticket:#3486989
Testing Done:
Originate EVPN Type-5 route with PIP IP and MAC as remote
nexthops.
Change the PIP IP address which triggers nexthop change.

Before fix:
When PIP IP changes RMAC is deleted from remote VTEPs.

TORS1# show evpn next-hops vni 4001 | include 00:02:00:00:00:2d
27.0.0.11       00:02:00:00:00:2d
TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d
00:02:00:00:00:2d 27.0.0.11

----- Remote VTEP change nexthop IP to 172.16.16.16 -----

TORS1# show evpn next-hops vni 4001 | include 00:02:00:00:00:2d
172.16.16.16    00:02:00:00:00:2d
TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d
TORS1#

After fix:
RMAC is retained as its nexthop list is not empty,
thus it is not deleted from remote VTEPs.

TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d
00:02:00:00:00:2d 172.16.16.16

Log:
2023/06/27 00:50:36.833474 ZEBRA: [XREH0-ZYMH6] L3VNI 4001 Remote VTEP
change(27.0.0.11 -> 172.16.16.16) for RMAC 00:02:00:00:00:2d

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2023-06-26 17:59:16 -07:00
Donald Sharp
161972c9fe *: Rearrange vrf_bitmap_X api to reduce memory footprint
When running all daemons with config for most of them, FRR has
sharpd@janelle:~/frr$ vtysh -c "show debug hashtable"  | grep "VRF BIT HASH" | wc -l
3570

3570 hashes for bitmaps associated with the vrf.  This is a very
large number of hashes.  Let's do two things:

a) Reduce the created size of the actually created hashes to 2
instead of 32.

b) Delay generation of the hash *until* a set operation happens.
As that no hash directly implies a unset value if/when checked.

This reduces the number of hashes to 61 in my setup for normal
operation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-26 14:59:21 -04:00
Donald Sharp
dee79c33a4
Merge pull request #13804 from LabNConsulting/aceelindem/ospf6d-config-callbacks
ospf6d: Add config callbacks to suppress hellos during config load.
2023-06-26 14:59:13 -04:00
Donald Sharp
766852e95c
Merge pull request #13802 from LabNConsulting/aceelindem/ospfd-config-callbacks
ospfd: Add config callbacks and suppress hello during config load.
2023-06-26 14:58:03 -04:00
Mark Stapp
0ee56dd332 zebra: clean up coverity warning in opaque api
Seems a bit fussy of coverity, but ... don't NULL a variable
unnecessarily.

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-06-26 13:19:23 -04:00
Mobashshera Rasool
7de521470f pim6d: MLD conformance querier-non-querier transition fix
Problem:
ANVL Conformance test case 7.31 failed because DUT after
receiving MLD Done msg and a query message with lower adddress,
DUT did not keep on sending the group specific queries since it moved
to non-querier state.

As per RFC 2710 s4 p7, DUT is supposed to keep sending the group
specific queries until either it receives the membership report or
there is no response even after last member query is sent.

Fix:
Whenever group specific queries are sent out we are checking if
the self node is querier, if not it does not sends this query out.
This check is preventing the continuation of the last queries
which must be sent out although the self node is not the querier.
Hence removing the check from the api gm_trigger_specific_query
and adding in the caller to make sure this event is only added
for queriers. This will make sure the last member queries are sent out
even during the transition phase.
Also earlier this event was getting added for non-querier
as well which is redundant since queries were not required to be sent
out by non-queriers.

Issue: #13539

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2023-06-26 07:45:30 -07:00