linux/tools/net/ynl
Donald Hunter 1c2d7999d1 tools/net/ynl: fix sub-message key lookup for nested attributes
[ Upstream commit 663ad7481f ]

Use the correct attribute space for sub-message key lookup in nested
attributes when adding attributes. This fixes rt_link where the "kind"
key and "data" sub-message are nested attributes in "linkinfo".

For example:

./tools/net/ynl/cli.py \
    --create \
    --spec Documentation/netlink/specs/rt_link.yaml \
    --do newlink \
    --json '{"link": 99,
             "linkinfo": { "kind": "vlan", "data": {"id": 4 } }
             }'

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Fixes: ab463c4342 ("tools/net/ynl: Add support for encoding sub-messages")
Link: https://patch.msgid.link/20241213130711.40267-1-donald.hunter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-27 14:02:02 +01:00
..
generated tools: ynl: rename make hardclean -> distclean 2024-03-06 12:05:10 +00:00
lib tools/net/ynl: fix sub-message key lookup for nested attributes 2024-12-27 14:02:02 +01:00
samples tools: ynl: error check scanf() in a sample 2024-08-29 12:43:29 -07:00
cli.py tools: ynl: add --list-ops and --list-msgs to CLI 2024-05-03 15:13:21 -07:00
ethtool.py tools: ynl: ethtool.py: Output timestamping statistics from tsinfo-get operation 2024-04-05 22:27:57 -07:00
Makefile tools: net: package libynl for use in selftests 2024-07-02 18:59:33 -07:00
Makefile.deps tcp_metrics: add netlink protocol spec in YAML 2024-07-01 09:44:27 +01: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: lift an assumption about spec file name 2024-08-21 17:56:06 -07:00
ynl-gen-rst.py doc: netlink: Fix op pre and post fields in generated .rst 2024-05-29 18:10:26 -07:00
ynl-regen.sh tools: ynl: don't skip regeneration from make targets 2023-11-29 16:07:00 -08:00