linux-stable/tools/net/ynl
Donald Hunter 663ad7481f tools/net/ynl: fix sub-message key lookup for nested attributes
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>
2024-12-15 13:30:43 -08:00
..
generated tools: ynl: extend CFLAGS to keep options from environment 2024-11-13 18:43:46 -08:00
lib tools/net/ynl: fix sub-message key lookup for nested attributes 2024-12-15 13:30:43 -08:00
samples ynl: samples: Fix the wrong format specifier 2024-11-13 18:48:15 -08:00
cli.py tools/net/ynl: add async notification handling 2024-11-14 18:09:06 -08:00
ethtool.py tools: ynl: add script dir to sys.path 2024-11-13 18:43:45 -08: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-gen: allow uapi headers in sub-dirs 2024-11-18 18:38:07 -08: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