linux/tools/net/ynl
Jakub Kicinski 5847f9a493 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:53:51 +00:00
..
generated tools: ynl-gen: always construct struct ynl_req_state 2023-11-29 08:44:02 -08:00
lib tools: ynl: fix handling of multiple mcast groups 2024-03-06 14:53:51 +00:00
samples tools: ynl: use uAPI include magic for samples 2023-10-04 17:33:54 -07:00
cli.py tools: ynl: introduce option to process unknown attributes or types 2023-10-27 14:54:31 -07:00
ethtool.py tools: ynl: Rename ethtool to ethtool.py 2023-04-13 22:18:29 -07:00
Makefile tools: ynl: don't regen on every make 2023-10-04 17:33:54 -07:00
Makefile.deps tools: ynl: fix header path for nfsd 2023-11-23 08:52:12 -08:00
requirements.txt tools: ynl: add the Python requirements.txt file 2023-03-24 19:11:02 -07:00
ynl-gen-c.py tools: ynl-gen: always construct struct ynl_req_state 2023-11-29 08:44:02 -08:00
ynl-regen.sh ynl: regenerate all headers 2023-07-28 09:33:12 -07:00