linux-next/tools/net/ynl/lib
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
..
__init__.py tools/net/ynl: Report netlink errors without stacktrace 2024-03-07 20:28:26 -08:00
.gitignore selftests: add ncdevmem, netcat for devmem TCP 2024-09-11 20:44:32 -07:00
Makefile tools: ynl: extend CFLAGS to keep options from environment 2024-11-13 18:43:46 -08:00
nlspec.py tools: ynl-gen: de-kdocify enums with no doc for entries 2024-11-04 18:11:47 -08:00
ynl-priv.h tools: ynl: make user space policies const 2024-06-09 15:51:40 +01:00
ynl.c tools: ynl: remove extraneous ; after statements 2024-08-05 16:28:39 -07:00
ynl.h tools: ynl: make user space policies const 2024-06-09 15:51:40 +01:00
ynl.py tools/net/ynl: fix sub-message key lookup for nested attributes 2024-12-15 13:30:43 -08:00