This is a note to let you know that I've just added the patch titled tools: ynl: fix handling of multiple mcast groups to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tools-ynl-fix-handling-of-multiple-mcast-groups.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit c3a370fe39d2215dfb4ab7a72e558308de7e59b8 Author: Jakub Kicinski <kuba@xxxxxxxxxx> Date: Mon Feb 26 13:40:18 2024 -0800 tools: ynl: fix handling of multiple mcast groups [ Upstream commit b6c65eb20ffa8e3bd89f551427dbeee2876d72ca ] We never increment the group number iterator, so all groups get recorded into index 0 of the mcast_groups[] array. As a result YNL can only handle using the last group. For example using the "netdev" sample on kernel with page pool commands results in: $ ./samples/netdev YNL: Multicast group 'mgmt' not found Most families have only one multicast group, so this hasn't been noticed. Plus perhaps developers usually test the last group which would have worked. Fixes: 86878f14d71a ("tools: ynl: user space helpers") Reviewed-by: Donald Hunter <donald.hunter@xxxxxxxxx> Acked-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx> Link: https://lore.kernel.org/r/20240226214019.1255242-1-kuba@xxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c index 591f5f50ddaab..2aa19004fa0cf 100644 --- a/tools/net/ynl/lib/ynl.c +++ b/tools/net/ynl/lib/ynl.c @@ -519,6 +519,7 @@ ynl_get_family_info_mcast(struct ynl_sock *ys, const struct nlattr *mcasts) ys->mcast_groups[i].name[GENL_NAMSIZ - 1] = 0; } } + i++; } return 0;