diff options
author | Donald Hunter <donald.hunter@gmail.com> | 2024-03-28 15:56:36 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-03-29 12:26:02 -0700 |
commit | bd3ce405fecc6f2f9ce09c789386e326346899a0 (patch) | |
tree | b82e088a3c92710703ace1bf1b58e5f0e8426d27 /lib/test_bitmap.c | |
parent | 730fffce4fd2eb7a0be2d0b6cd7e55e9194d76d5 (diff) |
tools/net/ynl: Add extack policy attribute decoding
The NLMSGERR_ATTR_POLICY extack attribute has been ignored by ynl up to
now. Extend extack decoding to include _POLICY and the nested
NL_POLICY_TYPE_ATTR_* attributes.
For example:
./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/rt_link.yaml \
--create --do newlink --json '{
"ifname": "12345678901234567890",
"linkinfo": {"kind": "bridge"}
}'
Netlink error: Numerical result out of range
nl_len = 104 (88) nl_flags = 0x300 nl_type = 2
error: -34 extack: {'msg': 'Attribute failed policy validation',
'policy': {'max-length': 15, 'type': 'string'}, 'bad-attr': '.ifname'}
Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240328155636.64688-1-donald.hunter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/test_bitmap.c')
0 files changed, 0 insertions, 0 deletions