linux-stable/tools/net/ynl/lib
Jakub Kicinski dbc81b032d tools: ynl: fix handling of multiple mcast groups
[ Upstream commit b6c65eb20f ]

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: 86878f14d7 ("tools: ynl: user space helpers")
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20240226214019.1255242-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-06 14:48:36 +00:00
..
.gitignore tools: net: add __pycache__ to gitignore 2023-02-24 11:55:47 -08:00
Makefile tools: ynl: user space helpers 2023-06-06 12:31:31 -07:00
__init__.py tools/net/ynl: Add support for create flags 2023-08-27 17:17:10 -07:00
nlspec.py tools/ynl: Add mcast-group schema parsing to ynl 2023-08-27 17:17:10 -07:00
ynl.c tools: ynl: fix handling of multiple mcast groups 2024-03-06 14:48:36 +00:00
ynl.h tools: ynl: user space helpers 2023-06-06 12:31:31 -07:00
ynl.py tools/net/ynl: Add support for create flags 2023-08-27 17:17:10 -07:00