aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoe Damato <jdamato@fastly.com>2024-08-31 12:17:04 +0000
committerJakub Kicinski <kuba@kernel.org>2024-09-02 18:27:15 -0700
commit4e3a024b437ec0aee82550cc66a0f4e1a7a88a67 (patch)
treef3e43a6a04b7e7094121206e38a1cdff0e386a6a /lib
parent55ddb6c5a3aef8d8658fe31b1ddda007693ae797 (diff)
netdev-genl: Set extack and fix error on napi-get
In commit 27f91aaf49b3 ("netdev-genl: Add netlink framework functions for napi"), when an invalid NAPI ID is specified the return value -EINVAL is used and no extack is set. Change the return value to -ENOENT and set the extack. Before this commit: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --do napi-get --json='{"id": 451}' Netlink error: Invalid argument nl_len = 36 (20) nl_flags = 0x100 nl_type = 2 error: -22 After this commit: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --do napi-get --json='{"id": 451}' Netlink error: No such file or directory nl_len = 44 (28) nl_flags = 0x300 nl_type = 2 error: -2 extack: {'bad-attr': '.id'} Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/20240831121707.17562-1-jdamato@fastly.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions